plot_karyotypes: Plot counts and numbers of clonal simple CNAs.

View source: R/plot_karyotypes.R

plot_karyotypesR Documentation

Plot counts and numbers of clonal simple CNAs.

Description

Plot a barplot for the segments, reporting either their counts of the proportion of genome covered.

Usage

plot_karyotypes(
  x,
  type = "percentage",
  chromosomes = paste0("chr", c(1:22, "X", "Y"))
)

Arguments

x

A CNAqc object.

type

With "percentage", the proportion of genome covered is returned. With "number", the segment counts. In all other cases an erorr is generated.

chromosomes

The chromosome to use for this plot.

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)

# All chromosomes (default)
plot_karyotypes(x)

# Specific chromosomes
plot_karyotypes(x, chromosomes = 'chr3')
plot_karyotypes(x, chromosomes = 'chr13')

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