Skip to contents

This function splits the input data by chromosome and merges segments or AI rows within each chromosome using either MergeAIRow or MergeSegRow.

Usage

CallMerge(data, AIorSeg, tmp_maf, snpmin, mergeai, mergecov)

Arguments

data

A data frame or tibble containing segment or AI information. Must include a Chromosome column.

AIorSeg

Character string, either "AI" to merge AI rows or "Seg" to merge segments.

tmp_maf

A data frame for use with MergeAIRow. Not used if AIorSeg == "Seg".

snpmin

Numeric. Minimum SNP count required for a segment to be considered as a separate segment.

mergeai

Numeric. Threshold for the difference in MAF (gmm_mean) between adjacent segments to allow merging.

merge_cov

Numeric. Threshold for the difference in segment mean (gmm_mean) between adjacent segments to allow merging.

Value

A data frame or tibble with merged segments or AI rows for each chromosome.

Details

Uses MergeAIRow if AIorSeg == "AI", otherwise MergeSegRow.