Skip to content

Commit c28190b

Browse files
committed
Release 1.15.1
2 parents 580b52c + c2c26c9 commit c28190b

30 files changed

+650
-263
lines changed

.ci_helpers/clone

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ branch=$3
1111

1212
ref=''
1313
[ -n "$branch" ] && ref=$(git ls-remote --heads "$repository" "$branch" 2>/dev/null)
14-
[ -z "$ref" ] && repository='git://github.com/samtools/htslib.git'
14+
[ -z "$ref" ] && repository='https://github.com/samtools/htslib.git'
1515

1616
set -x
1717
git clone --recurse-submodules --shallow-submodules --depth=1 ${ref:+--branch="$branch"} "$repository" "$localdir"

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ timeout_in: 10m
2121
# clone with our own commands too.
2222
clone_template: &HTSLIB_CLONE
2323
htslib_clone_script: |
24-
.ci_helpers/clone "git://github.com/${CIRRUS_REPO_OWNER}/htslib" "${HTSDIR}" "${CIRRUS_BRANCH}"
24+
.ci_helpers/clone "https://github.com/${CIRRUS_REPO_OWNER}/htslib" "${HTSDIR}" "${CIRRUS_BRANCH}"
2525
2626
2727
#--------------------------------------------------

INSTALL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ For the impatient
33

44
The latest source code can be downloaded from github and compiled using:
55

6-
git clone --recurse-submodules git://github.com/samtools/htslib.git
7-
git clone git://github.com/samtools/bcftools.git
6+
git clone --recurse-submodules https://github.com/samtools/htslib.git
7+
git clone https://github.com/samtools/bcftools.git
88
cd bcftools
99
# The following is optional:
1010
# autoheader && autoconf && ./configure --enable-libgsl --enable-perl-filters

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ endif
104104

105105
include config.mk
106106

107-
PACKAGE_VERSION = 1.15
107+
PACKAGE_VERSION = 1.15.1
108108

109109
# If building from a Git repository, replace $(PACKAGE_VERSION) with the Git
110110
# description of the working tree: either a release tag with the same value
@@ -230,12 +230,13 @@ prob1_h = prob1.h $(htslib_vcf_h) $(call_h)
230230
smpl_ilist_h = smpl_ilist.h $(htslib_vcf_h)
231231
vcfbuf_h = vcfbuf.h $(htslib_vcf_h)
232232
abuf_h = abuf.h $(htslib_vcf_h)
233+
dbuf_h = dbuf.h $(htslib_vcf_h)
233234
bam2bcf_h = bam2bcf.h $(htslib_hts_h) $(htslib_vcf_h)
234235
bam_sample_h = bam_sample.h $(htslib_sam_h)
235236

