Learn R Programming

sigminer (version 1.0.6)

show_cn_profile: Show Sample Copy Number Profile

Description

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.

Usage

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
)

Arguments

data

a CopyNumber object or a data.frame containing at least 'chromosome', 'start', 'end', 'segVal' these columns.

samples

default is NULL, can be a chracter vector representing multiple samples. If data argument is a data.frame, a column called sample must exist.

show_n

number of samples to show, this is used for checking.

show_title

if TRUE, show title for multiple samples.

chrs

chromosomes start with 'chr'.

genome_build

genome build version, used when data is a data.frame, should be 'hg19' or 'hg38'.

nrow

number of rows in the plot grid when multiple samples are selected.

ncol

number of columns in the plot grid when multiple samples are selected.

return_plotlist

default is FALSE, if TRUE, return a plot list instead of a combined plot.

.call

User should not use it.

Value

a ggplot object or a list

Examples

Run this code
# 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