No vcf output from vcftools
1
0
Entering edit mode
9.6 years ago
axelwilhelm ▴ 120

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?

Edit:

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 vcf • 6.2k views
ADD COMMENT
1
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode
9.6 years ago
Ram 43k

Hi,

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

Source: http://vcftools.sourceforge.net/man_latest.html#OUTPUT%20OPTIONS

ADD COMMENT

Login before adding your answer.

Traffic: 3923 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6