plotOnIdeo(chrom = stop("enter chromosome(s) to plot"), ideoTable, values_GR, value_cols = "values", plotType = "lines", col = "orange", bpLim = NULL, val_range = NULL, addScale = TRUE, scaleChrom = TRUE, vertical = FALSE, addOnetoStart = TRUE, smoothVals = FALSE, cex.axis = 1, plot_title = NULL, ablines_y = NULL, cex.main=1, ...)
getIdeo()
mcols()
slot of values_GR
lines
" or "rect
" to plot lines or barplots respectively. The latter is not recommended when several series are to be plotted on the same axis.)plotOnIdeo()
is the main function of this package. It is the one the end-user is expected to call to generate plots.
Input is provided as a GRanges object (values_GR
), with data to be plotted contained in its metadata slot. The user is responsible for providing pre-binned data, if binning is required. Data can also be binned using the avgByBin() function in this package.
The ideogram table (ideoTable
) is the same as the cytoBandIdeo table available from the UCSC genome browser database for a given genome is a can be either automatically downloaded from UCSC (see getIdeo()
) or read in from a local-file and passed to this function. There are numerous arguments which control the appearance of the plot. The main decision points are:
vertical
: Whether the entire plot should have a horizontal or vertical orientation
plotType
: Whether each dataseries should be shown as a trendline or as a barplot. The latter is not recommended for cases where multiple series are to be plotted on the same axis.
Other considerations:
addScale=FALSE
. However, it is recommended to call plotOnIdeo()
multiple times, and plotting a fewer number of chromosomes on each page.
values_GR
to be in 1-base. Set addOneToStart=TRUE
if supplied coordinates are in 0-base.
data(binned_multiSeries)
data(hg18_ideo)
plotOnIdeo(chrom=seqlevels(binned_multiSeries),ideoTable=hg18_ideo, values_GR=binned_multiSeries, value_cols=colnames(mcols(binned_multiSeries)), col=1:5)
Run the code above in your browser using DataLab