Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Samtools #24

Merged
merged 3 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes/htslib/1.1/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package:
version: "1.1"

build:
number: 3
number: 5

source:
url: https://github.com/samtools/htslib/archive/1.1.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion recipes/htslib/1.3.1/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package:
version: "1.3.1"

build:
number: 5
number: 7

source:
url: https://github.com/samtools/htslib/releases/download/1.3.1/htslib-1.3.1.tar.bz2
Expand Down
22 changes: 22 additions & 0 deletions recipes/htslib/fix_hwcapasimd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/htscodecs/htscodecs/rANS_static4x16pr.c b/htscodecs/htscodecs/rANS_static4x16pr.c
index b6d5580..43c7792 100644
--- a/htscodecs/htscodecs/rANS_static4x16pr.c
+++ b/htscodecs/htscodecs/rANS_static4x16pr.c
@@ -1018,7 +1018,7 @@ static inline int have_neon() {
#if defined(__linux__) && defined(__arm__)
return (getauxval(AT_HWCAP) & HWCAP_NEON) != 0;
#elif defined(__linux__) && defined(__aarch64__)
- return (getauxval(AT_HWCAP) & HWCAP_ASIMD) != 0;
+ return (getauxval(AT_HWCAP) & 2) != 0;
#elif defined(__APPLE__)
return 1;
#elif defined(__FreeBSD__) && defined(__arm__)
@@ -1028,7 +1028,7 @@ static inline int have_neon() {
#elif defined(__FreeBSD__) && defined(__aarch64__)
u_long cap;
if (elf_aux_info(AT_HWCAP, &cap, sizeof cap) != 0) return 0;
- return (cap & HWCAP_ASIMD) != 0;
+ return (cap & 2) != 0;
#elif defined(_WIN32)
return IsProcessorFeaturePresent(PF_ARM_V8_INSTRUCTIONS_AVAILABLE) != 0;
#else
8 changes: 5 additions & 3 deletions recipes/htslib/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{% set version = "1.16" %}
{% set version = "1.17" %}

package:
name: htslib
version: {{ version }}

build:
number: 0
number: 2
run_exports:
- {{ pin_subpackage('htslib', max_pin='x.x') }}

source:
url: https://github.com/samtools/htslib/releases/download/{{ version }}/htslib-{{ version }}.tar.bz2
sha256: 606b7c7aff73734cf033ecd156f40529fa5792f54524952a28938ca0890d7924
sha256: 763779288c40f07646ec7ad98b96c378c739171d162ad98398868783b721839f
patches:
- fix_hwcapasimd.patch

requirements:
build:
Expand Down
9 changes: 9 additions & 0 deletions recipes/samtools/1.17/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Ensure we run successfully using either conda-forge or defaults ncurses
# (unlike other platforms, the latter does not automatically pull in libtinfo)
CURSES_LIB="-ltinfow -lncursesw"

./configure --prefix=$PREFIX --with-htslib=system CURSES_LIB="$CURSES_LIB"
make all
make install
42 changes: 42 additions & 0 deletions recipes/samtools/1.17/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% set version = "1.17" %}

package:
name: samtools
version: {{ version }}

build:
number: 1

source:
url: https://github.com/samtools/samtools/releases/download/{{ version }}/samtools-{{ version }}.tar.bz2
sha256: 3adf390b628219fd6408f14602a4c4aa90e63e18b395dad722ab519438a2a729

requirements:
build:
- make
- {{ compiler('c') }}
host:
- htslib
- ncurses
- zlib
run:
- htslib
- ncurses
- zlib

about:
home: https://github.com/samtools/samtools
license: MIT
license_file: LICENSE
summary: Tools for dealing with SAM, BAM and CRAM files

test:
commands:
- samtools --help
# test if https protocol works, if it doesnt samtools will fail with "Protocol not supported"
- samtools view 'https://example.com' 2>&1 | grep 'fail to read the header' -q

extra:
identifiers:
- biotools:samtools
- usegalaxy-eu:samtools_flagstat
1 change: 1 addition & 0 deletions recipes/samtools/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ extra:
identifiers:
- biotools:samtools
- usegalaxy-eu:samtools_flagstat