Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update imports to htslib/samtools/bcftools 1.21 #1310

Merged
merged 4 commits into from
Oct 9, 2024

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