samples_filter: Filter out samples of a vcfR object based on depth

Description Usage Arguments Value Examples

View source: R/wrap_vcfR.R

Description

Filter out samples of a vcfR object based on depth

Usage

1
2
samples_filter(x, lower_quant = 0.05, stat = "median", filter_bot = TRUE,
  filter_top = FALSE, remove_nonpolymorphs = TRUE)

Arguments

x

A vcfR object

lower_quant

lower quantile to filter by. The top quantile will be 1-lower_quant

stat

Statistic to filter by. Right now, supports "median" to filter on median depth, "mean" to filter on mean depth, or "missingness" to filter on percent missing data.

filter_bot

Omit samples in the bottom quantile

filter_top

Omit samples in the top quantile

remove_nonpolymorphs

After omitting samples, some variants will be nonpolymorphic. These should be removed.

Value

A filtered vcfR object.

Examples

1
ultrafiltered_vcf <- samples_filter(filtered_vcf)

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