Learn R Programming

rphast (version 1.6.9)

as.track.feat: Create a features track

Description

Create a features track

Usage

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab