shabam
A python tool to plot BAM or CRAM sequence reads.
Installation
install cairo if not already installed:
# macOS via conda, or via homebrew (choose one, then set the library path)
conda install cairo pkgconfig
brew install cairo pkg-config
Install shabam:
pip install shabam
The dream
from shabam import seqplot
seqplot('example.bam', chrom='1', start=30243, end=30321,
fastafile='reference.fasta', out='plot.svg')
Plotting options
- shade reads by strand with
by_strand=True - plot multiple sequence files together with a list of paths e.g.
['child.bam', 'mom.bam', 'dad.bam'] - export PDF, PNG, SVG or PS formatted plots with matching filename extensions
Command line version
shabam \
--seqfiles tests/data/example.bam \
--chrom 1 \
--start 30243 \
--end 30321 \
--fastafile tests/data/reference.fasta \
--out plot.svg
Further improvements to the dream
- Use consensus sequence when we don't provide a reference sequence
- Allow custom colors
- Compute proportion of variants at any site
- Plot read depth
- At positions with proportion of variants > threshold, reflect proportion with base colors
- Option to scale plotted base size, currently at 10 pixels per base
- Optionally shade plots deepVariant style:
- red channel: nucleotide
- blue channel: read strand
- green channel: base quality
- alpha: base supports ref or alt
- Flatten vertical plotting in high depth sequence data
- Down-sample reads for extremely high depth sequence data (>1000X)
Credit
Initial cigar parsing code lifted with permission from pybamview.
Metadata
Release files for shabam 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shabam-1.0.0.tar.gz | 10.1 kB | Without provenance | Details for shabam-1.0.0.tar.gz |
Release files / shabam-1.0.0.tar.gz
| Download URL | shabam-1.0.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95afc4dc420c345b93fc8d3d9482d032d8329e4612def0f205999525780c15bb
|
|
BLAKE2b-256 checksum How to use checksums |
10249d4bc77bc708565a8907776c48e94090362702b6e71db5cd0f9fec819aa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for shabam 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.