plot_multisample_CNA: Plots CNAs from multiple samples.

View source: R/plot_multisample_CNA.R

plot_multisample_CNAR Documentation

Plots CNAs from multiple samples.

Description

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.

Usage

plot_multisample_CNA(x, layout = "flat", ...)

Arguments

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.

Value

A 'ggplot2' plot.

Examples

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')

caravagnalab/CNAqc documentation built on Oct. 31, 2024, 3:54 a.m.