filter_vcf: Filter a vcfR object

Description Usage Arguments Value Examples

Description

Filter a vcfR object

Usage

1
2
3
filter_vcf(x, min_depth = 4, max_depth = 800, min_mq = 20,
  samples_miss1 = 0.9999, samples_miss2 = 0.7, vars_miss = 0.2,
  top_dp_quantile_filter = TRUE, remove_nonpolymorphs = TRUE)

Arguments

x

a vcfR object

min_depth

Minimum depth a genotype call must be to not be censored.

max_depth

Maximum depth a genotype call can be or else it wil be censored.

min_mq

Minimum mapping quality a genotype call can be or else it will be censored.

samples_miss1

Maximum percent missing data a sample can have before it gets omitted. Occurs before variant omission.

samples_miss2

Maximum percent missing data a sample can have before it gets omitted. Occurs after variant omission.

vars_miss

Maximum percent missing data a variant can have before it gets omitted. Occurs after first wave of sample omission.

remove_nonpolymorphs

After removing samples, some variants will no longer be polymorphic. These should be removed to not inflate the true number of variants.

top_95_quantile_filter

Censor the 5th and 95th percentiles of genotype call depth or not.

Value

A filtered vcfR object.

Examples

1
2
filtered_vcf <- filter_vcf(unfiltered_vcf)
filtered_vcf <- filter_vcf(unfiltered_vcf, samples_miss1 = 0.8, samples_miss2 = 0.4, vars_miss = 0.001)

Neato-Nick/mllR documentation built on May 17, 2019, 6:22 p.m.