makeAnnotationTrack {GenomeGraphs}R Documentation

Create objects of class AnnotationTrack

Description

Convenience function for constructing objects of class AnnotationTrack.

Usage

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

Arguments

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'

Value

Returns an object of class AnnotationTrack

Examples

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)

[Package GenomeGraphs version 1.2.3 Index]