plot_piano: Generate Piano Plot

Description Usage Arguments Value Examples

View source: R/plot_piano.R

Description

Generates a piano plot containing copy number variants from multiple samples or callers.

Usage

1
2
3
4
5
6
plot_piano(
  cnv_list,
  chromosomes = c(1:22, "X", "Y"),
  hide_x_lab = TRUE,
  seg.col = c("red", "green", "green3", "blue")
)

Arguments

cnv_list

A named list containing one or more cnv objects. The element names will be used for plotting the facets so they need to be unique. See the examples for usage.

chromosomes

Character vector of chromosomes to plot.

hide_x_lab

Boolean. Should the X axis chromosome position labels be hidden or not?

seg.col

Character vector of colours to use for deletions, amplifications, extreme amplifications and everything else. Default values: red, green , green3, blue.

Value

A piano plot with copy number variant segments across multiple facets per sample or caller:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
cnvkit <- system.file("extdata", "HCC2218_cnvkit-call.cns", package = "pebbles")
facets <- system.file("extdata", "HCC2218_facets_cncf.tsv", package = "pebbles")
titan <- system.file("extdata", "HCC2218_titan.segs.tsv", package = "pebbles")
purple <- system.file("extdata", "HCC2218_purple.cnv.tsv", package = "pebbles")
truth <- system.file("extdata", "HCC2218_truthset_cnv_bcbio.tsv", package = "pebbles")

cn_facets <- prep_facets_seg(facets)
cn_cnvkit <- prep_cnvkit_seg(cnvkit)
cn_titan <- prep_titan_seg(titan)
cn_purple <- prep_purple_seg(purple)
cn_truth <- prep_truth_seg(truth)
cnv_list <- list(truth = cn_truth, cnvkit = cn_cnvkit, facets = cn_facets,
                 purple = cn_purple, titan = cn_titan)

plot_piano(cnv_list)
plot_piano(cnv_list, chromosomes = c(1:10))
plot_piano(cnv_list, seg.col = c("orange", "lightblue", "blue", "pink"))

## End(Not run)

umccr/rock documentation built on Oct. 11, 2020, 8:10 a.m.