diff --git a/NEWS b/NEWS index 7206b738..42a27192 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ Changes affecting specific commands: - New experimental plugin for scoring variants and assess site noisiness (allelic frequency profiles) from a large number of unaffected parental samples +* bcftools annotate + + - Fix Number in the header definition of transferred FILTER and ID tags (#2335) + * bcftools convert - The command `convert --gvcf2vcf` was not filling the REF allele when BCF was output (#243) diff --git a/test/annotate19.1.out b/test/annotate19.1.out index 87db4898..822bd98b 100644 --- a/test/annotate19.1.out +++ b/test/annotate19.1.out @@ -4,7 +4,7 @@ ##reference=file:///lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta ##FILTER= ##FILTER= -##INFO= +##INFO= ##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 id_id1;id_id2;info_id C T . ori_filter1;ori_filter2 ID=id_id1,id_id2;INFO_ID=info_id diff --git a/test/annotate19.2.out b/test/annotate19.2.out index b5d8d148..df309fbd 100644 --- a/test/annotate19.2.out +++ b/test/annotate19.2.out @@ -5,7 +5,7 @@ ##FILTER= ##FILTER= ##FILTER= -##INFO= +##INFO= ##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . filter_filter FILTER=filter_filter;INFO_FILTER=info_filter diff --git a/test/annotate19.3.out b/test/annotate19.3.out index 0f6984b9..40a6f2e3 100644 --- a/test/annotate19.3.out +++ b/test/annotate19.3.out @@ -4,7 +4,7 @@ ##reference=file:///lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta ##FILTER= ##FILTER= -##INFO= +##INFO= ##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . ori_filter1;ori_filter2 FILTER=filter_filter;INFO_FILTER=info_filter diff --git a/test/annotate19.4.out b/test/annotate19.4.out index ff3556bd..14a43048 100644 --- a/test/annotate19.4.out +++ b/test/annotate19.4.out @@ -4,6 +4,6 @@ ##reference=file:///lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta ##FILTER= ##FILTER= -##INFO= +##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . ori_filter1;ori_filter2 FILTER=ori_filter1,ori_filter2 diff --git a/test/annotate19.5.out b/test/annotate19.5.out index 505efa4d..d6ab1516 100644 --- a/test/annotate19.5.out +++ b/test/annotate19.5.out @@ -4,6 +4,6 @@ ##reference=file:///lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta ##FILTER= ##FILTER= -##INFO= +##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . ori_filter1;ori_filter2 FILTER=filter_filter diff --git a/test/annotate19.6.out b/test/annotate19.6.out index a090a914..18a7d3ad 100644 --- a/test/annotate19.6.out +++ b/test/annotate19.6.out @@ -4,7 +4,7 @@ ##reference=file:///lustre/scratch105/projects/g1k/ref/main_project/human_g1k_v37.fasta ##FILTER= ##FILTER= -##INFO= +##INFO= ##FILTER= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . filter_filter FILTER=ori_filter1,ori_filter2 diff --git a/test/annotate19.7.out b/test/annotate19.7.out index 6b110650..0e845d87 100644 --- a/test/annotate19.7.out +++ b/test/annotate19.7.out @@ -5,6 +5,6 @@ ##FILTER= ##FILTER= ##FILTER= -##INFO= +##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO 1 3000001 ori_id C T . filter_filter FILTER=filter_filter diff --git a/vcfannotate.c b/vcfannotate.c index ae0f9609..b4fb01af 100644 --- a/vcfannotate.c +++ b/vcfannotate.c @@ -1,6 +1,6 @@ /* vcfannotate.c -- Annotate and edit VCF/BCF files. - Copyright (C) 2013-2024 Genome Research Ltd. + Copyright (C) 2013-2025 Genome Research Ltd. Author: Petr Danecek @@ -2414,7 +2414,7 @@ static void init_columns(args_t *args) col->hdr_key_src = strdup(ptr+2); col->hdr_key_dst = strdup(str.s+5); tmp.l = 0; - ksprintf(&tmp,"##INFO=",col->hdr_key_dst); + ksprintf(&tmp,"##INFO=",col->hdr_key_dst); bcf_hdr_append(args->hdr_out, tmp.s); if (bcf_hdr_sync(args->hdr_out) < 0) error_errno("[%s] Failed to update header", __func__); int hdr_id = bcf_hdr_id2int(args->hdr_out, BCF_DT_ID, col->hdr_key_dst); @@ -2672,13 +2672,13 @@ static void init_columns(args_t *args) { // transferring ID column into a new INFO tag tmp.l = 0; - ksprintf(&tmp,"##INFO=",key_dst); + ksprintf(&tmp,"##INFO=",key_dst); } else if ( !strcasecmp("FILTER",key_src) && !explicit_src_info ) { // transferring FILTER column into a new INFO tag tmp.l = 0; - ksprintf(&tmp,"##INFO=",key_dst); + ksprintf(&tmp,"##INFO=",key_dst); } else {