Adding a simple tag to VCF Info column
1
0
Entering edit mode
6 months ago
avelarbio46 ▴ 30

Hello everyone! I'm trying to use CNVkit, which uses b-allele frequency to find LoH

For this program, my somatic mutations must be tagged "SOMATIC" in the INFO field.

I have an annotated VCF with my somatic mutations with different tags.

How could I add another flag to my INFO field, after all the tags that are already there?

For example, the header for this new field would be

##INFO=<ID=SOMATIC,Number=0,Type=Flag,Description="Somatic event">

And the value would be

MVSDULK=0,0,0,1,0,0,0;NUM_TOOLS=1;LC=12.4;SOMATIC

My original VCF already had:

MVSDULK=0,0,0,1,0,0,0;NUM_TOOLS=1;LC=12.4

In the INFO field.

Any help is appreciated,

vcf • 412 views
ADD COMMENT
0
Entering edit mode
6 months ago

hum.. something like

awk '/^##/ {print;next;} /^#CHROM/ {printf("##INFO=<ID=SOMATIC,Number=0,Type=Flag,Description=\"Somatic event\">\n");print;next;} {OFS="\t";$8=sprintf("%s;SOMATIC",$8);print;}' in.vcf 

?

ADD COMMENT
0
Entering edit mode

Im going to try that on a minimal example VCF and give a feedback. Thanks

ADD REPLY

Login before adding your answer.

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