-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of pd3-github:samtools/bcftools into develop
- Loading branch information
Showing
20 changed files
with
202 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Windows/MinGW-W64 CI | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up MSYS2 MinGW-W64 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
update: false | ||
install: >- | ||
mingw-w64-x86_64-toolchain | ||
mingw-w64-x86_64-autotools | ||
mingw-w64-x86_64-curl | ||
mingw-w64-x86_64-libdeflate | ||
mingw-w64-x86_64-tools-git | ||
mingw-w64-x86_64-zlib | ||
mingw-w64-x86_64-bzip2 | ||
mingw-w64-x86_64-xz | ||
- name: Clone htslib | ||
shell: msys2 {0} | ||
run: | | ||
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin" | ||
export MSYSTEM=MINGW64 | ||
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'` | ||
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr | ||
pushd . | ||
cd htslib | ||
autoreconf -i | ||
popd | ||
- name: Compile bcftools | ||
shell: msys2 {0} | ||
run: | | ||
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin" | ||
export MSYSTEM=MINGW64 | ||
autoheader | ||
autoconf -Wno-syntax | ||
./configure --enable-werror | ||
make -j4 | ||
- name: Check bcftools | ||
shell: msys2 {0} | ||
run: | | ||
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin" | ||
export MSYSTEM=MINGW64 | ||
make check | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##INFO=<ID=dst,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID6 N <INS> . PASS src=ID6 | ||
chr1 902 ID5 N <INS> . PASS src=ID5 | ||
chr1 902 ID4 N <INS> . PASS src=ID4 | ||
chr1 902 ID3 N <INS> . PASS src=ID3 | ||
chr1 902 ID2 N <INS> . PASS src=ID2 | ||
chr1 902 ID1 N <INS> . PASS src=ID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##INFO=<ID=dst,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID6 N <INS> . PASS src=ID6;dst=ID6 | ||
chr1 902 ID5 N <INS> . PASS src=ID5;dst=ID5 | ||
chr1 902 ID4 N <INS> . PASS src=ID4;dst=ID4 | ||
chr1 902 ID3 N <INS> . PASS src=ID3;dst=ID3 | ||
chr1 902 ID2 N <INS> . PASS src=ID2;dst=ID2 | ||
chr1 902 ID1 N <INS> . PASS src=ID1;dst=ID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##fileformat=VCFv4.2 | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##INFO=<ID=dst,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID6 N <INS> . PASS src=ID6 | ||
chr1 902 ID5 N <INS> . PASS src=ID5 | ||
chr1 902 ID4 N <INS> . PASS src=ID4 | ||
chr1 902 ID3 N <INS> . PASS src=ID3 | ||
chr1 902 ID2 N <INS> . PASS src=ID2 | ||
chr1 902 ID1 N <INS> . PASS src=ID1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
chr1 902 ID4 N <INS> ID4 | ||
chr1 902 ID2 N <INS> ID2 | ||
chr1 902 ID6 N <INS> ID6 | ||
chr1 902 ID1 N <INS> ID1 | ||
chr1 902 ID3 N <INS> ID3 | ||
chr1 902 ID5 N <INS> ID5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
##fileformat=VCFv4.2 | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##INFO=<ID=dst,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID4 N <INS> . PASS src=ID4 | ||
chr1 902 ID2 N <INS> . PASS src=ID2 | ||
chr1 902 ID6 N <INS> . PASS src=ID6 | ||
chr1 902 ID3 N <INS> . PASS src=ID3 | ||
chr1 902 ID1 N <INS> . PASS src=ID1 | ||
chr1 902 ID5 N <INS> . PASS src=ID5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##fileformat=VCFv4.2 | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID1 A C . . . | ||
chr1 902 ID2 A C . . . | ||
chr1 902 ID3 A C . . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##fileformat=VCFv4.2 | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID3 A C . . . | ||
chr1 902 ID2 A C . . . | ||
chr1 902 ID1 A C . . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID3 A C . . . | ||
chr1 902 ID2 A C . . . | ||
chr1 902 ID1 A C . . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##INFO=<ID=src,Number=1,Type=String,Description=""> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 902 ID1 A C . . . | ||
chr1 902 ID2 A C . . . | ||
chr1 902 ID3 A C . . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* vcfisec.c -- Create intersections, unions and complements of VCF files. | ||
Copyright (C) 2012-2023 Genome Research Ltd. | ||
Copyright (C) 2012-2024 Genome Research Ltd. | ||
Author: Petr Danecek <[email protected]> | ||
|
@@ -460,7 +460,7 @@ static void destroy_data(args_t *args) | |
{ | ||
if ( !args->fnames[i] ) continue; | ||
if ( hts_close(args->fh_out[i])!=0 ) error("[%s] Error: close failed .. %s\n", __func__,args->fnames[i]); | ||
int is_tbi = !args->write_index | ||
int is_tbi = !args->write_index | ||
|| (args->write_index&127) == HTS_FMT_TBI; | ||
if ( args->output_type==FT_VCF_GZ && is_tbi ) | ||
{ | ||
|
@@ -476,8 +476,8 @@ static void destroy_data(args_t *args) | |
free(args->fh_out); | ||
free(args->fnames); | ||
if ( args->fh_sites ) fclose(args->fh_sites); | ||
if ( args->write ) free(args->write); | ||
} | ||
free(args->write); | ||
} | ||
|
||
static void usage(void) | ||
|
@@ -487,7 +487,7 @@ static void usage(void) | |
fprintf(stderr, "Usage: bcftools isec [options] <A.vcf.gz> <B.vcf.gz> [...]\n"); | ||
fprintf(stderr, "\n"); | ||
fprintf(stderr, "Options:\n"); | ||
fprintf(stderr, " -c, --collapse STRING Treat as identical records with <snps|indels|both|all|some|none>, see man page for details [none]\n"); | ||
fprintf(stderr, " -c, --collapse STRING Treat as identical records with <snps|indels|both|all|some|none|id>, see man page for details [none]\n"); | ||
fprintf(stderr, " -C, --complement Output positions present only in the first file but missing in the others\n"); | ||
fprintf(stderr, " -e, --exclude EXPR Exclude sites for which the expression is true\n"); | ||
fprintf(stderr, " -f, --apply-filters LIST Require at least one of the listed FILTER strings (e.g. \"PASS,.\")\n"); | ||
|
@@ -597,6 +597,7 @@ int main_vcfisec(int argc, char *argv[]) | |
else if ( !strcmp(optarg,"all") ) args->files->collapse |= COLLAPSE_ANY; | ||
else if ( !strcmp(optarg,"some") ) args->files->collapse |= COLLAPSE_SOME; | ||
else if ( !strcmp(optarg,"none") ) args->files->collapse = COLLAPSE_NONE; | ||
else if ( !strcmp(optarg,"id") ) args->files->collapse |= BCF_SR_PAIR_ID; | ||
else error("The --collapse string \"%s\" not recognised.\n", optarg); | ||
break; | ||
case 'f': args->files->apply_filters = optarg; break; | ||
|