Learn R Programming

IdeoViz (version 1.6.0)

plotChromValuePair: Plot a chromosome-value pair

Description

Base function which plots the ideogram and superimposed data for a single chromosome. plotOnIdeo() calls this function and stacks the resulting output.

Usage

plotChromValuePair(chrom, cytoTable, bpLim, vertical, values_GR, val_range, col, value_cols = "values", default_margins, addScale, ablines_y, smoothVals, span=0.03, verbose = FALSE, ...)

Arguments

chrom
(character) chromosome(s) to create ideograms for
cytoTable
(data.frame) loaded ideogram table. (see ideoTable argument to plotOnIdeo())
bpLim
(numeric) (aka xlim); display only a section of the chromosome and the corresponding values
vertical
(logical) if TRUE, chromosomes will be plotted vertically
values_GR
(GenomicRanges) data to be plotted must be in metadata columns
val_range
(numeric) (aka ylim); y-axis scale for data series
col
(character) colour for series
value_cols
(character) column name for series to plot
default_margins
(numeric) page inner margins (in inches)
addScale
(logical) if FALSE, bp positions will be hidden
ablines_y
(numeric) when specified, will draw reference lines on the y-axis
smoothVals
(logical) when T applies loess() to each series
span
(numeric)span argument for loess function
verbose
(logical) print messages
...
arguments to axis(), line(), and rect()

Details

Plots one unit of chromosome ideogram with dataseries superimposed. Usually, the user can avoid this function and directly call plotOnIdeo(). However, this function may be used in cases where further plot customization is required.

See Also

plotOnIdeo()

Examples

Run this code
data(hg18_ideo)
data(binned_multiSeries)
layout(matrix(1:2, byrow=TRUE,ncol=1),heights=c(2.5,1))
plotChromValuePair("chr1",hg18_ideo, 
	values_GR=binned_multiSeries,value_cols=colnames(mcols(binned_multiSeries)),plotType='lines',
	col=1:5,val_range=c(0,10),bpLim=NULL,vertical=FALSE,addScale=TRUE,ablines_y=NULL,
	smoothVals=FALSE,default_margins=c(0.5,.5,.1,.1))

Run the code above in your browser using DataLab