This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Vcftools --Geno And --Hwe Filter Options -No Output File Created

I used the following vcftools filter commands --geno and --hwe to filter VCF file

vcftools --vcf sample.vcf --hwe 0.001

vcftools --vcf sample.vcf --geno 0.9

Both created log files named out.log. But could not find the output file. Like for example when we use vcftools --relatedness --vcf generates default output file named out.relatedness

However the log file (out.log) for --geno option has the following lines

File contains 259375 entries and 435 individuals. Applying Required Filters. Filtering sites by allele frequency and call rate After filtering, kept 435 out of 435 Individuals After filtering, kept 197076 out of a possible 259375 Sites Run Time = 41.00 seconds

Any help much appreciated

Thanks, Tinu

vcftools

1 answer

vcftools –vcf sample.vcf –hwe 0.001 --recode

Adding recode option will produce an output file named out.recode.vcf which will have filtered data.

Adam Auton helped by replying to the same question posted in VCFtools help discussions

http://sourceforge.net/mailarchive/forum.php?thread_name=4F2CFD25-89F8-46A3-A97D-0C000870E78C%40gmail.com&forum_name=vcftools-help

To specify the suffix for the output file (instead of "out"), use the --out option

Just using --recode would remove contents from the INFO field

--recode-INFO-all would retains INFO field

Ideally it should be

vcftools --vcf sample.vcf --geno 0.9 --recode --recode-INFO-all --out genotypefiltered_sample

Log in to answer this question.