Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
pysam does not currently export the various wrapper functions in the samtools module, resulting in type-checking errors.
e.g.
45: error: Module has no attribute "faidx" [attr-defined]
I've followed the pattern implemented in the other modules, exporting attributes in a module-specific __all__ declaration and then adding this list to the package's __all__.
I believe this PR addresses the problem, but I'm unable to verify - when I install the updated package locally with pip install -e, mypy cannot find the type stubs for pysam. (As an aside - is there a CONTRIBUTING or other documentation for local install/testing?)
pysam
does not currently export the various wrapper functions in thesamtools
module, resulting in type-checking errors.e.g.
I've followed the pattern implemented in the other modules, exporting attributes in a module-specific
__all__
declaration and then adding this list to the package's__all__
.I believe this PR addresses the problem, but I'm unable to verify - when I install the updated package locally with
pip install -e
,mypy
cannot find the type stubs forpysam
. (As an aside - is there aCONTRIBUTING
or other documentation for local install/testing?)Thanks!