236237
str_finder.o: str_finder.h utlist.h
237238
main.o: main.c $(htslib_hts_h) config.h version.h $(bcftools_h)
238-
vcfannotate.o: vcfannotate.c $(htslib_vcf_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(bcftools_h) vcmp.h $(filter_h) $(convert_h) $(smpl_ilist_h) regidx.h $(htslib_khash_h)
239+
vcfannotate.o: vcfannotate.c $(htslib_vcf_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(bcftools_h) vcmp.h $(filter_h) $(convert_h) $(smpl_ilist_h) regidx.h $(htslib_khash_h) $(dbuf_h)
239240
vcfplugin.o: vcfplugin.c config.h $(htslib_vcf_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) $(bcftools_h) vcmp.h $(filter_h)
240241
vcfcall.o: vcfcall.c $(htslib_vcf_h) $(htslib_kfunc_h) $(htslib_synced_bcf_reader_h) $(htslib_khash_str2int_h) $(bcftools_h) $(call_h) $(prob1_h) $(ploidy_h) $(gvcf_h) regidx.h $(vcfbuf_h)
241242
vcfconcat.o: vcfconcat.c $(htslib_vcf_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_bgzf_h) $(htslib_tbx_h) $(htslib_thread_pool_h) $(bcftools_h)

NEWS

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
## Release 1.15.1 (7th April 2022)
2+
3+
4+
* bcftools annotate
5+
6+
- New `-H, --header-line` convenience option to pass a header line on command line,
7+
this complements the existing `-h, --header-lines` option which requires a file
8+
with header lines
9+
10+
* bcftools csq
11+
12+
- A list of consequence types supported by `bcftools csq` has been added to
13+
the manual page. (#1671)
14+
15+
* bcftools +fill-tags
16+
17+
- Extend generalized functions so that FORMAT tags can be filled as well, for example:
18+
19+
bcftools +fill-tags in.bcf -o out.bcf -- -t 'FORMAT/DP:1=int(smpl_sum(FORMAT/AD))'
20+
21+
- Allow multiple custom functions in a single run. Previously the program would silently
22+
go with the last one, assigning the same values to all (#1684)
23+
24+
* bcftools norm
25+
26+
- Fix an assertion failure triggered when a faulty VCF file with a '-'
27+
character in the REF allele was used with `bcftools norm --atomize`. This
28+
option now checks that the REF allele only includes the allowed characters
29+
A, C, G, T and N. (#1668)
30+
31+
- Fix the loss of phasing in half-missing genotypes in variant atomization (#1689)
32+
33+
* bcftools roh
34+
35+
- Fix a bug that could result in an endless loop or incorrect AF estimate when
36+
missing genotypes are present and the `--estimate-AF -` option was used (#1687)
37+
38+
* bcftools +split-vep
39+
40+
- VEP fields with characters disallowed in VCF tag names by the specification (such as '-'
41+
in 'M-CAP') couldn't be queried. This has been fixed, the program now sanitizes the field
42+
names, replacing invalid characters with underscore (#1686)
43+
44+
145
## Release 1.15 (21st February 2022)
246

347

abuf.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/* The MIT License
22
3-
Copyright (c) 2021 Genome Research Ltd.
3+
Copyright (c) 2021-2022 Genome Research Ltd.
44
55
Author: Petr Danecek <[email protected]>
6-
6+
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal
99
in the Software without restriction, including without limitation the rights
1010
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1111
copies of the Software, and to permit persons to whom the Software is
1212
furnished to do so, subject to the following conditions:
13-
13+
1414
The above copyright notice and this permission notice shall be included in
1515
all copies or substantial portions of the Software.
16-
16+
1717
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1818
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1919
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -117,7 +117,7 @@ void abuf_set(abuf_t *buf, abuf_opt_t key, void *value)
117117
if ( key==INFO_TAG )
118118
{
119119
buf->split.info_tag = *((char**)value);
120-
bcf_hdr_printf(buf->out_hdr,"##INFO=<ID=%s,Number=1,Type=String,Description=\"Original variant. Format: CHR|POS|REF|ALT|USED_ALT_IDX\">",buf->split.info_tag);
120+
bcf_hdr_printf(buf->out_hdr,"##INFO=<ID=%s,Number=1,Type=String,Description=\"Original variant. Format: CHR|POS|REF|ALT|USED_ALT_IDX\">",buf->split.info_tag);
121121
return;
122122
}
123123
if ( key==STAR_ALLELE ) { buf->star_allele = *((int*)value); return; }
@@ -141,7 +141,7 @@ static void _atomize_allele(abuf_t *buf, bcf1_t *rec, int ial)
141141
while ( rlen>1 && alen>1 && ref[rlen-1]==alt[alen-1] ) rlen--, alen--;
142142
int Mlen = rlen > alen ? rlen : alen;
143143

144-
atom_t *atom = NULL;
144+
atom_t *atom = NULL;
145145
int i;
146146
for (i=0; i<Mlen; i++)
147147
{
@@ -374,7 +374,7 @@ static void _split_table_set_info(abuf_t *buf, bcf_info_t *info, merge_rule_t mo
374374
memcpy(buf->tmp2+num_size,missing_ptr,num_size);
375375
else
376376
memcpy(buf->tmp2+num_size,buf->tmp+num_size*iori,num_size);
377-
if ( type==BCF_HT_INT && mode==M_SUM )
377+
if ( type==BCF_HT_INT && mode==M_SUM )
378378
{
379379
uint8_t *tbl = buf->split.tbl + iout*buf->split.nori;
380380
for (i=iori; i<buf->split.nori; i++)
@@ -466,7 +466,10 @@ static void _split_table_set_gt(abuf_t *buf)
466466
error("Out-of-bounds genotypes at %s:%"PRIhts_pos"\n",bcf_seqname(buf->hdr,rec),rec->pos+1);
467467
int ial = _split_table_get_ial(buf,iout,iori);
468468
if ( ial==2 && !star_allele )
469+
{
469470
dst[j] = bcf_gt_missing;
471+
if ( bcf_gt_is_phased(src[j]) ) dst[j] |= 1;
472+
}
470473
else
471474
dst[j] = bcf_gt_is_phased(src[j]) ? bcf_gt_phased(ial) : bcf_gt_unphased(ial);
472475
}
@@ -542,7 +545,7 @@ static void _split_table_set_format(abuf_t *buf, bcf_fmt_t *fmt, merge_rule_t mo
542545
{
543546
int star_allele = _has_star_allele(buf,iout);
544547
bcf1_t *out = buf->vcf[rbuf_kth(&buf->rbuf,iout)];
545-
int ret = 0;
548+
int ret = 0;
546549
if ( len==BCF_VL_FIXED || len==BCF_VL_VAR )
547550
ret = bcf_update_format(buf->out_hdr, out, tag, buf->tmp, nval, type);
548551
else if ( len==BCF_VL_A && type!=BCF_HT_STR )
@@ -707,7 +710,7 @@ void _abuf_split(abuf_t *buf, bcf1_t *rec)
707710
buf->vcf[j] = bcf_dup(rec);
708711
return;
709712
}
710-
for (i=1; i<rec->n_allele; i++)
713+
for (i=0; i<rec->n_allele; i++)
711714
{
712715
if ( _is_acgtn(rec->d.allele[i]) ) continue;
713716
rbuf_expand0(&buf->rbuf, bcf1_t*, buf->rbuf.n+1, buf->vcf);

dbuf.h

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/* The MIT License
2+
3+
Copyright (c) 2022 Genome Research Ltd.
4+
5+
Author: Petr Danecek <[email protected]>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in
15+
all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
THE SOFTWARE.
24+
25+
*/
26+
27+
/*
28+
Simple data buffer
29+
*/
30+
31+
#ifndef __DBUF_H__
32+
#define __DBUF_H__
33+
34+
#include <htslib/hts.h>
35+
36+
typedef struct
37+
{
38+
size_t n,m;
39+
void **dat;
40+
}
41+
dbuf_t;
42+
43+
static inline dbuf_t *dbuf_push(dbuf_t *buf, void *ptr)
44+
{
45+
if ( !buf ) buf = calloc(1,sizeof(dbuf_t));
46+
buf->n++;
47+
hts_expand(void*,buf->n,buf->m,buf->dat);
48+
buf->dat[buf->n-1] = ptr;
49+
return buf;
50+
}
51+
52+
static inline void *dbuf_ith(dbuf_t *buf, int i)
53+
{
54+
return buf->dat[i];
55+
}
56+
57+
static inline size_t dbuf_n(dbuf_t *buf)
58+
{
59+
return buf->n;
60+
}
61+
62+
static inline void dbuf_destroy_free(dbuf_t *buf)
63+
{
64+
int i;
65+
for (i=0; i<buf->n; i++) free(buf->dat[i]);
66+
free(buf->dat);
67+
free(buf);
68+
}
69+
70+
#endif
71+

doc/bcftools.1

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: bcftools
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.16.dev
5-
.\" Date: 2022-02-21
5+
.\" Date: 2022-04-07
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "BCFTOOLS" "1" "2022-02-21" "\ \&" "\ \&"
10+
.TH "BCFTOOLS" "1" "2022-04-07" "\ \&" "\ \&"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -51,7 +51,7 @@ standard input (stdin) and outputs to the standard output (stdout). Several
5151
commands can thus be combined with Unix pipes.
5252
.SS "VERSION"
5353
.sp
54-
This manual page was last updated \fB2022\-02\-21\fP and refers to bcftools git version \fB1.15\fP.
54+
This manual page was last updated \fB2022\-04\-07\fP and refers to bcftools git version \fB1.15.1\fP.
5555
.SS "BCF1"
5656
.sp
5757
The BCF1 format output by versions of samtools <= 0.1.19 is \fBnot\fP
@@ -2177,6 +2177,39 @@ see \fBCommon Options\fP
21772177
.fam
21782178
.fi
21792179
.if n .RE
2180+
.sp
2181+
\fBSupported consequence types\fP
2182+
.sp
2183+
.if n .RS 4
2184+
.nf
2185+
.fam C
2186+
3_prime_utr
2187+
5_prime_utr
2188+
coding_sequence
2189+
feature_elongation
2190+
frameshift
2191+
inframe_altering
2192+
inframe_deletion
2193+
inframe_insertion
2194+
intergenic
2195+
intron
2196+
missense
2197+
non_coding
2198+
splice_acceptor
2199+
splice_donor
2200+
splice_region
2201+
start_lost
2202+
start_retained
2203+
stop_gained
2204+
stop_lost
2205+
stop_retained
2206+
synonymous
2207+
.fam
2208+
.fi
2209+
.if n .RE
2210+
.sp
2211+
See also \c
2212+
.URL "https://ensembl.org/info/genome/variation/prediction/predicted_data.html" "" ""
21802213
.SS "bcftools filter \fI[OPTIONS]\fP \fIFILE\fP"
21812214
.sp
21822215
Apply fixed\-threshold filters.

doc/bcftools.html

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h2 id="_description">DESCRIPTION</h2>
5050
<div class="sect2">
5151
<h3 id="_version">VERSION</h3>
5252
<div class="paragraph">
53-
<p>This manual page was last updated <strong>2022-02-21</strong> and refers to bcftools git version <strong>1.15</strong>.</p>
53+
<p>This manual page was last updated <strong>2022-04-07</strong> and refers to bcftools git version <strong>1.15.1</strong>.</p>
5454
</div>
5555
</div>
5656
<div class="sect2">
@@ -1911,6 +1911,37 @@ <h3 id="csq">bcftools csq <em>[OPTIONS]</em> <em>FILE</em></h3>
19111911
BCSQ=*missense|PER3|ENST00000361923|+|1028M&gt;1028T|7890117T&gt;C</pre>
19121912
</div>
19131913
</div>
1914+
<div class="paragraph">
1915+
<p><strong>Supported consequence types</strong></p>
1916+
</div>
1917+
<div class="listingblock">
1918+
<div class="content">
1919+
<pre>3_prime_utr
1920+
5_prime_utr
1921+
coding_sequence
1922+
feature_elongation
1923+
frameshift
1924+
inframe_altering
1925+
inframe_deletion
1926+
inframe_insertion
1927+
intergenic
1928+
intron
1929+
missense
1930+
non_coding
1931+
splice_acceptor
1932+
splice_donor
1933+
splice_region
1934+
start_lost
1935+
start_retained
1936+
stop_gained
1937+
stop_lost
1938+
stop_retained
1939+
synonymous</pre>
1940+
</div>
1941+
</div>
1942+
<div class="paragraph">
1943+
<p>See also <a href="https://ensembl.org/info/genome/variation/prediction/predicted_data.html" class="bare">https://ensembl.org/info/genome/variation/prediction/predicted_data.html</a></p>
1944+
</div>
19141945
</div>
19151946
<div class="sect2">
19161947
<h3 id="filter">bcftools filter <em>[OPTIONS]</em> <em>FILE</em></h3>
@@ -4988,7 +5019,7 @@ <h2 id="_copying">COPYING</h2>
49885019
</div>
49895020
<div id="footer">
49905021
<div id="footer-text">
4991-
Last updated 2022-02-21 11:43:27 UTC
5022+
Last updated 2022-04-07 16:32:56 +0100
49925023
</div>
49935024
</div>
49945025
</body>

0 commit comments

Comments
 (0)