genoPlot-methods: Plot data along the genome

Description Usage Arguments Value Methods See Also Examples

Description

Plot location data and chromosome boundaries from a GenoSet or GRanges object against data from a numeric or Rle. Specifying a chromosome name and optionally a 'xlim' will zoom into one chromosome region. If more than one chromosome is present, the chromosome boundaries will be marked. Alternatively, for a numeric x and a numeric or Rle y, data in y can be plotted at genome positions x. In this case, chromosome boundaries can be taken from the argument locs. If data for y-axis comes from a Rle lines are plotted representing segments. X-axis tickmarks will be labeled with genome positions in the most appropriate units.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
genoPlot(x, y, ...)

## S4 method for signature 'numeric,numeric'
genoPlot(x, y, add = FALSE, xlab = "",
  ylab = "", col = "black", locs = NULL, ...)

## S4 method for signature 'numeric,Rle'
genoPlot(x, y, add = FALSE, xlab = "",
  ylab = "", col = "red", locs = NULL, lwd = 2, xlim = NULL, ...)

## S4 method for signature 'GenoSetOrGenomicRanges,ANY'
genoPlot(x, y, chr = NULL,
  add = FALSE, pch = ".", xlab = "", ylab = "", ...)

Arguments

x

GenoSet (or descendant) or GRanges

y

numeric or Rle

...

Additional plotting args

add

Add plot to existing plot

xlab

character, label for x-axis of plot

ylab

character, label for y-axis of plot

col

character, color to plot lines or points

locs

GRanges, like rowRanges slot of GenoSet

lwd

numeric, line width for segment plots from an Rle

xlim

integer, length two, bounds for genome positions. Used in conjunction with 'chr' to subset data for plotting.

chr

Chromosome to plot, NULL by default for full genome

pch

character or numeric, printing character, see points

Value

TRUE

Methods

signature(x = 'GenoSetOrGenomicRanges', y = 'ANY')

Plot feature locations and data from one sample.

signature(x = 'numeric', y = 'numeric')

Plot numeric location and a vector of numeric data.

signature(x = 'numeric', y = 'Rle')

Plot numeric location and a vector of Rle data. Uses lines for Rle runs.

See Also

Other 'genome plots': genomeAxis

Examples

1
2
3
4
data(genoset,package='genoset')
genoPlot( x=genoset.ds,y=genoset.ds[,1,'lrr'] )
genoPlot( genoPos(genoset.ds), genoset.ds[,1,'lrr'], locs=rowRanges(genoset.ds) ) # The same
genoPlot( 1:10, Rle(c(rep(0,5),rep(3,4),rep(1,1))) )

genoset documentation built on Nov. 8, 2020, 6:07 p.m.