View source: R/show_cn_group_profile.R
show_cn_group_profile | R Documentation |
Show Summary Copy Number Profile for Sample Groups
show_cn_group_profile(
data,
groups = NULL,
fill_area = TRUE,
cols = NULL,
chrs = paste0("chr", c(1:22, "X")),
genome_build = c("hg19", "hg38", "T2T", "mm10", "mm9", "ce11"),
cutoff = 2L,
resolution_factor = 1L,
force_y_limit = TRUE,
highlight_genes = NULL,
repel = FALSE,
nrow = NULL,
ncol = NULL,
return_plotlist = FALSE
)
data |
a |
groups |
a named list or a column name for specifying groups. |
fill_area |
default is |
cols |
length-2 colors for AMP and DEL. |
chrs |
chromosomes start with 'chr'. |
genome_build |
genome build version, used when |
cutoff |
copy number value cutoff for splitting data into AMP and DEL.
The values equal to cutoff are discarded. Default is |
resolution_factor |
an integer to control the resolution.
When it is |
force_y_limit |
default is |
highlight_genes |
gene list to highlight. have same y ranges. You can also set a length-2 numeric value. |
repel |
if |
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 |
a (list of) ggplot
object.
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE
))
p1 <- show_cn_group_profile(cn)
p1
ss <- unique(cn@data$sample)
p2 <- show_cn_group_profile(cn, groups = list(a = ss[1:5], b = ss[6:10]))
p2
p3 <- show_cn_group_profile(cn,
groups = list(g1 = ss[1:5], g2 = ss[6:10]),
force_y_limit = c(-1, 1), nrow = 2
)
p3
## Set custom cutoff for custom data
data <- cn@data
data$segVal <- data$segVal - 2L
p4 <- show_cn_group_profile(data,
groups = list(g1 = ss[1:5], g2 = ss[6:10]),
force_y_limit = c(-1, 1), nrow = 2,
cutoff = c(0, 0)
)
p4
## Add highlight gene
p5 <- show_cn_group_profile(cn, highlight_genes = c("TP53", "EGFR"))
p5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.