Description Usage Arguments Value Author(s) Examples
Plot of densities/histograms of allele frequencies, useful for evaluating normal contamination estimate, total Copy number estimates, etc.
1 2 3 4 |
af |
vector of allele frequencies |
depth |
coverage of the location |
groupingId |
grouping variable for allele frequencies (single density curve/histogram for each id) |
totalCopy |
the total copy number for the allele frequencies plotted (must be the same) |
groupCol |
colors for the different groups (if histogram=FALSE) |
type |
type of allele frequency (mutation, SNPHet, SNPHomo), passed to allAF |
normCont |
percentage of normal contamination. Can be vector of different values. |
minDepth |
min required depth in order to include it in the density/histogram |
lineCols |
colors of the vertical lines (each color is for different normal contamination) |
minMut |
minimum number of mutations per group in order to plot the group |
histogram |
logical. should the plot be superimposed density curves (FALSE), or a single histogram per group (TRUE)? |
Returns invisibly the data used (i.e. passed minimum cutoff criteria), separated by the groupingId given by the user
Elizabeth Purdom
1 2 3 4 5 6 7 8 9 10 | data(mutData)
#only mutations in the CNLOH region
onlyMuts<-subset(mutData,is.na(rsID) & position <= 1.8E7)
plotAlleleDensity(onlyMuts$allelefreq,onlyMuts$t_ref_count+onlyMuts$t_alt_count,
totalCopy=2,normCont=c(0,0.22),minMut=0,minDepth=0,hist=TRUE)
gpId<-factor(is.na(mutData$rsID),levels=c("TRUE","FALSE"),labels=c("Mutations","SNPs"))
plotAlleleDensity(mutData$allelefreq,mutData$t_ref_count+mutData$t_alt_count,
groupCol=c("black","red"),totalCopy=2,groupingId=gpId,minMut=0,minDepth=30,hist=FALSE)
legend("topleft",levels(gpId),fill=c("red","black"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.