Learn R Programming

facopy (version 1.6.0)

plotHist: Stacked Histograms

Description

The function plots a stacked histogram of chromosome arm alterations by variable value

Usage

plotHist(fad, alteration, varName, sel = NULL, selColors = NULL, selOnly = FALSE, baseColor = "black", bin = 0.05, xmax = 1, ymax)

Arguments

fad
facopyInfo object with a certain study's facopy data.
alteration
A character describing the kinds of alteration to include. It should be one of the following: - amplifications All amplifications (CN>2). - deletions All deletions (CN<2). -="" loh All loss of heterozygosity (LOH), regardless of copy number. - cnas All copy number alterations (CN<>2). - any Any kind of alteration. - all Any kind of alteration, same as any. - onlygain Only non-LOH amplifications. - someloss All deletions plus LOH alterations.
varName
A character indicating the variable of interest within the facopyInfo object. A stacked histogram will be generated for every value of the variable. Only available for discrete variables. Call summary on your facopyInfo object to see the names of defined variables.
sel
A character vector with the chromosome arms that will be highlighted using the colors in selColors. Example: c("1q","9p").
selColors
A vector of colors with the same length as the parameter sel. Each color in the vector will be used for the selected chromosome arm in the same position within sel.
selOnly
A logical indicating whether to only plot the frequencies of selected chromosome arms.
baseColor
Base color of the triangles that indicate frequencies in the plot. Default is "black".
bin
The width of the histogram cells. Default is 0.05.
xmax
The maximum limit of the x axis in the plot. Default is 1.
ymax
The maximum limit of the y axis in the plot.

Details

Alteration frequencies are calculated genomic feature-wise within each chromosome arm.

Examples

Run this code
data(myStudy) # load example study

# select some chromosome arms to highlight
myArms = c("8q","13q","20q","8p","18q")
myColors = c(rainbow(15)[1:3], rainbow(15)[10:11])

plotHist(myStudy, "amp", "stage", myArms, myColors, bin=0.1, ymax=80)

Run the code above in your browser using DataLab