Skip to content

Conversation

@jmarshall
Copy link
Member

@jmarshall jmarshall commented Oct 9, 2024

Import upstream htslib/samtools/bcftools 1.21. Significant additional considerations:

  • In samtools/bamtk.c, remove fclose(stdout) as the pysam wrapper will reuse this file handle. The tests will fail on Linux if this stdout-closing is left in.

  • Also import config.{guess,sub} for HTSlib, required now that configure has been generated with autoconf 2.72. And add them to MANIFEST.in.

  • Continue to take care to preserve removing the regeneration of htscodecs.mk from htslib/Makefile.

  • Fix TestHeaderWriteRead test case: In v1.21+ HTSlib's CRAM implementation rejects mapped reads at pos -1.

Fix import prevention for HTSlib utilities and prevent importing
the new htslib/annot-tsv.c utility and the hts_probe_cc.sh script.
Also import config.{guess,sub} for HTSlib, required now that configure
has been generated with autoconf 2.72.

In samtools/bamtk.c, remove `fclose(stdout)` as the pysam wrapper will
reuse this file handle.
In v1.21+ HTSlib's CRAM implementation rejects mapped reads at pos -1.
Make the test case's read unmapped to avoid this, and tidy up the tmpfile
handling (which was commented out previously in some checked-in tmp code).
For each package:

rm -rf htslib;   python3 devtools/import.py htslib   .../htslib-1.21
rm -rf samtools; python3 devtools/import.py samtools .../samtools-1.21
rm -rf bcftools; python3 devtools/import.py bcftools .../bcftools-1.21

Take care to preserve the #define additions to bcftools/regidx.h.
(Don't bother adding {sam,bcf}tools/htslib-1.21/{LICENSE,**/README}.)

Also take care to preserve removing the regeneration of htscodecs.mk
from htslib/Makefile.
@jmarshall jmarshall merged commit f431911 into pysam-developers:master Oct 9, 2024
12 checks passed
@jmarshall jmarshall deleted the import-1.21 branch October 9, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant