plot_data_histogram: Plot the read-counts data histograms.

View source: R/plot_data_histogram.R

plot_data_histogramR Documentation

Plot the read-counts data histograms.

Description

This function plots the histogram of any of the following:

* the Variant Allele Frequency (VAF), * the depth of sequencing (DP), * the number of reads with the variant (NV) * the Cancer Cell Fractions (CCF) estimates (if available)

The plot can be subset by selecting only mutations mapping to certain karyotypes.

Usage

plot_data_histogram(
  x,
  which = "VAF",
  karyotypes = c("1:0", "1:1", "2:0", "2:1", "2:2")
)

Arguments

x

A CNAqc object.

which

One of "VAF", "DP", "NV" or "CCF".

karyotypes

A list of karyotypes in "Major:minor" notation (e.g., "1:1", "2,1", ...) for the plot. By default c("1:0", '1:1', '2:0', '2:1', '2:2') are used.

Value

A ggplot2 plot.

Examples

data('example_dataset_CNAqc', package = 'CNAqc')
x = init(mutations = example_dataset_CNAqc$mutations, cna = example_dataset_CNAqc$cna, purity = example_dataset_CNAqc$purity)

# Default plot
plot_data_histogram(x)

# Customised plots
plot_data_histogram(x, which = 'DP')
plot_data_histogram(x, which = 'DP', karyotypes = '2:2')

# CCF computation and plotting
x = compute_CCF(x)
plot_data_histogram(x, which = 'CCF')

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