Visually summarize copy number distribution either by copy number segment length
or chromosome. Input is a CopyNumber object, genome_build
option will
read from genome_build
slot of object.
show_cn_distribution(
data,
rm_normal = TRUE,
mode = c("ld", "cd"),
fill = FALSE,
scale_chr = TRUE,
base_size = 14
)
a ggplot
object
a CopyNumber object.
logical. Whether remove normal copy (i.e. "segVal" equals 2), default is TRUE
.
either "ld" for distribution by CN length or "cd" for distribution by chromosome.
when mode
is "cd" and fill
is TRUE
, plot percentage instead of count.
logical. If TRUE
, normalize count to per Megabase unit.
overall font size.
Shixiang Wang w_shixiang@163.com
# Load copy number object
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE
))
# Plot distribution
p1 <- show_cn_distribution(cn)
p1
p2 <- show_cn_distribution(cn, mode = "cd")
p2
p3 <- show_cn_distribution(cn, mode = "cd", fill = TRUE)
p3
Run the code above in your browser using DataLab