inspect_segment: Plot VAFs across chromosomes.

View source: R/inspect_segment.R

inspect_segmentR Documentation

Plot VAFs across chromosomes.

Description

Plot VAFs across chromosomes for mutations mapping to clonal simple CNAs. FIlters can be used to subset the data. Every segment has a colour, and maximum 74 segements can be plotted. The plots are split by chromosome and karyotype.

Usage

inspect_segment(
  x,
  chrs = c(paste0("chr", 1:22), "chrX", "chrY"),
  n = 200,
  l = 1000
)

Arguments

x

A CNAqc object.

chrs

The chromosome ids to use (e.g., "chr2"). All are used by default.

n

Disregard chromosomes with less than 'n' mutations mapped.

l

Disregard chromosomes that span less than 'l' nucleotide.

Value

A 'ggplot2' object.

Examples

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

# Deafault segments -- all chromsomes, at least 1KB, at least 200 mapped mutations.
inspect_segment(x)

# Same as above, but only for chromosome 2
inspect_segment(x, chrs = 'chr2', n = 50)

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