merge_calls: Merge adjacent CNV with equal Copy Number

Description Usage Arguments Details Value Examples

View source: R/intra_results_merging.R

Description

merge_calls screen the segments of a sample and merge adjacent calls with equal GT if close enough

Usage

1
merge_calls(DT_in, prop = 0.3)

Arguments

DT_in

a data.table in the format of read_results output.

prop

numeric value that multiplied by the length of a call gives the range where adjacent calls are searched.

Details

This function takes a CVNResults object and try to merge adjacent calls (having equal GT and being close enough). It is designed to process one sample at the time and is integrated in the function read_results. It is not suggested to use it stand-alone. The merging is done starting from the larger calls, on adjacent call with equal GT in a range of +/- length*prop, trough several iterations until no more calls can be merged.

Value

a CNVresults, DT_in processing result.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# with merge
DT <- read_results(DT_path = system.file("extdata", "chrs_14_22_cnvs_penn.txt",
package = "CNVgears"), res_type = "file", DT_type = "TSV/CSV", chr_col = "chr",
start_col = "posStart", end_col = "posEnd", CN_col = "CN", samp_ID_col = "Sample_ID",
sample_list = cohort_examples, markers = markers_examples, method_ID = "P")
# without
DT <- read_results(do_merge = FALSE, DT_path = system.file("extdata", "chrs_14_22_cnvs_penn.txt",
package = "CNVgears"), res_type = "file", DT_type = "TSV/CSV", chr_col = "chr",
start_col = "posStart", end_col = "posEnd", CN_col = "CN", samp_ID_col = "Sample_ID",
sample_list = cohort_examples, markers = markers_examples, method_ID = "P")

SinomeM/CNVgears documentation built on Nov. 21, 2021, 5:34 a.m.