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

filter_coverage_loci(
  x,
  min_coverage = 5,
  max_low_coverage = 50,
  replace_low_coverage = FALSE,
  description = "filter loci 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 locus with more than max_low_coverage percent of low-coverage samples 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.