Description Usage Arguments Details Note Author(s) See Also Examples
Plot copy number data and/or segmentation results for each chromosome separately with samples in different panels.
1 2 3 |
data |
a data frame with numeric or character chromosome numbers in the first column, numeric local probe positions in the second, and numeric copy number data for one or more samples in subsequent columns. The header of the copy number columns should be the sample IDs. |
segments |
a data frame or a list of data frames containing the segmentation results found by either |
pos.unit |
the unit used to represent the probe positions. Allowed options are "mbp" (mega base pairs), "kbp" (kilo base pairs) or "bp" (base pairs). By default assumed to be "bp". |
sample |
a numeric vector indicating which sample(s) is (are) to be plotted. The number(s) should correspond to the sample's place (in order of appearance) in |
chrom |
a numeric or character vector with chromosome number(s) to indicate which chromosome(s) is (are) to be plotted. |
assembly |
a string specifying which genome assembly version should be applied to define the chromosome ideogram. Allowed options are "hg19", "hg18", "hg17" and "hg16" (corresponding to the four latest human genome annotations in the UCSC genome browser). |
winsoutliers |
an optional data frame of the same size as |
xaxis |
either "pos" or "index". The former implies that the xaxis will represent the genomic positions, whereas the latter implies that the xaxis will represent the probe index. Default is "pos". |
layout |
an integer vector of length two giving the number of rows and columns in the plot. Default is |
plot.ideo |
a logical value indicating whether the chromosome ideogram should be plotted. Only applicable when |
... |
other graphical parameters. These include the common plot arguments |
Several plots may be produced on the same page with the layout
option. If the number of plots exceeds the desired page layout, the user is prompted before advancing to the next page of output.
This function applies par(fig)
, and is therefore not compatible with other setups for arranging multiple plots in one device such as par(mfrow,mfcol)
.
Gro Nilsen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #Lymphoma data
data(lymphoma)
#Take out a smaller subset of 6 samples (using subsetData):
sub.lymphoma <- subsetData(lymphoma,sample=1:6)
#Winsorize data:
wins.res <- winsorize(data=sub.lymphoma,return.outliers=TRUE)
#Use pcf to find segments:
uni.segments <- pcf(data=wins.res,gamma=12)
#Use multipcf to find segments as well:
multi.segments <- multipcf(data=wins.res,gamma=12)
#Plot data and segments for chromosome 1 separately for each sample:
plotChrom(data=sub.lymphoma,segments=list(uni.segments,multi.segments),chrom=1,
layout=c(3,2))
#Let xaxis be probe index, and do not connect segments by vertical lines:
plotChrom(data=sub.lymphoma,segments=list(uni.segments,multi.segments),chrom=1,
xaxis="index",layout=c(3,2),legend=FALSE,connect=FALSE)
#Data was winsorized earlier. Mark winsorized values by different color
#and symbol:
plotChrom(data=wins.res,chrom=1,winsoutliers=wins.res,layout=c(3,2))
#Save plots in working directory:
plotChrom(data=sub.lymphoma,segments=uni.segments,chrom=c(1,2),
layout=c(3,2),dir.print=getwd(),file.name=c("chromosome1","chromosome2"),
onefile=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.