Set a coverage threshold: any coverage value below this threshold is deemed to be low-coverage. Then set a maximum percent low-coverage loci per sample: any sample with greater than this percentage low-coverage loci is dropped. Note that threshold values can be explored without applying any filtering using the explore_filter_coverage_samples() function.

filter_coverage_samples(
  x,
  min_coverage = 5,
  max_low_coverage = 50,
  replace_low_coverage = FALSE,
  description = "filter samples based on coverage"
)

Arguments

x

object of class mipanalyzer_biallelic or mipanalyzer_multiallelic.

min_coverage

the coverage threshold below which data is deemed to be low-coverage.

max_low_coverage

any sample with more than max_low_coverage percent of low-coverage loci will be dropped.

replace_low_coverage

(Boolean). If TRUE then any remaining low-coverage loci will be replaced with NA.

description

brief description of the filter, to be saved in the filter history.