Create a features track

Share:

Description

Create a features track

Usage

1
2
as.track.feat(x, name, short.label = NULL, col = "black", is.gene = FALSE,
  arrow.density = 10)

Arguments

x

An object of type feat

name

The name of the track (a character string)

short.label

An optional character string to be displayed in left hand margin of track

col

The color to use plotting this track (can be a single color or a color for each element)

is.gene

A logical value; if TRUE, extract and plot gene information from features. The features which will be plotted are the ones with types "CDS", "exon", or "intron". All others will be ignored.

arrow.density

(Only used if is.gene==TRUE. The number of lines per inch used to denote strand in gene plots.

Value

An object of type track which can be plotted with plot.track function

Author(s)

Melissa J. Hubisz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
featFile <- "sol1.gp"
unzip(exampleArchive, featFile)
f <- read.feat(featFile)
featTrack <- as.track.feat(f, "basic feature track")
f <- add.introns.feat(f)
geneTrack <- as.track.feat(f, "gene track", is.gene=TRUE)
plot.track(list(featTrack, geneTrack))
plot.track(list(featTrack, geneTrack, geneTrack, geneTrack, geneTrack),
           xlim=c(14800, 16000))
unlink(featFile)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.