Learn R Programming

rphast (version 1.6.9)

plot.feat: Features plot

Description

plot features

Usage

# S3 method for feat
plot(x, y = 0, height = 1, plottype = "r",
  arrow.density = 5, angle = 30, col = "black", fill.col = if (plottype
  == "r") col else NULL, lty = par("lty"), lwd = par("lwd"), add = FALSE,
  xlim = range.feat(x), ylim = c(y - height * 3/4, y + height * 3/4), ...)

Arguments

x

an object of type feat

y

the location of the plot on the y axis

height

the height of the boxes

plottype

either "r" for rectangles or "a" for arrows, "b" for arrows within rectangles, or "l" for line segments only.

arrow.density

If plottype=="a" or "b", then this gives the density of arrows in arrows per inch. Otherwise it gives the density of shading lines in the rectangles, and a value of NULL implies no shading lines.

angle

angle (in degrees) of the shading lines or arrows.

col

color to draw the boxes/lines/arrows with.

fill.col

Color to fill the rectangles with. If NULL then do not fill.

lty

line type for lines, arrows, borders, and shading

lwd

line width for lines, arrows, borders and shading

add

if TRUE, add to existing plot

xlim

A numerical vector of length 2 giving the range for the x-axis.

ylim

A numerical vector of length 2 giving the range for the y-axis.

...

graphical parameters to be passed to plot.

Examples

Run this code
# NOT RUN {
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
featFile <- "gencode.ENr334-100k.gff"
unzip(exampleArchive, featFile)
f <- read.feat(featFile)
# note that plot(f) does not work because features are stored as data.frames
plot.feat(f[f$feature=="CDS",])
unlink(featFile)
# }

Run the code above in your browser using DataLab