merge_calls {CNVgears} | R Documentation

## Merge adjacent CNV with equal Copy Number

### Description

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

### Usage

    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

    # 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")

[Package CNVgears version 1.0.0 Index]