No vcf output from vcftools
1
0
Entering edit mode
8.2 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 • 5.1k views
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.

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.

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.

2
Entering edit mode
8.2 years ago
Ram 37k

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