Closed ejgardner-insmed closed 2 months ago
I just added the feature. It should be now possible to do
bcftools annotate -o annotated.vcf -a score.tsv.gz \
-c CHROM,POS,REF,ALT,SCORE,ENST -i'ENST={ENST}' -k input.vcf
The option -k
is required if all sites should be printed, even the ones that did not match the expression, and therefore were not modified.
The above command implicitly matches REF,ALT. If that's not desired, one can run as
bcftools annotate -o annotated.vcf -a score.tsv.gz \
-c CHROM,POS,-,-,SCORE,ENST -i'ENST={ENST}' -k input.vcf
Please try it out
Hello,
Currently, annotate only allows for matching additional fields with the '~' operator for the ID and POS columns. I was wondering if it was possible to allow for matching on additional INFO fields? As an example, I have an annotation that is transcript-specific. Thus a single variant sometimes has two scores, one for the 1st overlapping transcript, the second (or more) for the nth transcript (tsv format):
and I have a variant that is annotated to intersect the 1st transcript (vcf format):
Thus, when running a command like (note the '~'):
I would expect the annotation to be:
I hope this makes sense!