cnvOncoPrint: OncoPrint plot for CNV regions

View source: R/population_ranges.R

cnvOncoPrintR Documentation

OncoPrint plot for CNV regions

Description

Illustrates overlaps between CNV calls and genomic features across a sample population.

Usage

cnvOncoPrint(
  calls,
  features,
  multi.calls = .largest,
  top.features = 25,
  top.samples = 100,
  ...
)

Arguments

calls

Either a GRangesList or RaggedExperiment storing the individual CNV calls for each sample.

features

A GRanges object containing the genomic features of interest, typically genes. Feature names are either expected as a meta-column symbol or as the names of the object.

multi.calls

A function. Determines how to summarize the CN state in a CNV region when there are multiple (potentially conflicting) calls for one sample in that region. Defaults to .largest, which assigns the CN state of the call that covers the largest part of the CNV region tested. A user-defined function that is passed on to qreduceAssay can also be provided for customized behavior.

top.features

integer. Restricts the number of features for plotting to features experiencing highest alteration frequency. Defaults to 25. Use -1 to display all features.

top.samples

integer. Restricts the number of samples for plotting to samples experiencing highest alteration frequency. Defaults to 100. Use -1 to display all samples.

...

Additional arguments passed on to ComplexHeatmap::oncoPrint

Value

None. Plots to a graphics device.

Author(s)

Ludwig Geistlinger

See Also

ComplexHeatmap::oncoPrint

Examples


# read in example CNV calls
data.dir <- system.file("extdata", package="CNVRanger")
call.file <- file.path(data.dir, "Silva16_PONE_CNV_calls.csv")
calls <- read.csv(call.file, as.is=TRUE)

# store in a GRangesList
calls <- makeGRangesListFromDataFrame(calls, 
   split.field="NE_id", keep.extra.columns=TRUE)

# three example genes
genes <- c(  "chr1:140368053-140522639:-", 
             "chr2:97843887-97988140:+",
             "chr2:135418586-135422028:-")
names(genes) <- c("ATP2C1", "MAP2", "ACTL8")
genes <- GRanges(genes)

# plot
cnvOncoPrint(calls, genes, top.samples = 25)


waldronlab/CNVRanger documentation built on Nov. 1, 2024, 7:11 a.m.