View source: R/read_copynumber.R
read_copynumber | R Documentation |
Read absolute copy number profile for preparing CNV signature
analysis. See detail part of sig_tally()
to see how to handle sex to get correct
summary.
read_copynumber(
input,
pattern = NULL,
ignore_case = FALSE,
seg_cols = c("Chromosome", "Start.bp", "End.bp", "modal_cn"),
samp_col = "sample",
add_loh = FALSE,
loh_min_len = 10000,
loh_min_frac = 0.05,
join_adj_seg = TRUE,
skip_annotation = FALSE,
use_all = add_loh,
min_segnum = 0L,
max_copynumber = 20L,
genome_build = c("hg19", "hg38", "T2T", "mm10", "mm9", "ce11"),
genome_measure = c("called", "wg"),
complement = FALSE,
...
)
input |
a |
pattern |
an optional regular expression used to select part of files if
|
ignore_case |
logical. Should pattern-matching be case-insensitive? |
seg_cols |
four strings used to specify chromosome, start position,
end position and copy number value in |
samp_col |
a character used to specify the sample column name. If |
add_loh |
if |
loh_min_len |
The length cut-off for labeling a segment as 'LOH'.
Default is |
loh_min_frac |
When |
join_adj_seg |
if |
skip_annotation |
if |
use_all |
default is |
min_segnum |
minimal number of copy number segments within a sample. |
max_copynumber |
bigger copy number within a sample will be reset to this value. |
genome_build |
genome build version, should be 'hg19', 'hg38', 'mm9' or 'mm10'. |
genome_measure |
default is 'called', can be 'wg' or 'called'. Set 'called' will use called segments size to compute total size for CNA burden calculation, this option is useful for WES and target sequencing. Set 'wg' will use autosome size from genome build, this option is useful for WGS, SNP etc.. |
complement |
if |
... |
other parameters pass to |
a CopyNumber object.
Shixiang Wang w_shixiang@163.com
read_maf for reading mutation data to MAF object.
# Load toy dataset of absolute copynumber profile
load(system.file("extdata", "toy_segTab.RData",
package = "sigminer", mustWork = TRUE
))
cn <- read_copynumber(segTabs,
seg_cols = c("chromosome", "start", "end", "segVal"),
genome_build = "hg19", complement = FALSE
)
cn
cn_subset <- subset(cn, sample == "TCGA-DF-A2KN-01A-11D-A17U-01")
# Add LOH
set.seed(1234)
segTabs$minor_cn <- sample(c(0, 1), size = nrow(segTabs), replace = TRUE)
cn <- read_copynumber(segTabs,
seg_cols = c("chromosome", "start", "end", "segVal"),
genome_measure = "wg", complement = TRUE, add_loh = TRUE
)
# Use tally method "S" (Steele et al.)
tally_s <- sig_tally(cn, method = "S")
tab_file <- system.file("extdata", "metastatic_tumor.segtab.txt",
package = "sigminer", mustWork = TRUE
)
cn2 <- read_copynumber(tab_file)
cn2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.