View source: R/plot_segments.R
plot_segments | R Documentation |
CNAqc can plot genome-wide segments showing major and minor allele counts as red and blue bars. Bottom circles annotate breakpoints; by default this plot has limited y-axis and breakpoints for segments outside the plot (e.g. very high amplifications) are in black. Areas in the genome that are mapped to the most prevalent karyotype are shadowed by default. Note that the colour scheme in CNAqc is fixed for certain segments. The colour scheme is adopted also for other information, e.g., to report the segment where a certain driver is mapped. A circular layout for this plot is also available, and total copy numbers can also be plot.
Note that two distinct colour schemas distinguish clonal and subclonal segments.
plot_segments(
x,
chromosomes = paste0("chr", c(1:22, "X", "Y")),
max_Y_height = 6,
circular = FALSE,
cn = "absolute",
highlight = x$most_prevalent_karyotype,
highlight_QC = FALSE,
...
)
x |
A CNAqc object. |
chromosomes |
The chromosome to plot. |
max_Y_height |
Maximum height for the Y-axis of the plot. Segments witht total copy
number (Major plus minor) above |
circular |
Uses a circular layout in polar coordinates to make the segments look like a circos plot. This visualisation can save space. |
cn |
Type of copy number segment to show on the plot. Either |
highlight |
A list of karyotype ids in |
highlight_QC |
Similar to |
... |
Extra parameters passed to the hidden function |
A ggplot2
plot.
data('example_dataset_CNAqc', package = 'CNAqc')
x = init(mutations = example_dataset_CNAqc$mutations, cna = example_dataset_CNAqc$cna, purity = example_dataset_CNAqc$purity)
# Default view, works for most cases
plot_segments(x)
# A subset of chromosomes
plot_segments(x, chromosomes = 'chr13')
# Total CNAs
plot_segments(x, cn = 'total')
# Shadows all simple clonal CNAs
plot_segments(x, highlight = c('1:0', '1:1', '2:0', '2:1', '2:2'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.