BAMsnap
BAMSNAP is high-performed command-based visualization tool for the aligned BAM file.
Installation
Prerequisites
- python 3.4+
- [Pillow (Python Imaging Library)][pil] (5.0.0+)
- [pysam][ps] (1.8.1+)
- pyfaidx
- pytabix
Install with pip
pip install bamsnap
Install with github
git clone https://github.com/parklab/bamsnap
cd bamsnap
python setup.py install
Usage
Simple usage
$ bamsnap -bam test.bam -pos 1:7364529 -out test.png
Options
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-bam [BAM [BAM ...]] bam file(s)
-bamlist BAMLIST list file with bam file paths
-title [TITLE [TITLE ...]]
title (name) of bam file(s)
-pos [POS [POS ...]] genomic position (ex. 1:816687-818057, 12:7462545)
-vcf VCF list file with genomic positions with VCF format
-bed BED list file with genomic positions with BED format
-out OUT output file or title of output file
-imagetype IMAGETYPE output file type
-conf CONF configuration file
-ref REF Reference sequence fasta file (ex. hg19.fa)
-save_image_only save image only
-image_dir_name IMAGE_DIR_NAME
image directory name
-draw [DRAW [DRAW ...]]
plot (default: -draw coordinates bamplot base gene)
-bamplot [BAMPLOT [BAMPLOT ...]]
plot (default: -bamplot coverage base read)
-width WIDTH image file size : width (unit:px)
-height HEIGHT image file size : height (unit:px)
-bgcolor BGCOLOR background color
-plot_margin_top PLOT_MARGIN_TOP
top margin size of plot
-plot_margin_bottom PLOT_MARGIN_BOTTOM
bottom margin size of plot
-plot_margin_left PLOT_MARGIN_LEFT
left margin size of plot
-plot_margin_right PLOT_MARGIN_RIGHT
right margin size of plot
-border draw border in plot
-read_thickness READ_THICKNESS
read thickness (unit:px)
-read_gap_height READ_GAP_HEIGHT
read gap height (unit:px)
-read_gap_width READ_GAP_WIDTH
read gap width (unit:px)
-read_bgcolor READ_BGCOLOR
read background color
-read_color READ_COLOR
read color
-read_pos_color READ_POS_COLOR
positive strand read color
-read_neg_color READ_NEG_COLOR
negative strand read color
-read_group READ_GROUP
read group
-margin MARGIN genomic margin size
-center_line draw center line
-no_target_line do not draw target line
-base_fontsize BASE_FONTSIZE
font size of base plot
-base_height BASE_HEIGHT
base plot height
-base_margin_top BASE_MARGIN_TOP
top margin size of base plot
-base_margin_bottom BASE_MARGIN_BOTTOM
bottom margin size of base plot
-coverage_height COVERAGE_HEIGHT
coverage plot height
-coverage_fontsize COVERAGE_FONTSIZE
coverage font size
-coverage_vaf COVERAGE_VAF
coverage variant allele fraction threshold (default:
0.2)
-coverage_color COVERAGE_COLOR
coverage color
-coverage_bgcolor COVERAGE_BGCOLOR
coverage plot background color
-heatmap_height HEATMAP_HEIGHT
coverage heatmap height
-heatmap_bgcolor HEATMAP_BGCOLOR
coverage heatmap plot background color
-no_title do not draw label.
-gene_height GENE_HEIGHT
gene plot height
-gene_fontsize GENE_FONTSIZE
font size of gene plot
-gene_pos_color GENE_POS_COLOR
positive strand color
-gene_neg_color GENE_NEG_COLOR
negative strand color
-coordinates_height COORDINATES_HEIGHT
coordinate height
-coordinates_fontsize COORDINATES_FONTSIZE
coordinate font size
-coordinates_axisloc COORDINATES_AXISLOC
coordinate axis location
-coordinates_bgcolor COORDINATES_BGCOLOR
coordinate background color
-coordinates_labelcolor COORDINATES_LABELCOLOR
coordinate label color
-separated_bam draw a plot for each bam
-title_fontsize TITLE_FONTSIZE
font size of title
-debug turn on the debugging mode
-silence don't print any log.
Examples
bamsnap -bam data/test11.bam -pos 1:715348 -out data/ex1
bamsnap -bam data/test11.bam -bed data/region.bed -out data/ex2
bamsnap -bamlist data/bamlist.txt -pos 1:817187 1:817848 -out data/ex3
bamsnap -bamlist data/bamlist.txt -bed data/region2.bed -out data/ex4
bamsnap -bam data/test11.bam -pos 1:715348 -out data/ex1 -draw_gene
Metadata
Release files for bamsnap 0.2.4
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 |
|---|---|---|---|---|
| bamsnap-0.2.4.tar.gz | 20.7 MB | Without provenance | Details for bamsnap-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bamsnap-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for bamsnap-0.2.4-py3-none-any.whl |
Total release size: 41.3 MB
Release files / bamsnap-0.2.4.tar.gz
| Download URL | bamsnap-0.2.4.tar.gz |
|---|---|
| Size | 20.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c63d8ee036d7d500cf2a4ccfc642aa146b3e0f9961e2e55d2ba0dd7a8c890b01
|
|
BLAKE2b-256 checksum How to use checksums |
96d5d85c970f6a2d1d655934de96e6ff30b6984ef08da8a4f1004123402869ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|
Release files / bamsnap-0.2.4-py3-none-any.whl
| Download URL | bamsnap-0.2.4-py3-none-any.whl |
|---|---|
| Size | 20.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdf40179d7715c949d53f01c41e94fd97186787b74c6de54bf45552867a2aaac
|
|
BLAKE2b-256 checksum How to use checksums |
dacfa3ceadd84d071a0fe00ebc39f6ed08c39ee3aed04a8e2b113c802a4470bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|
Security for bamsnap 0.2.4
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.