Skip to content

Commit bb2d7a8

Browse files
committed
Revert "Support dynamic variables read from a tab-delimited annotation file"
This needs more work, didn't realize that the effect of the -c option is to update the target VCF as well, so can't be used simply for matching. For that, probably a new prefix will need to be introduced, but that's already confusing as it is, for example ~ has double meaning. This reverts commit e9bff3f. Switch to branch bt-2151-annotate-ext to see this code.
1 parent e9bff3f commit bb2d7a8

File tree

10 files changed

+184
-582
lines changed

10 files changed

+184
-582
lines changed

NEWS

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33

44
Changes affecting specific commands:
55

6-
* bcftools annotate
7-
8-
- Support dynamic variables read from a tab-delimited annotation file (#2151)
9-
For example, in the two cases below the field 'STR' from the -a file is required to match
10-
the INFO/TAG in VCF. In the first example the alleles REF,ALT must match, in the second
11-
example they are ignored. The option -k is required to output also records that were not
12-
annotated:
13-
14-
bcftools annotate -a ann.tsv.gz -c CHROM,POS,REF,ALT,SCORE,STR -i'TAG={STR}' -k in.vcf
15-
bcftools annotate -a ann.tsv.gz -c CHROM,POS,-,-,SCORE,STR -i'TAG={STR}' -k in.vcf
16-
17-
186
* bcftools consensus
197

208
- Add new --regions-overlap option which allows to take into account overlapping deletions

doc/bcftools.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ Add or remove annotations.
380380
To replace only existing values without modifying missing annotations, use "-TAG".
381381
To match the record also by ID or INFO/END, in addition to REF and ALT, use "~ID" or "~INFO/END".
382382
If position needs to be replaced, mark the column with the new position as "~POS".
383-
Note that this works only for ID and POS, for other fields see the description of *-i* below.
384383
{nbsp} +
385384
{nbsp} +
386385
If the annotation file is not a VCF/BCF, all new annotations must be
@@ -424,17 +423,6 @@ Add or remove annotations.
424423
*-i, --include* 'EXPRESSION'::
425424
include only sites for which 'EXPRESSION' is true. For valid expressions see
426425
*<<expressions,EXPRESSIONS>>*.
427-
{nbsp} +
428-
{nbsp} +
429-
Additionally, the command *bcftools annotate* supports expressions updated from the annotation
430-
file dynamically for each record:
431-
----
432-
# The field 'STR' from the -a file is required to match INFO/TAG in VCF. In the first example
433-
# the alleles REF,ALT must match, in the second example they are ignored. The option -k is required
434-
# to output also records that were not annotated
435-
bcftools annotate -a annots.tsv.gz -c CHROM,POS,REF,ALT,SCORE,STR -i'TAG={STR}' -k input.vcf
436-
bcftools annotate -a annots.tsv.gz -c CHROM,POS,-,-,SCORE,STR -i'TAG={STR}' -k input.vcf
437-
----
438426

439427
*-k, --keep-sites*::
440428
keep sites which do not pass *-i* and *-e* expressions instead of discarding them

0 commit comments

Comments
 (0)