View source: R/plot_multisample_CNA.R
plot_multisample_CNA | R Documentation |
One can have multiple CNAqc objects - i.e., work with a cohort of objects - when working with:
- a group of distinct patients; - multiple samples from the same patient; - multiple calls from the same sample;
Assuming all input objects have the same reference, cohort cohort-level plots are possible with this function. Two layouts are possible:
* Flat layout: classical layout where the amount of deletions and gains are reported with a certain discretized binning of the input tumour genome. Deletions are anything with an LOH state; gains must have more than 3 copies. * Circular layout: plot the Major and minor alleles of each segment, each sample is plot on a lane, like in a donut plot.
plot_multisample_CNA(x, layout = "flat", ...)
x |
A list of 'CNAqc' objects; names are optional for the circular layout. |
layout |
If '"flat"' the common layout with amplificaitons and deletions is used, otherwise with '"circular"' a circos-alike plot is used. |
A 'ggplot2' plot.
data('example_dataset_CNAqc', package = 'CNAqc')
# We build faking it to be hg19, otherwise we cannot blend it with PCAWG
x = CNAqc::init(mutations = example_dataset_CNAqc$mutations, cna = example_dataset_CNAqc$cna, purity = example_dataset_CNAqc$purity, ref = 'hg19')
# Add some example deletion
x2 = x
x2$cna$Major[1:10] = 2
x2$cna$minor[1:10] = 0
#PCAWG sample
z = CNAqc::example_PCAWG
# Inputs need to be wrapped in a named list
inputs = list(`Original` = x, `Copy` = x, `Faked_diploid` = x2, `PCAWG` = z)
plot_multisample_CNA(inputs)
# Circular layout
plot_multisample_CNA(inputs, layout = 'circular')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.