bcftools update ID keeping only string after ';'
1
0
Entering edit mode
2.1 years ago
curious ▴ 890

I have values in ID column of VCF that are like this:

"stringidontwant;stringiwant"

is there some high level way to keep stringiwant but get rid of stringidontwant,

like bcftools annotate --set-id + some command to alter %ID

bcftools • 804 views
ADD COMMENT
1
Entering edit mode
2.1 years ago
 sed 's/^\([^\t]*\t[^\t]*\)\tstringidontwant\t/\1\tstringiwant\t/' in.vcf
ADD COMMENT

Login before adding your answer.

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