This function splits the input data by chromosome and merges segments or AI rows within each chromosome using either MergeAIRow or MergeSegRow.
Arguments
- data
A data frame or tibble containing segment or AI information. Must include a
Chromosomecolumn.- 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 ifAIorSeg == "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.
Details
Uses MergeAIRow if AIorSeg == "AI", otherwise MergeSegRow.
