https://github.com/climb-tre/maptide
Base frequencies for BAM files
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Keywords
Repository
Base frequencies for BAM files
Basic Info
Statistics
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 1
- Releases: 5
Topics
Metadata Files
README.md
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-TRE/maptide.git
$ cd maptide/
$ python -m venv .venv
$ source .venv/bin/activate
$ 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: .bai) -m MAPPINGQUALITY, --mapping-quality MAPPINGQUALITY Minimum mapping quality (default: 0) -b BASEQUALITY, --base-quality BASEQUALITY 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:
```python 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]
```
Owner
- Name: CLIMB-TRE
- Login: CLIMB-TRE
- Kind: organization
- Repositories: 2
- Profile: https://github.com/CLIMB-TRE
GitHub Events
Total
- Issues event: 1
- Delete event: 1
- Push event: 9
- Pull request review event: 1
- Pull request event: 5
- Create event: 1
Last Year
- Issues event: 1
- Delete event: 1
- Push event: 9
- Pull request review event: 1
- Pull request event: 5
- Create event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 11 minutes
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 11 minutes
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- BioWilko (1)
Pull Request Authors
- tombch (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- PyO3/maturin-action v1 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/upload-artifact v3 composite
- adler 1.0.2
- autocfg 1.1.0
- bit-vec 0.6.3
- bitflags 1.3.2
- byteorder 1.4.3
- bytes 1.3.0
- cfg-if 1.0.0
- crc32fast 1.3.2
- crossbeam-channel 0.5.6
- crossbeam-utils 0.8.14
- flate2 1.0.25
- hashbrown 0.12.3
- indexmap 1.9.2
- indoc 1.0.8
- lexical-core 0.8.5
- lexical-parse-float 0.8.5
- lexical-parse-integer 0.8.6
- lexical-util 0.8.5
- lexical-write-float 0.8.5
- lexical-write-integer 0.8.5
- libc 0.2.139
- lock_api 0.4.9
- memchr 2.5.0
- memoffset 0.6.5
- miniz_oxide 0.6.2
- noodles 0.31.1
- noodles-bam 0.25.1
- noodles-bgzf 0.18.0
- noodles-core 0.9.0
- noodles-csi 0.12.0
- noodles-fasta 0.17.0
- noodles-sam 0.22.1
- once_cell 1.17.0
- parking_lot 0.12.1
- parking_lot_core 0.9.5
- proc-macro2 1.0.49
- pyo3 0.17.3
- pyo3-build-config 0.17.3
- pyo3-ffi 0.17.3
- pyo3-macros 0.17.3
- pyo3-macros-backend 0.17.3
- quote 1.0.23
- redox_syscall 0.2.16
- rustc-hash 1.1.0
- scopeguard 1.1.0
- smallvec 1.10.0
- static_assertions 1.1.0
- syn 1.0.107
- target-lexicon 0.12.5
- unicode-ident 1.0.6
- unindent 0.1.11
- windows-sys 0.42.0
- windows_aarch64_gnullvm 0.42.0
- windows_aarch64_msvc 0.42.0
- windows_i686_gnu 0.42.0
- windows_i686_msvc 0.42.0
- windows_x86_64_gnu 0.42.0
- windows_x86_64_gnullvm 0.42.0
- windows_x86_64_msvc 0.42.0