Skip to main content

miRNA target site prediction Benchmarks

Installation

miRBench package can be easily installed using pip:

pip install miRBench

Default installation allows access to the datasets. To use predictors and encoders, you need to install additional dependencies.

Dependencies for predictors and encoders

To use miRBench with predictors and encoders, install the following dependencies:

  • numpy
  • biopython
  • viennarna
  • torch
  • tensorflow
  • typing-extensions

To install the miRBench package with all dependencies into a virtual environment, you can use the following commands:

python3.8 -m venv mirbench_venv
source mirbench_venv/bin/activate
pip install miRBench
pip install numpy==1.24.3 biopython==1.83 viennarna==2.7.0 torch==1.9.0 tensorflow==2.13.1 typing-extensions==4.5.0

Note: This installation is for running predictors on the CPU. If you want to use GPU, you need to install version of torch and tensorflow with GPU support.

Examples

List all available datasets

The dataset module is responsible for access to the benchmark datasets described in the miRBench paper.

from miRBench.dataset import list_datasets

list_datasets()
['AGO2_CLASH_Hejret2023',
 'AGO2_eCLIP_Klimentova2022',
 'AGO2_eCLIP_Manakov2022']

Not all datasets are available with all splits. To get available splits, use the full option.

list_datasets(full=True)
{'AGO2_CLASH_Hejret2023': {'splits': ['train', 'test']},
 'AGO2_eCLIP_Klimentova2022': {'splits': ['test']},
 'AGO2_eCLIP_Manakov2022': {'splits': ['train', 'test', 'leftout']}}

Get dataset

from miRBench.dataset import get_dataset_df

dataset_name = "AGO2_CLASH_Hejret2023"
df = get_dataset_df(dataset_name, split="test")
df.head()
gene noncodingRNA label
0 AGATATGTATTCAGCTTGTCTTCAAATACGGCCAAGCAGAAAATGTTTTA CACTGCATTCCTGCTTGGCCCAG 1
1 ATTCCTTGGGGGATGGTTTGGGCCGAATGGGGAGTGGAATATTTGACATT CACTGCATTCCTGCTTGGCCCAG 1
2 TGAATCAACCCACAGAACCCCCTCCTAAACCCGTTTTCCCACCCACTGCT TTGGAGGCGTGGGTTTT 1
3 GGAGTCTGGAGTCAAACCCAGAGCAGCTGCAGGCCATGAGGCACATTGTT AAAGCAAATGTTGGGTGAACGGC 0
4 CAGCTGTGTACAGCGCCATCTCTCTGCCTTCTGTTGCCCCTCACTCACCA AATAGCTCAGAATGTCAGTTCTG 0

Depending on the dataset version, additional annotation columns may be provided (e.g. genomic coordinates, transcript features, conservation scores, etc). These columns are useful for downstream analyses but are not required for model inference.

If you want to get just a path to the dataset, use the get_dataset_path function:

from miRBench.dataset import get_dataset_path

dataset_path = get_dataset_path(dataset_name, split="test")
dataset_path
/home/user/.miRBench/datasets/20540907/AGO2_CLASH_Hejret2023/test/dataset.tsv

List all available tools

from miRBench.predictor import list_predictors

list_predictors()
['CnnMirTarget_Zheng2020',
 'RNACofold',
 'miRNA_CNN_Hejret2023',
 'miRBind_Klimentova2022',
 'TargetNet_Min2021',
 'Seed8mer',
 'Seed7mer',
 'Seed6mer',
 'Seed6merBulgeOrMismatch',
 'TargetScanCnn_McGeary2019',
 'InteractionAwareModel_Yang2024',
 'miRBenchCNN_Manakov',
 'miRBenchCNN_HejretCorrected']

Encode dataset

The encoder module is responsible for encoding data into the format expected by a predictor module. The main function of the module is get_encoder(predictor_name) which returns an instance of an encoder object implemented for a specified predictor. The encoder expects data as a Pandas DataFrame with columns named noncodingRNA and gene. Specifying custom column names is possible when calling the encoder. The returned data format differs for every encoder and is specific to the predictor.

from miRBench.encoder import get_encoder

tool = 'miRBind_Klimentova2022'
encoder = get_encoder(tool)

input = encoder(df)

Get predictions

The predictor module is responsible for predicting miRNA-binding site interaction. The main function of the module is get_predictor(predictor_name) which downloads the specified predictor to /home/user/.miRBench/models/20612339/<predictor_name>/<predictor_file> and returns an instance of the predictor object. The predictor object expects data encoded by a corresponding encoder and returns an array of predictions.

from miRBench.predictor import get_predictor

predictor = get_predictor(tool)

predictions = predictor(input)
predictions[:10]
array([0.6899161 , 0.15220629, 0.07301956, 0.43757868, 0.34360734,
       0.20519172, 0.0955029 , 0.79298246, 0.14150576, 0.05329492],
      dtype=float32)

Citing miRBench

If you use miRBench in your research, please cite the following article:

Sammut, Stephanie, et al. miRBench: novel benchmark datasets for microRNA binding site prediction that mitigate against prevalent microRNA frequency class bias. Bioinformatics 41.Supplement_1 (2025): i542-i551.

Metadata

Release files for miRBench 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miRBench 1.0.3
File Size Uploaded Provenance Actions
mirbench-1.0.3.tar.gz 17.8 kB Without provenance Details for mirbench-1.0.3.tar.gz

Release files / mirbench-1.0.3.tar.gz

Download URL mirbench-1.0.3.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c95cfa9a325356727a10961a7fd4d1edfb3dabb11de909ef9f96165819bba653
BLAKE2b-256 checksum
How to use checksums
f8681f91189958e58d65ba637e6bb6fa5baa04af1dce1d5a440f043202b6cb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for miRBench 1.0.3

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.

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page