skills/pysam/references/sources.md
Last researched: 2026-07-23
Skill baseline: pysam 0.24.0, released 2026-04-27, wrapping HTSlib/samtools/bcftools 1.23.1.
Use these sources in priority order when refreshing this skill. Do not assume that the newest standalone HTSlib release is the version embedded in the current pysam wheel.
As of the research date, PyPI identifies 0.24.0 as latest. The 0.24 release notes state:
format_options: Python str values work as documentedpysam.CIGAR_OPSRe-check all of these before changing the version pin.
Use the API reference for signatures and documented defaults. Use the FAQ for iterator lifetime, threading, coordinate, pileup, and quality-editing behavior. Where prose in the older usage guide conflicts with the current API, verify against the 0.24 source/tests and installed runtime.
One known example: a real Python file object exposing fileno() works with
AlignmentFile, while io.BytesIO does not. The API constructor documents
file-object support; the usage guide's broad statement about "true python file
objects" is too general.
Pysam 0.24 wraps the 1.23.1 tool line. Consult manuals matching that line when using dispatchers:
Pysam dispatchers emulate command-line subcommands but capture stdout/stderr.
The pysam usage guide, not only the tool manual, defines catch_stdout,
save_stdout, split_lines, get_messages(), and SamtoolsError.
REF_PATH/REF_CACHEThe older CRAM workflow page describes historical fallback to EBI. For pysam 0.24/HTSlib 1.23 behavior, the 0.24 release notes and matching samtools manual take precedence: implicit EBI lookup is no longer the default.
Use format specifications for coordinate fields, flags, tags, header semantics, binary encodings, and index limits. Use pysam documentation for how those concepts are translated into Python properties.
Parallel web search/extract was used for:
Context7 cross-checked the upstream source documentation for:
No generated research JSON is part of this skill.
When updating:
api.html and the tagged source.