I tried it and it works. Thank you for the fast reply!
• 0 views
•
link
Hello,
I have a vcf file that has the following first three columns:
chr1 121 .
chr1 125 .
chr1 127 .
chr2 100 .
how can I change the Column "ID" so that it consists out of CHROM + ID like in the following example:
chr1 121 chr1:121
chr1 125 chr1:125
chr1 127 chr1:127
chr2 100 chr2:100
Thank you all for your help! Max
use bcftools annotate https://samtools.github.io/bcftools/bcftools.html#annotate
-I, --set-id [+]FORMAT
assign ID on the fly. The format is the same as in the query command (see below). By default all existing IDs are replaced. If the format string is preceded by "+", only missing IDs will be set. For example, one can use
I tried it and it works. Thank you for the fast reply!
Log in to answer this question.