No project description provided
Project description
maptide
Setup
Install via pip
$ pip install maptide
Build from source
Building from source requires the Rust compiler.
Installation instructions for the Rust compiler can be found here: https://www.rust-lang.org/tools/install
Once the Rust compiler is installed:
$ git clone https://github.com/CLIMB-COVID/maptide.git
$ cd maptide/
$ python -m venv env
$ source env/bin/activate
$ pip install --upgrade pip
$ pip install .
Usage
$ maptide -h
usage: maptide [-h] [-v] [-r REGION] [-i INDEX] [-m MAPPING_QUALITY] [-b BASE_QUALITY] [-s] [-d DECIMALS] bam
positional arguments:
bam Path to BAM file
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-r REGION, --region REGION
Region to view, specified in the form CHROM:START-END (default: everything)
-i INDEX, --index INDEX
Path to index (BAI) file (default: </path/to/bam>.bai)
-m MAPPING_QUALITY, --mapping-quality MAPPING_QUALITY
Minimum mapping quality (default: 0)
-b BASE_QUALITY, --base-quality BASE_QUALITY
Minimum base quality (default: 0)
-s, --stats Output additional per-position statistics (default: False)
-d DECIMALS, --decimals DECIMALS
Number of decimal places to display (default: 3)
Frequencies over all positions
$ maptide /path/to/file.bam
Frequencies over a region
$ maptide /path/to/file.bam --region chrom:start-end
If a region is specified, maptide
will check for an index file with the same path as the BAM file, but with .bai
appended on the end (i.e. /path/to/file.bam.bai
).
If an index file does not exist in this location, maptide
will still run anyway, just without an index file.
Index files that do not follow the naming convention /path/to/file.bam.bai
can still be used, but a path to the file needs to be provided:
$ maptide /path/to/file.bam --region chrom:start-end --index /path/to/index.bai
Example in Python
maptide
can be used within Python scripts:
import maptide
data = maptide.query(
"path/to/file.bam",
region="MN908947.3:100-200", # Obtain frequencies only in this region
annotated=True, # Annotate frequencies with their bases A,C,G,T,DS,N
)
chrom = "MN908947.3" # Chosen reference/chromosome in the BAM to access
position = (100, 0) # Position 100, insert 0 (i.e. not an insertion)
# With annotated = True, frequencies are annotated with their bases:
frequencies = data[chrom][position]
print(frequencies) # {'A': 1, 'C': 122, 'G': 0, 'T': 1, 'DS': 13, 'N': 0}
# If annotated = False, frequencies would be a list i.e. [1, 122, 0, 1, 13, 0]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file maptide-0.3.0.tar.gz
.
File metadata
- Download URL: maptide-0.3.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dddba720c3efb092b3affd62c3ed064fd3ec8a4749c0d413be518f6efe54b1b1 |
|
MD5 | bb8d0b0a42fbc2ff4d1725bbc19bfa71 |
|
BLAKE2b-256 | d640d332fc178432aef7c67b86eaf77969b810a280c415b7f13562140e853fea |
File details
Details for the file maptide-0.3.0-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 262.6 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d691b7f1ab37b159abdec4599725d6b5f75260f9c85d9efecf84bd3fc50fd0e6 |
|
MD5 | 9494c500de19a0a064f90cef9cdfd95d |
|
BLAKE2b-256 | 274de6b5bbcb621049032833accb5016190b6c16c9ccdd24f84163e6cab8846f |
File details
Details for the file maptide-0.3.0-cp37-abi3-win32.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-win32.whl
- Upload date:
- Size: 250.8 kB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52219a81be457347ef483fa93c935ab27b37c8ea5badc3c064226a73df958340 |
|
MD5 | 5af4099a4fd126a4b4d56be4fc116c1f |
|
BLAKE2b-256 | e8521a5ec0ce2f42ceb8551f2b9be5deaba46ce2317d7240e2df82d2fdaf249d |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57cfc5672871a4caf43b07456269c9138d697c26c42c9a25ac08de8a16a82936 |
|
MD5 | 45b46e57e58941a105705aad429a7c9a |
|
BLAKE2b-256 | c5782546d4d8d1125e03d5712310ecce831559b8ae657de52459bb82efcd296f |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5885f4d7f47a8f2651c2cb46eae23384fab7751c99d0efa336fa787c736149 |
|
MD5 | 58905a9d443a3ef83a3210d2811fc9ee |
|
BLAKE2b-256 | 9090a740427409140ea8bc413719a6200b05e6a0c4658945e6bdcf2954efc042 |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 183e077d6b13aa2c4857a68394c6ee1de78dff693e3fb828510b9ca0997dd719 |
|
MD5 | fc8128c42688d1ebedcd7b7104ce986a |
|
BLAKE2b-256 | 254009534dbe9fc3bde0001ae18bc40c8b920cd82ee9fe15fe7418abf5730c60 |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e57bdd4dec0f97bc454c441058c4000aadd3964fa79e813c25c851b182372252 |
|
MD5 | b067b591103dfacb60536ce0cb702ca1 |
|
BLAKE2b-256 | c0f6d4add83bd98ad6c1eeae700455302d3a076e6f19f60939442950a3c51990 |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7eb895bd6876e50c4d5e8cc581ba305330dd72a325e7dea0529e0fa4955e22 |
|
MD5 | e92140a57c992513c03c64e09bd728c5 |
|
BLAKE2b-256 | 36acfe9533679e797442c902695265e9adb9a5dd49788bfefb8ee7187e4fe2fb |
File details
Details for the file maptide-0.3.0-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.7+, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb1ea5a71931b2fec1781f6777abf77955b907c7e6d33274048966108838459 |
|
MD5 | 9835b4a2528d8a645402020a079b55ea |
|
BLAKE2b-256 | 5760e4d4f482f1e078c78943ed63034669f90e19da757a4c260b28d2d80318cf |
File details
Details for the file maptide-0.3.0-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 414.3 kB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3456448a8e01c3620f36f67321b61a69ced00b4d7ef6f6da6fcf33277aaec21a |
|
MD5 | b557492124240659fde76350cf8cfd32 |
|
BLAKE2b-256 | f7978817cc89ec02437e7132ff87dd4f83776bc9b1c4a52b85bc5153f1f6e59b |
File details
Details for the file maptide-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: maptide-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 423.5 kB
- Tags: CPython 3.7+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bb032d20c2c1e23369d3d587aff8ec48ce18ce996d8aaaff1ba56bbba8a5d18 |
|
MD5 | 40be625a4584f912a97c23c0d9fad63f |
|
BLAKE2b-256 | eeef9dd7c6dd5adebb1edb40f8c9f2626999cbbc26ffc26a3c1665bfba86495f |