Add INFO tag to one VCF if record present in a second VCF
1
0
Entering edit mode
9.3 years ago

I have a VCF file to which I would like to add an INFO flag for every record that is present in another (LARGE) VCF file. There are a number of tools to do filtering and another set of tools that will merge INFO fields from one VCF to another, but this isn't exactly what I need (though the latter could be adapted, I suppose).

The use case is that I am trying to do a simple panel-of-normals filter to a set of somatic variants. Should be simple, I know!

vcf • 2.9k views
ADD COMMENT
1
Entering edit mode
9.2 years ago

I wrote a tool like this https://github.com/lindenb/jvarkit/blob/master/src/main/java/com/github/lindenb/jvarkit/tools/vcfvcf/VcfVcf.java but it's undocumented and I should update this old pre-htsjdk code.

The compilation should be:

ant vcfvcf

It works with a tabix indexed file. A usage would be:

java  -jar `dist/vcfvcf.jar` -H

java -jar  dist/vcfvcf.jar ACF=CONFLICTALT  INFO=TAG1 INFO=TAG2 \
  TABIX=tabix.vcf.gz \
  IN=in.vcf > out.vcf
ADD COMMENT

Login before adding your answer.

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