TitanCNA-plotting: Plotting functions for 'TitanCNA' results.

Description Usage Arguments Details Author(s) References See Also Examples

Description

Three plotting functions for TitanCNA results. plotCNlogRByChr plots the copy number results from log ratio data. plotAllelicRatio plots the allelic imbalance and loss of heterozygosity (LOH) from allelic ratio data. plotClonalFrequency plots the clonal cluster and cellular prevalence results for each data point.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  plotAllelicRatio(dataIn, chr = NULL, geneAnnot = NULL, spacing = 4, 
      xlim = NULL, ...)
  plotClonalFrequency(dataIn, chr = NULL, normal = NULL, geneAnnot = NULL, 
      spacing = 4, xlim = NULL, ...)
  plotCNlogRByChr(dataIn, chr = NULL, segs = NULL, plotCorrectedCN = TRUE, 
  	  geneAnnot = NULL, ploidy = NULL, normal = NULL, spacing = 4, alphaVal = 1, xlim = NULL, ...)
  plotSubcloneProfiles(dataIn, chr = NULL, geneAnnot = NULL, 
  	  spacing = 4, xlim = NULL, ...)
  plotSegmentMedians(dataIn, resultType = "LogRatio", plotType = "CopyNumber", plotCorrectedCN = TRUE,
      chr = NULL, geneAnnot = NULL, ploidy = NULL, spacing = 4, alphaVal = 1, xlim = NULL, 
		  plot.new = FALSE, lwd = 8, ...)
  plotHaplotypeFraction(dataIn, chr = NULL, resultType = "HaplotypeRatio", colType = "Haplotypes",
      phaseBlockCol = c("#9ad0f3", "#CC79A7"), geneAnnot = NULL, spacing = 4,  xlim = NULL,  ...)

Arguments

dataIn

Formatted TitanCNA results output from outputTitanResults. See Example.

chr

Plot results for specified chr. If chr is NULL, then results for the entire genome is plot.

segs

data.frame containing named columns: Chromosome, Median_logR, Start_Position.bp., End_Position.bp.. This data can be read in from the segments generated by the TITANRunner pipeline. These segments will be overlaid in the plots as lines at the median log ratio for each segment.

resultType

For plotSegmentMedians: specify the data type (‘LogRatio’ or ‘AllelicRatio’) to plot. For plotHaplotypeFraction: specify the data type (‘HaplotypeRatio’ or ‘AllelicRatio’) to plot.

plotType

Specify whether to plot the ‘CopyNumber’ or ‘Ratio’ values for the resultType.

colType

Specify the color scheme to use: ‘Haplotypes’ or ‘CopyNumber’. For ‘Haplotypes’, alternating blue and red used to illustrated the data within phased haplotype blocks. For ‘CopyNumber’, the same colors as plotAllelicRatio are used for allelic copy number events.

plotCorrectedCN

TRUE if the plot will use ‘Corrected_Copy_Number’ for color of data points or lines.

geneAnnot

data.frame specifying the genes to annotate in the plot. Gene boundaries are indicated using vertical dotted grey lines and gene symbols are shown at the top of the plot. geneAnnot must have four columns: gene symbol, chr, start coordinate, stop coordinate.

normal

numeric scalar indicating the normal contamination. This can be obtained from converge parameters output using runEMclonalCN. See Example.

ploidy

numeric scalar indicating the tumour ploidy used to adjust the copy number plot plotCNlogRByChr. This can be obtained from converge parameters output using runEMclonalCN. See Example. If NULL is used, then ploidy adjustment is not used in the plot.

phaseBlockCol

Two-element vector specifying the color to plot for alternating haplotype phase blocks.

spacing

Number of lines of spacing for the margin spacing at the bottom of the plot. Useful if an idiogram/karogram is plot underneath.

alphaVal

Set an alpha value between 0 and 1 to allow transparency in the points being plot.

xlim

Two element vector to specify the xlim for the plot. If NULL, then entire chromosome is plot.

lwd

Explicitly specify the line width for segments being plot.

plot.new

TRUE if a new plot is used. Set to FALSE to overlay an existing plot.

...

Additional arguments used in the plot function.

Details

plotCNlogRByChr plots the copy number alterations from log ratio data. The Y-axis is based on log ratios. Log ratios are computed ratios between normalized tumour and normal read depths. Data points close to 0 represent diploid, above 0 are copy gains, below 0 are deletions. ploidy argument adjusts the baseline of the data points. Colours represent the copy number state. Bright Green - Homozygous deletion (HOMD) Green - Hemizygous deletion (DLOH) Blue - Diploid heterozygous (HET), Copy-neutral LOH (NLOH) Dark Red - GAIN Red - Allele-specific CNA (ASCNA), Unbalanced CNA (UBCNA), Balanced CNA (BCNA)

