SNPs and samples are filtered based on the user-specified thresholds. Both the meta, details and the different genotype tables will be affected depending on the filtration conditions.

filter(
  snpdata,
  min_qual = 1000L,
  max_missing_sites = 0.2,
  max_missing_samples = 0.2,
  maf_cutoff = 0.01
)

Arguments

snpdata

An object of class SNPdata

min_qual

An integer that represents the The minimum call quality score. Loci with a quality score below this will be discarded. Default is 1000.

max_missing_sites

A numeric representing the maximum fraction of missing sites above which a sample should be dropped. Default is 0.2.

max_missing_samples

A numeric representing the maximum fraction of missing samples above which a loci should be discarded. Default is 0.2.

maf_cutoff

A numeric representing the minor allele frequency cut-off. Loci with a MAF < maf_cutoff will be discarded.

Value

a filtered SNPdata object

Examples

if (FALSE) { # \dontrun{
 snpdata <- filter(
  snpdata,
  min_qual            = 1000,
  max_missing_sites   = 0.2,
  max_missing_samples = 0.2,
  maf_cutoff          = 0.01
 )
 } # }