Question: Add INFO tag to one VCF if record present in a second VCF
0
gravatar for Sean Davis
4.8 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

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 • 1.9k views
ADD COMMENTlink modified 4.8 years ago by Pierre Lindenbaum124k • written 4.8 years ago by Sean Davis25k
1
gravatar for Pierre Lindenbaum
4.8 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

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 COMMENTlink written 4.8 years ago by Pierre Lindenbaum124k
Please log in to add an answer.

Help
Access

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