plotAllelicRatio plots the allelic imbalance and loss of heterozygosity from allelic ratio data. The Y-axis is based on allelic ratios. Allelic ratios are computed as RefCount/Depth. Data points close to 1 represent homozygous reference base, close to 0 represent homozygous non-reference base, and close to 0.5 represent heterozygous. Normal contamination influences the divergence away from 0.5 for LOH events. No adjustments are made to the plot as the original data from dataIn are shown. Colours represent the allelic imbalance and LOH state. Grey - HET, BCNA Bright Green - HOMD Green - DLOH, ALOH Blue - NLOH Dark Red - GAIN Red - ASCNA, UBCNA

plotClonalFrequency plots the cellular prevalence and clonal clusters from the results. The Y-axis is the cellular prevalence that includes the normal proportion. Therefore, the cellular prevalence here refers to the proportion in the sample (including normal). Lines are drawn for each data point indicating the cellular prevalence. Heterozygous diploid are not shown because it is a normal genotype and is not categorized as being subclonal (this means 100% of cells are normal). The black horizontal line represents the tumour content labeled as ‘T’. Each horizontal grey line represents the cellular prevalence of the clonal clusters labeled as Z1, Z2, etc. Colours are the sames for allelic ratio plots.

plotSubcloneProfiles plots the predicted copy number profile for individual subclones inferred by TITAN. Currently, this only works for solutions having 1 or 2 clonal clusters. The colours are the same as for plotAllelicRatio.

plotSegmentMedians plots the segment means for ‘LogRatio’ or ‘AllelicRatio’ data. There are also two types of plots for each of the datatypes: ‘Ratio’ or ‘CopyNumber’. For ‘Ratio’, the logRatio or allelic ratios in the output results files are plot. For ‘CopyNumber’, the y-axis is converted to the exponentiated absolute copy number levels for the easier interpretability of the results.

plotHaplotypeFraction plots the phased SNP read count of the higher coverage haplotype, normalized by the total coverage of the haplotype. For ‘Haplotypes’, alternating colors of blue and red are used to illustrate the phased haplotype blocks provided from the input data (see loadHaplotypeAlleleCounts).

Author(s)

Gavin Ha <gavinha@gmail.com>

References

Ha, G., Roth, A., Khattra, J., Ho, J., Yap, D., Prentice, L. M., Melnyk, N., McPherson, A., Bashashati, A., Laks, E., Biele, J., Ding, J., Le, A., Rosner, J., Shumansky, K., Marra, M. A., Huntsman, D. G., McAlpine, J. N., Aparicio, S. A. J. R., and Shah, S. P. (2014). TITAN: Inference of copy number architectures in clonal cell populations from tumour whole genome sequence data. Genome Research, 24: 1881-1893. (PMID: 25060187)

See Also

outputTitanResults, runEMclonalCN, computeSDbwIndex

Examples

 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
28
29
30
data(EMresults)

#### COMPUTE OPTIMAL STATE PATH USING VITERBI ####
optimalPath <- viterbiClonalCN(data, convergeParams)

#### FORMAT RESULTS ####
results <- outputTitanResults(data, convergeParams, optimalPath, 
  filename = NULL, posteriorProbs = FALSE, 
  correctResults = TRUE, proportionThreshold = 0.05, 
  proportionThresholdClonal = 0.05)
convergeParams <- results$convergeParams
results <- results$corrResults # use corrected results
#### PLOT RESULTS ####
norm <- tail(convergeParams$n, 1)
ploidy <- tail(convergeParams$phi, 1)

par(mfrow=c(4, 1))    
plotCNlogRByChr(results, chr = 2, segs = NULL, ploidy = ploidy, normal = norm, 
  geneAnnot = NULL, ylim = c(-2, 2), cex = 0.5, xlab = "", 
  main = "Chr 2")
plotAllelicRatio(results, chr = 2, geneAnnot = NULL, ylim = c(0, 1), cex = 0.5, 
  xlab = "", main = "Chr 2")
plotClonalFrequency(results, chr = 2, normal = norm, geneAnnot = NULL, 
  ylim = c(0, 1), cex = 0.5, xlab = "", main = "Chr 2")
plotSubcloneProfiles(results, chr = 2, cex = 2, main = "Chr 2")

segs <- outputTitanSegments(results, id = "test", convergeParams)

plotSegmentMedians(segs, chr=2, resultType = "LogRatio", 
  plotType = "CopyNumber", plot.new = TRUE)

ATLi2001/titancna documentation built on May 17, 2019, 10:16 a.m.