Skip to contents

Removes markers that are uninformative or poorly genotyped: those below a minor allele frequency threshold, those called in too few individuals, and optionally those that are monomorphic.

Usage

filterMarkers(x, ...)

# S4 method for class 'BreedingExperiment'
filterMarkers(
  x,
  min_maf = 0.01,
  min_call_rate = 0.9,
  drop_monomorphic = TRUE,
  ...
)

Arguments

x

A BreedingExperiment object.

...

Unused.

min_maf

Minimum minor allele frequency to keep.

min_call_rate

Minimum proportion of individuals with a call.

drop_monomorphic

Drop markers with no variation.

Value

A BreedingExperiment object with fewer rows.

Choosing the thresholds

min_maf and min_call_rate are judgement calls, not constants of nature. Common starting points are a minor allele frequency of 0.01 to 0.05 and a call rate of 0.90 to 0.95. Raise min_maf when the panel is large and the sample small, because a rare allele seen in one or two individuals carries almost no information about relationships but still adds noise; lower it when rare variants are the point of the study. Run this before imputeMarkers(), so that imputation is not asked to rescue markers that should simply be discarded.

Examples

set.seed(1)
be <- simulateBreeding(n_ind = 30, n_marker = 100, missing = 0.05)
nrow(be)
#> [1] 100
nrow(filterMarkers(be, min_maf = 0.05, min_call_rate = 0.9))
#> [1] 90