Question: No vcf output from vcftools
gravatar for axelwilhelm
6.1 years ago by
axelwilhelm100 wrote:

I thought this command would give me a new vcf file without the individuals in the text file:

`vcftools --gzvcf mergedPF.vcf.gz --remove listPnsToRemoveFromMergedVcf.txt --out filtMergedPTrios`

Instead it gives me an index file and a log file.

I must be missing some obvious point. I want to filter out some individuals from the gvcf file for a new gvcf file. What is the fastest way of doing this? Like vcf-subset?


adding ´--recode´ fixed it but the info field is gone.

´vcf-subset -c pnsToKeepInCpTrio.txt copyPhasedCpTrio.vcf.gz > keptPnsFromCpTrio.vcf´ worked also retaining info.


vcftools remove vcf • 4.0k views
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by axelwilhelm100

Just looked up the manual again, --recode-INFO or --recode-INFO-all might help you. I sure hope you're giving the manual a go before posting a question or reporting an issue.

ADD REPLYlink written 6.1 years ago by RamRS30k

I did, back and forth, missed the obvious and posted here. Sometimes people get dyslexic for what they are searching for. Like having the glasses on the eyebrows while searching for them.

ADD REPLYlink written 6.1 years ago by axelwilhelm100

No worries, as long as you checked the manual. It so happens at times that people just don't care enough to try and solve their problems by themselves before seeking help. I have done it a few times myself way back when.

Anyway. we're here to help you, in more ways than one!

ADD REPLYlink written 6.1 years ago by RamRS30k
gravatar for RamRS
6.1 years ago by
Baylor College of Medicine, Houston, TX
RamRS30k wrote:


vcftools looks at the --recode option to re-write a VCF file. This change should work for you:

vcftools --gzvcf mergedPF.vcf.gz --remove listPnsToRemoveFromMergedVcf.txt --out filtMergedPTrios --recode filtMergedPTrios


ADD COMMENTlink modified 12 months ago • written 6.1 years ago by RamRS30k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1257 users visited in the last hour