A converter from .bam to .png for specific genomic region.
Project description
BAMsnap
Installation
Prerequisites
- python 3.0+
- [Pillow (Python Imaging Library)][pil] (5.0.0+)
- [pysam][ps] (1.8.1+)
- pyfasta
- numpy
pip install bamsnap
Usage
Simple usage
$ bamsnap -bam test.bam -pos 1:7364529 -out outpath
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
-bamlist BAMLIST list file with bam file paths
-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 title of output file
-out_type {png,jpg,html,image}
output file type
-conf CONF configuration file
-ref REF Reference sequence fasta file (ex. hg19.fa)
-width WIDTH image size : width (unit:px)
-height HEIGHT image size : height (unit:px)
-read_thickness READ_THICKNESS
read width (unit:px)
-read_gap_h READ_GAP_H
read gap height (unit:px)
-read_gap_w READ_GAP_W
read gap width (unit:px)
-draw DRAW plot (default: -draw coverage,heatmap,read )
-margin MARGIN genomic margin size
-center_line CENTER_LINE
draw center line
-no_target_line NO_TARGET_LINE
do not draw target line
-coverage_height COVERAGE_HEIGHT
coverage plot height
-coverage_vaf COVERAGE_VAF
coverage variant allele fraction threshold (unit:%)
-heatmap_height HEATMAP_HEIGHT
coverage heatmap height
-draw_gene DRAW_GENE draw gene structure
-merged_image MERGED_IMAGE
draw a merged plot
-colormap COLORMAP colormap file
-silence don't print any log.
-debug turn on the debugging mode
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bamsnap-0.1.0.tar.gz
(43.4 MB
view details)
Built Distribution
bamsnap-0.1.0-py3-none-any.whl
(16.9 kB
view details)
File details
Details for the file bamsnap-0.1.0.tar.gz
.
File metadata
- Download URL: bamsnap-0.1.0.tar.gz
- Upload date:
- Size: 43.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45e90629980e6f964540eca7c8816b5d2096516d538eb694423103e77191dbc5 |
|
MD5 | 96978d37084f85985cf2a3110b496187 |
|
BLAKE2b-256 | ed721b6bcc48816fed658c9aa96479a9158702b4b464053f644fa4571d90d891 |
Provenance
File details
Details for the file bamsnap-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: bamsnap-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e24c7eb4fe6caeb8310f45e2575ccf01e1cbf68e1065478abc6d55d496f6a83 |
|
MD5 | be068ee9fb964c88378062a661dce3c3 |
|
BLAKE2b-256 | 02544462e8b39f49513fc7ce9d4f7cae9f607cc6f3514bf993603df3f45171b0 |