Skip to contents

Estimates the minimum tumor purity based on the lowest MAF among segments tagged as "Include".

Usage

EstimateMinPurity(df)

Arguments

df

A data frame or tibble containing at least the columns MAF and Tag.

Value

Numeric. The estimated minimum tumor purity, or 0 if no suitable segments are found.

Details

Only rows with Tag == "Include" are considered. If the minimum MAF is less than 0.4, the minimum purity is estimated as max((0.5 - min\_MAF) / 0.5 - 0.05, 0). Otherwise, returns 0.

Examples

df <- data.frame(MAF = c(0.3, 0.45, 0.5), Tag = c("Include", "Exclude", "Include"))
EstimateMinPurity(df)
#> [1] 0.35