| filterVCF | R Documentation |
This function will filter a VCF file or vcfR object and export the updated version
filterVCF(
vcf.file,
filter.OD = NULL,
filter.BIAS.min = NULL,
filter.BIAS.max = NULL,
filter.DP = NULL,
filter.MPP = NULL,
filter.PMC = NULL,
filter.MAF = NULL,
filter.SAMPLE.miss = NULL,
filter.SNP.miss = NULL,
ploidy,
output.file = NULL
)
vcf.file |
vcfR object or path to VCF file. Can be unzipped (.vcf) or gzipped (.vcf.gz). |
filter.OD |
Updog filter |
filter.BIAS.min |
Updog filter (requires a value for both BIAS.min and BIAS.max) |
filter.BIAS.max |
Updog filter (requires a value for both BIAS.min and BIAS.max) |
filter.DP |
Total read depth at each SNP filter |
filter.MPP |
Updog filter |
filter.PMC |
Updog filter |
filter.MAF |
Minor allele frequency filter |
filter.SAMPLE.miss |
Sample missing data filter |
filter.SNP.miss |
SNP missing data filter |
ploidy |
The ploidy of the species being analyzed |
output.file |
output file name (optional). If no output.file name provided, then a vcfR object will be returned. |
This function will input a VCF file or vcfR object and filter based on the user defined options. The output file will be saved to the location and with the name that is specified. The VCF format is v4.3
A gzipped vcf file
## Use file paths for each file on the local system
#Temp location (only for example)
output_file <- tempfile()
filterVCF(vcf.file = system.file("iris_DArT_VCF.vcf.gz", package = "BIGr"),
filter.OD = 0.5,
filter.MAF = 0.05,
ploidy = 2,
output.file = output_file)
# Removing the output for the example
rm(output_file)
##The function will output the filtered VCF to the current working directory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.