Pysam is a python module for reading and manipulating files in the
SAM/BAM format. The SAM/BAM format is a way to store efficiently large
numbers of alignments (
Li 2009_), such as those routinely created by
next-generation sequencing methods.
Pysam is a lightweight wrapper of the samtools C-API. Pysam also includes an interface for tabix.
If you are using the conda packaging manager (e.g. miniconda or anaconda),
you can install pysam from the
bioconda channel <https://bioconda.github.io/>_::
conda config --add channels defaults conda config --add channels conda-forge conda config --add channels bioconda conda install pysam
Installation through bioconda is the recommended way to install pysam as it resolves non-python dependencies and uses pre-configured compilation options. Especially for OS X this will potentially save a lot of trouble.
The current version of pysam wraps 3rd-party code from htslib-1.13, samtools-1.13, and bcftools-1.13.
Pysam is available through
pypi <https://pypi.python.org/pypi/pysam>_. To install, type::
pip install pysam
Pysam documentation is available
Questions and comments are very welcome and should be sent to the
pysam user group <http://groups.google.com/group/pysam-user-group>_
.. |docs| image:: https://readthedocs.org/projects/pysam/badge/?version=latest :alt: Documentation Status :scale: 100% :target: https://pysam.readthedocs.org/en/latest/?badge=latest