bcftools update ID keeping only string after ';'
1
0
Entering edit mode
16 months ago
curious ▴ 820

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 • 543 views
ADD COMMENT
1
Entering edit mode
16 months ago
 sed 's/^\([^\t]*\t[^\t]*\)\tstringidontwant\t/\1\tstringiwant\t/' in.vcf
ADD COMMENT

Login before adding your answer.

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