powered by
Sometimes it is very useful to check details about copy number profile for one or multiple samples. This function is designed to do this job and can be further modified by ggplot2 related packages.
show_cn_profile( data, samples = NULL, show_n = NULL, show_title = FALSE, chrs = paste0("chr", 1:22), genome_build = c("hg19", "hg38"), nrow = NULL, ncol = NULL, return_plotlist = FALSE, .call = FALSE )
a CopyNumber object or a data.frame containing at least 'chromosome', 'start', 'end', 'segVal' these columns.
data.frame
default is NULL, can be a chracter vector representing multiple samples. If data argument is a data.frame, a column called sample must exist.
data
sample
number of samples to show, this is used for checking.
if TRUE, show title for multiple samples.
TRUE
chromosomes start with 'chr'.
genome build version, used when data is a data.frame, should be 'hg19' or 'hg38'.
number of rows in the plot grid when multiple samples are selected.
number of columns in the plot grid when multiple samples are selected.
default is FALSE, if TRUE, return a plot list instead of a combined plot.
FALSE
User should not use it.
a ggplot object or a list
ggplot
list
# NOT RUN { # Load copy number object load(system.file("extdata", "toy_copynumber.RData", package = "sigminer", mustWork = TRUE )) p <- show_cn_profile(cn, nrow = 2, ncol = 1) p # }
Run the code above in your browser using DataLab