Skip to contents

Determines whether the model source for a segment should be "Coverage", "Diploid", or "Coverage + MAF", based on MAF and segment mean values.

Usage

ModelSource(seg_df, modelminprobes)

Arguments

seg_df

A data frame or tibble containing segment information, including columns: size, FILTER, MAF_Probes, MAF, and Segment_Mean.

modelminprobes

Numeric. minimum number of probes for a segment to include for model decision

Value

Character. One of "Coverage", "Diploid", or "Coverage + MAF".

Details

  • If all segments with sufficient probes have minimum MAF > 0.4 and the maximum absolute segment mean is >= 0.2, returns "Coverage".

  • If all segments with sufficient probes have minimum MAF > 0.4 and the maximum absolute segment mean is < 0.2, returns "Diploid".

  • Otherwise, returns "Coverage + MAF".

Examples

# seg_df must have columns: size, FILTER, MAF_Probes, MAF, Segment_Mean
# ModelSource(seg_df, modelminprobes)