filter_vcf | R Documentation |
Filter a vcfR object
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,
cleanup = TRUE
)
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. |
cleanup |
If TRUE (default), remove temporary VCFs from memory and perform garbage cleanup. Almost necessary for large VCFs (>100 MB) |
top_95_quantile_filter |
Censor the 5th and 95th percentiles of genotype call depth or not. |
A filtered vcfR
object.
filtered_vcf <- filter_vcf(unfiltered_vcf)
filtered_vcf <- filter_vcf(unfiltered_vcf, samples_miss1 = 0.8, samples_miss2 = 0.4, vars_miss = 0.001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.