Python-native end-to-end toolkit for miRNA analysis
Project description
miRNA-Toolkit
miRNA-Toolkit is a Python-native library for end-to-end miRNA analysis, including preprocessing, alignment, quantification, target prediction, disease association, and visualization.
Install name: mirna-toolkit
Import name: mirna_toolkit
Features
- I/O support for FASTQ, FASTA, BAM, and GTF/GFF-oriented workflows.
- Wrappers for FastQC, fastp, Bowtie, HISAT2, and STAR (small-RNA mode).
- Quantification and normalization (TPM, RPM, DESeq2-style size factors).
- Target prediction (seed match + RNAhybrid-style scoring + external connectors).
- Disease association integration (HMDD, miRCancer) and network export.
- Visualization utilities for interaction networks, heatmaps, volcano plots, and pathway enrichment plots.
- Optional ML utilities for classification, feature ranking, and explainability.
- End-to-end reproducible workflow runner (
pipeline.run_end_to_end) and CLI (mirna-toolkit). - Manifest-based batch workflow for multiple samples (
batch.run_batch_workflow). - Retry-aware HTTP connectors with configurable strict mode for robust integrations.
Installation
pip install mirna-toolkit
For local development:
pip install -e .
Optional extras:
pip install -e .[full,dev]
Quick Start
from mirna_toolkit import alignment, quantification, prediction, disease, visualization
bam_file = alignment.bowtie.align("sample.fastq", reference="mirbase.fa")
counts = quantification.counts.from_bam(bam_file, annotation="mirbase.gtf")
normalized = quantification.normalization.tpm(counts)
targets = prediction.targetscan_api.get_targets("hsa-miR-21")
assoc = disease.hmdd.get_associations("hsa-miR-21")
fig = visualization.networks.plot_mirna_targets("hsa-miR-21", targets)
fig.show()
End-to-End Pipeline
from mirna_toolkit.pipeline import PipelineConfig, run_end_to_end
config = PipelineConfig(
fastq_path="sample.fastq",
reference="mirbase_index",
annotation="mirbase.gtf",
output_dir="run_001",
aligner="bowtie",
normalization_method="tpm",
run_qc=True,
trim=True,
)
result = run_end_to_end(config, database_versions={"miRBase": "22.1", "TargetScan": "8.0"})
print(result.metadata_path)
CLI
mirna-toolkit --fastq sample.fastq --reference mirbase_index --annotation mirbase.gtf --output-dir run_001 --aligner bowtie --normalize tpm --run-qc --trim
Helpful CLI topics:
mirna-toolkit help
mirna-toolkit help run
mirna-toolkit help batch
Batch Workflow
Manifest example (samples.csv):
sample_id,fastq_path,reference,annotation,run_qc,trim
s1,s1.fastq,mirbase_index,mirbase.gtf,true,true
s2,s2.fastq,mirbase_index,mirbase.gtf,false,false
Run it with:
mirna-toolkit batch --manifest samples.csv --output-dir batch_runs
Reproducibility
Use mirna_toolkit.utils.versioning.DatabaseVersionTracker to record exact versions/releases of external databases used in analyses.
Status
This repository provides a production-ready scaffold with working core APIs and wrappers. External command wrappers require the corresponding tools (for example, bowtie, fastqc, fastp) to be installed and available on PATH.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mirna_toolkit-0.1.0.tar.gz.
File metadata
- Download URL: mirna_toolkit-0.1.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20536d5d023f164a31ce28996a1863f7a3f5c8fc0e0bef73653c52087984970b
|
|
| MD5 |
52a08ec8471c213a2760a74297140b6f
|
|
| BLAKE2b-256 |
1ec4beaa78106b63ff801ff05c648e34a98e3b3ae3563671b6b6590786ae08e1
|
Provenance
The following attestation bundles were made for mirna_toolkit-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on ShahrozRahman/MiRNA-Toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mirna_toolkit-0.1.0.tar.gz -
Subject digest:
20536d5d023f164a31ce28996a1863f7a3f5c8fc0e0bef73653c52087984970b - Sigstore transparency entry: 1221916170
- Sigstore integration time:
-
Permalink:
ShahrozRahman/MiRNA-Toolkit@266655ee4ee784230b497dbe09bf074be7915770 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShahrozRahman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@266655ee4ee784230b497dbe09bf074be7915770 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mirna_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mirna_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64ea134c7313474bae0d0ee2c1da963632cd9aebef509788b8898feaeb65d5c1
|
|
| MD5 |
fea1a1396c350c1de4efd4360c00035d
|
|
| BLAKE2b-256 |
909b3a1520e8652e01d0d763fd7140bb6cae96e1ff8d2a95e9f0f3fb1af93018
|
Provenance
The following attestation bundles were made for mirna_toolkit-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ShahrozRahman/MiRNA-Toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mirna_toolkit-0.1.0-py3-none-any.whl -
Subject digest:
64ea134c7313474bae0d0ee2c1da963632cd9aebef509788b8898feaeb65d5c1 - Sigstore transparency entry: 1221916193
- Sigstore integration time:
-
Permalink:
ShahrozRahman/MiRNA-Toolkit@266655ee4ee784230b497dbe09bf074be7915770 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShahrozRahman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@266655ee4ee784230b497dbe09bf074be7915770 -
Trigger Event:
release
-
Statement type: