makeAnnotationTrack       package:GenomeGraphs       R Documentation

_C_r_e_a_t_e _o_b_j_e_c_t_s _o_f _c_l_a_s_s _A_n_n_o_t_a_t_i_o_n_T_r_a_c_k

_D_e_s_c_r_i_p_t_i_o_n:

     Convenience function for constructing objects of class
     AnnotationTrack.

_U_s_a_g_e:

     makeAnnotationTrack(regions = NULL, chr = NULL, strand = NULL, start = NULL, end = NULL, feature = NULL, group = NULL, ID = NULL, dp = NULL)

_A_r_g_u_m_e_n_t_s:

 regions: A dataframe with columns start, end, feature, group, ID.
          start and end delineate the boundaries of the boxes feature
          can be used to color the boxes. Group denotes linking so
          generally exons from a gene form a group. Finally, ID can be
          used to plot names on boxes.

     chr: The chromosome of the regions (can be ignored)

  strand: The strand of the regions (can be ingored) 

   start: If regions is missing then we construct a dataframe from the
          remaining parameters.

     end: Construct regions with this vector

 feature: Construct regions with this feature vector or scalar

   group: Defines a grouping 

      ID: Defines an ID for each annotation bit 

      dp: DisplayPars, in this case we can create a mapping between
          feature and color. So lets say in the feature column you
          have: gene, transcript, gene, then in the dp you can say gene
          = 'blue' and transcript = 'green'

_V_a_l_u_e:

     Returns an object of class AnnotationTrack

_E_x_a_m_p_l_e_s:

     a <-  makeAnnotationTrack(start = c(10, 15, 25), end = c(12, 19, 31),
                           group = c(1,1,2), feature = c("gene", "gene", "tf"),
                           ID = paste("id", 1:3, sep = ""), dp = DisplayPars(gene = 'blue'))
     gdPlot(a, minBase = 0, maxBase = 40)

