From 1ffb2eefcb446610376c2c2266e3c5be79faaf36 Mon Sep 17 00:00:00 2001 From: David K Jackson Date: Wed, 31 May 2023 13:52:05 +0100 Subject: [PATCH 1/4] Added samtools/htslib/bcftools 1.17 --- CHANGELOG.md | 3 + recipes/bcftools/1.17/build.sh | 11 +++ recipes/bcftools/1.17/meta.yaml | 36 ++++++++++ recipes/htslib/1.17/build.sh | 24 +++++++ recipes/htslib/1.17/meta.yaml | 120 ++++++++++++++++++++++++++++++++ recipes/samtools/1.17/build.sh | 16 +++++ recipes/samtools/1.17/meta.yaml | 65 +++++++++++++++++ 7 files changed, 275 insertions(+) create mode 100644 recipes/bcftools/1.17/build.sh create mode 100644 recipes/bcftools/1.17/meta.yaml create mode 100755 recipes/htslib/1.17/build.sh create mode 100644 recipes/htslib/1.17/meta.yaml create mode 100755 recipes/samtools/1.17/build.sh create mode 100644 recipes/samtools/1.17/meta.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 38cde391..cc64f591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Recipes + - samtools 1.17 + - bcftools 1.17 + - htslib 1.17 #### Features diff --git a/recipes/bcftools/1.17/build.sh b/recipes/bcftools/1.17/build.sh new file mode 100644 index 00000000..69c68710 --- /dev/null +++ b/recipes/bcftools/1.17/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -ex + +n="$CPU_COUNT" + +./configure --prefix="$PREFIX" --with-htslib="$PREFIX" \ + CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib" + +make -j "$n" +make install prefix="$PREFIX" diff --git a/recipes/bcftools/1.17/meta.yaml b/recipes/bcftools/1.17/meta.yaml new file mode 100644 index 00000000..df1e652a --- /dev/null +++ b/recipes/bcftools/1.17/meta.yaml @@ -0,0 +1,36 @@ +{% set version = "1.17" %} # reset build to zero on changing +{% set upstream_version = "1.17" %} +{% set htslib_version = "1.17" %} # Bump build version on change +{% set sha256 = "01f75d8e701d85b2c759172412009cc04f29b61616ace2fa75116123de4596cc" %} + +package: + name: bcftools + version: "{{ version }}" + +about: + home: https://github.com/samtools/bcftools + license: MIT + summary: VCF commands and BCF calling. + +build: + number: 0 + +source: + url: https://github.com/samtools/bcftools/releases/download/{{ upstream_version }}/bcftools-{{ upstream_version }}.tar.bz2 + fn: bcftools-{{ upstream_version }}.tar.bz2 + sha256: {{ sha256 }} + +requirements: + build: + - {{ compiler("c") }} + - make + host: + - libhts-dev =={{ htslib_version }} + - libz-dev + run: + - libhts =={{ htslib_version }} + - libz + +test: + commands: + - bcftools --help diff --git a/recipes/htslib/1.17/build.sh b/recipes/htslib/1.17/build.sh new file mode 100755 index 00000000..bffda6b4 --- /dev/null +++ b/recipes/htslib/1.17/build.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ex + +n="$CPU_COUNT" + +pushd htslib + +autoheader +autoconf + +./configure \ + --prefix="$PREFIX" \ + --with-libdeflate \ + --enable-libcurl \ + --enable-s3 \ + --enable-gcs \ + --enable-plugins \ + CC="$GCC" CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib" + +make -j "$n" AR="$AR" +make install prefix="$PREFIX" +popd + diff --git a/recipes/htslib/1.17/meta.yaml b/recipes/htslib/1.17/meta.yaml new file mode 100644 index 00000000..8ac778de --- /dev/null +++ b/recipes/htslib/1.17/meta.yaml @@ -0,0 +1,120 @@ +{% set version = "1.17" %} # reset build to zero on changing +{% set htslib_rev = "6143086502567c5c4bb5cacb2951f664ba28ed6e" %} + +package: + name: htslib-pkg + version: "{{ version }}" + +about: + home: https://github.com/samtools/htslib + license: MIT + summary: C library for high-throughput sequencing data formats. + +build: + number: 0 + +source: + - git_url: https://github.com/samtools/htslib.git + git_rev: {{ htslib_rev }} + folder: htslib + +requirements: + build: + - {{ compiler("c") }} + - autoconf + - automake + - make + - perl + host: + - libbz2-dev + - libcurl-dev + - libdeflate-dev + - liblzma-dev + - libssl-dev + - libz-dev + run: + - libbz2 + - libcurl + - libdeflate + - liblzma + - libssl + - libz + +outputs: + - name: htslib + version: {{ version }} + requirements: + build: + - {{ compiler("c") }} + - autoconf + - automake + - make + - perl + host: + - libbz2-dev + - libcurl-dev + - libdeflate-dev + - liblzma-dev + - libssl-dev + - libz-dev + run: + - {{ pin_subpackage("libhts", exact=True) }} + - libbz2 + - libcurl + - libdeflate + - liblzma + - libssl + - libz + files: + - bin/bgzip + - bin/htsfile + - bin/tabix + - share/man/man1/htsfile.1 + - share/man/man1/tabix.1 + + - name: libhts + version: {{ version }} + requirements: + build: + - {{ compiler("c") }} + - autoconf + - automake + - make + - perl + host: + - libbz2-dev + - libcurl-dev + - libdeflate-dev + - liblzma-dev + - libssl-dev + - libz-dev + run: + - libbz2 + - libcurl + - libdeflate + - liblzma + - libssl + - libz + files: + - libexec/htslib + - lib/libhts.so* + test: + commands: + - test -h ${PREFIX}/lib/libhts.so + - test -f ${PREFIX}/libexec/htslib/hfile_libcurl.so + + - name: libhts-dev + version: {{ version }} + requirements: + run: + - {{ pin_subpackage("libhts", exact=True) }} + files: + - include/htslib + - lib/libhts.a + - share/man/man5/faidx.5 + - share/man/man5/sam.5 + - share/man/man5/vcf.5 + test: + commands: + - test -f ${PREFIX}/lib/libhts.a + - test -f ${PREFIX}/include/htslib/sam.h diff --git a/recipes/samtools/1.17/build.sh b/recipes/samtools/1.17/build.sh new file mode 100755 index 00000000..ced763db --- /dev/null +++ b/recipes/samtools/1.17/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -ex + +n="$CPU_COUNT" + +autoheader +autoconf + +./configure --prefix="$PREFIX" \ + --with-htslib=system \ + --without-curses \ + CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib" + +make -j "$n" AR="$AR" +make install prefix="$PREFIX" diff --git a/recipes/samtools/1.17/meta.yaml b/recipes/samtools/1.17/meta.yaml new file mode 100644 index 00000000..c0614440 --- /dev/null +++ b/recipes/samtools/1.17/meta.yaml @@ -0,0 +1,65 @@ +{% set version = "1.17" %} # reset build to zero on changing +{% set htslib_version = "1.17" %} + +package: + name: samtools-pkg + version: "{{ version }}" + +about: + home: https://github.com/samtools/samtools + license: MIT + summary: C library for high-throughput sequencing data formats. + +build: + number: 0 + +source: + git_url: https://github.com/samtools/samtools.git + git_rev: 4959cc981ad9725d3c6007687ca372ffcdaa3c80 + +requirements: + build: + - {{ compiler("c") }} + - autoconf + - automake + - make + - perl + host: + - libhts-dev =={{ htslib_version }} + - libz-dev + run: + - libhts =={{ htslib_version }} + - libz + +outputs: + - name: samtools + version: {{ version }} + requirements: + build: + - {{ compiler("c") }} + - autoconf + - automake + - make + - perl + host: + - libhts-dev =={{ htslib_version }} + - libz-dev + run: + - libhts =={{ htslib_version }} + - libz + files: + - bin/ace2sam + - bin/maq2sam-* + - bin/md5* + - bin/plot-ampliconstats + - bin/plot-bamstats + - bin/samtools + - bin/wgsim + - bin/*.pl + - bin/*.py + - share/man/man1/samtools*.1 + - share/man/man1/wgsim.1 + test: + commands: + - echo -e '@HD\tVN:1.0\tSO:unsorted' | samtools view + - samtools --help | grep Version:\ {{ version }}\ \( From 70b9cc1540697036aafedf2aa258716f13d44ccd Mon Sep 17 00:00:00 2001 From: David K Jackson Date: Wed, 31 May 2023 14:19:46 +0100 Subject: [PATCH 2/4] samtools/htslib use autoreconf -i --- recipes/htslib/1.17/build.sh | 3 +-- recipes/samtools/1.17/build.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/htslib/1.17/build.sh b/recipes/htslib/1.17/build.sh index bffda6b4..fc994858 100755 --- a/recipes/htslib/1.17/build.sh +++ b/recipes/htslib/1.17/build.sh @@ -6,8 +6,7 @@ n="$CPU_COUNT" pushd htslib -autoheader -autoconf +autoreconf -i ./configure \ --prefix="$PREFIX" \ diff --git a/recipes/samtools/1.17/build.sh b/recipes/samtools/1.17/build.sh index ced763db..ac0b6841 100755 --- a/recipes/samtools/1.17/build.sh +++ b/recipes/samtools/1.17/build.sh @@ -4,8 +4,7 @@ set -ex n="$CPU_COUNT" -autoheader -autoconf +autoreconf -i ./configure --prefix="$PREFIX" \ --with-htslib=system \ From 4f45d3ea681653f305c3ba24ccfbc7332d2779cd Mon Sep 17 00:00:00 2001 From: mksanger Date: Thu, 1 Jun 2023 18:01:37 +0100 Subject: [PATCH 3/4] Install conda 23.3 to avoid test errors introduced by 23.5 --- .github/workflows/unit-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index bb4c3685..4a0ef784 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,6 +26,7 @@ jobs: - name: "Install dependencies" run: | conda install conda-build pip + conda install conda==23.3 conda-build pip python -m pip install --upgrade pip setuptools wheel pip install -r ./requirements.txt pip install -r ./test-requirements.txt From 2da46bb1cbea022ba74f5e526c1c28c81a2081e4 Mon Sep 17 00:00:00 2001 From: David K Jackson Date: Thu, 1 Jun 2023 21:26:55 +0100 Subject: [PATCH 4/4] GHA: remove repeat install of conda-build --- .github/workflows/unit-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4a0ef784..604cb851 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,7 +25,6 @@ jobs: - name: "Install dependencies" run: | - conda install conda-build pip conda install conda==23.3 conda-build pip python -m pip install --upgrade pip setuptools wheel pip install -r ./requirements.txt