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.
a CopyNumber object or a data.frame
containing at least 'chromosome', 'start',
'end', 'segVal' these columns.
default is NULL, can be a chracter vector representing multiple samples. If data
argument
is a data.frame
, a column called sample
must exist.
number of samples to show, this is used for checking.
if TRUE
, show title for multiple samples.
one of NULL
, "s" (for labelling short segments < 1e7)
or "a" (all segments).
chromosomes start with 'chr'.
a position range, e.g. "chr1:3218923-116319008"
. Only data
overlaps with this range will be shown.
genome build version, used when data
is a data.frame
, should be 'hg19' or 'hg38'.
limites for y axis.
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.
a ggplot
object or a list
# 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
# \donttest{
p2 <- show_cn_profile(cn,
nrow = 2, ncol = 1,
position = "chr1:3218923-116319008"
)
p2
# }