Merge multiple vcf files while preserving FILTER information
1
0
Entering edit mode
6.3 years ago
mkulecka ▴ 360

Hello, I have multiple vcf files from different samples. I would like to combine all of the in one file but I would like to preserve information from FILTER field. For example if I have a vcf record which passes the filter in one sample:

chr1 949654 . A G 571.55 PASS

and fails it another

chr1 949654 . A G 571.55 FAILED

I would like a record in vcf file to be something like that

chr1 949654 . A G 571.55 PASS;FAILED

I already tried vcf-merge from http://vcftools.sourceforge.net/ - it just seems to ignore records without the PASS tag and there doesn't seem to be any option to turn that off. I also think that GATK CombineVariants won't do the trick; there's an option to include filtered-out variants but without including all the information from tags.

vcf merge variants • 2.8k views
ADD COMMENT
0
Entering edit mode
6.3 years ago
Ram 43k

bcftools merge's -F should be useful here. https://samtools.github.io/bcftools/bcftools.html

I've seen that bcftools and vcftools together can address almost any need we may have with VCF files.

ADD COMMENT
0
Entering edit mode

Unfortunately it doesn't preserve information on all filters - it can mark variant only as PASS or FAILED but not both, if ti passes a filter in one sample but not the other.

ADD REPLY

Login before adding your answer.

Traffic: 3178 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