Skip to main content

Proto is not affiliated with Memorial Sloan Kettering Cancer Center. This toolkit is open source and builds on the implementation produced by this organization. Product names, logos, and trademarks are the property of their respective owners.


hacktrackgnulinux/miranda
hacktrackgnulinux/miranda
[Pentest] miRanda: An miRNA target scanner that aims to predict mRNA targets for microRNAs using dynamic-programming alignment and thermodynamics
12 stars
View repo
MicroRNA targets in Drosophila
Anton J Enright, Bino John, … Debora S Marks
Genome Biology (2003)
Read paper
@article{enright2003microrna,
  title={MicroRNA targets in Drosophila},
  author={Enright, Anton J and John, Bino and Gaul, Ulrike and Tuschl, Thomas and Sander, Chris and Marks, Debora S},
  journal={Genome Biology},
  volume={5},
  number={1},
  pages={R1},
  year={2003},
  doi={10.1186/gb-2003-5-1-r1}
}

@article{hofacker1994fast,
  title={Fast Folding and Comparison of RNA Secondary Structures},
  author={Hofacker, Ivo L and Fontana, Walter and Stadler, Peter F and Bonhoeffer, L. S. and Tacker, Manfred and Schuster, Peter},
  journal={Monatshefte f{\"u}r Chemie},
  volume={125},
  number={2},
  pages={167--188},
  year={1994},
  doi={10.1007/BF00818163}
}
Copy citation
proto-bio/proto-tools/proto_tools/tools/gene_annotation/miranda
View source
Open Notebook
Open notebook
FunctionDescription
run_miranda_scan()Predict microRNA target sites in RNA/DNA sequences using miRanda (complementarity alignment plus … Docs Source
License: miRanda’s own code is licensed under GPL-2.0, and it federates over bundled data sources and components, each under its own license terms.Bundled dependencies, each under its own license:Review each source’s terms before commercial use or redistribution.

Background

microRNAs are short (~22 nt) non-coding RNAs that regulate gene expression by base-pairing with complementary sites in target mRNAs — most often in the 3’ untranslated region (3’UTR) — and directing those transcripts toward translational repression or degradation. Because pairing is only partial in animals and concentrated in a short 5’ “seed” of the microRNA, identifying genuine target sites from sequence alone requires a method tuned to complementarity rather than ordinary sequence identity. miRanda (Enright et al., 2003) addresses this with a two-phase algorithm. First, a Smith-Waterman local alignment scores microRNA-to-target complementarity (rewarding A:U and G:C pairs, and tolerating G:U wobble) instead of identity, with extra weighting on the microRNA’s 5’ seed region to reflect its outsized role in binding. Second, for alignments that clear a score threshold, the bundled ViennaRNA RNAlib (Hofacker et al., 1994) estimates the duplex minimum free energy (ΔG, kcal/mol). Sites that pass both the score and the energy threshold are reported as candidate target sites.

Learning Resources

  • hacktrackgnulinux/miranda (maintained fork) - the source repository, with the canonical command-line flag surface and build instructions.
  • miRBase (Griffiths-Jones et al.) - the reference registry of published microRNA sequences and names, and the standard place to obtain the microRNA queries you scan with.

Tools

miRanda Target Scan (miranda-scan)

Scans one or more microRNA queries against one or more RNA/DNA target sequences and returns, per target, the predicted target sites — each with its complementarity score, ViennaRNA duplex free energy, 1-indexed inclusive coordinates on both strands, percent identity and similarity, and the aligned strings.

API Reference

Source
target_sequences
List[string]
required
RNA/DNA target sequences (mRNA, 3’UTR, genomic) to scan.
mirna_queries
List[string]
required
microRNA query sequences, applied to every target.
mirna_ids
array
Optional microRNA labels (default seq_0, seq_1, …).
Source
score_threshold
integer
default:"50"
Minimum alignment score to report a site (-sc).
energy_threshold
integer
default:"-20"
Maximum duplex free energy in kcal/mol; negative (-en).
scale
number
default:"4.0"
Contrast scaling on the microRNA 5’ seed region (-scale).
gap_open
integer
default:"-8"
Penalty for opening an alignment gap; negative (-go).
gap_extend
integer
default:"-2"
Per-position penalty for extending a gap; negative (-ge).
strict
boolean
default:"True"
Apply strict miRNA:target duplex base-pairing heuristics; -loose when False.
compute_energy
boolean
default:"True"
Compute ViennaRNA free energy; -noenergy when False.
trim
integer
default:"0"
Trim targets to this many nucleotides; 0 disables (-trim).
verbose
integer
default:"0"
Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). True is coerced to 1 and False to 0.
device
string
default:"cpu"
Device to run the tool on.
timeout
integer
default:"600"
Maximum execution time in seconds. None waits indefinitely.
seed
integer
Random seed. When set, tools run reproducibly up to small GPU float noise (see BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
Source
results
List[MirandaSequenceResult]
Per-target results, in input order.

Applications

Use this to nominate candidate microRNA target sites in a transcript before committing to experimental validation. Typical workflows scan a small panel of microRNAs (from miRBase) against a gene’s 3’UTR to rank putative binding sites, or screen one microRNA across a set of candidate target transcripts to shortlist which are most likely regulated.

Usage Tips

  • score_threshold and energy_threshold set the sensitivity-versus-specificity trade-off. Lowering score_threshold below the default of 50 and raising energy_threshold toward 0 from the default of -20 kcal/mol both admit weaker sites and recover more candidates at the cost of more false positives; tighten them in the other direction for high-confidence calls.
  • Disable strict for more sensitivity. strict applies stringent miRNA:target duplex base-pairing heuristics by default; turning it off (-loose) is less conservative and surfaces additional, lower-confidence sites.
  • Disable compute_energy for a much faster score-only scan. compute_energy runs the ViennaRNA free-energy phase by default; turning it off skips that phase entirely (the reported energy is then 0.0), which is useful for quick large-scale complementarity sweeps where ΔG ranking is not yet needed.
  • All reported positions are 1-indexed and inclusive on both the target and the microRNA, matching biological coordinate conventions.

Toolkit Notes

These apply to every miRanda tool in this toolkit (miranda-scan).
  • microRNA queries are user-supplied. miRanda does not ship a microRNA database; obtain query sequences from miRBase (or your own designs) and pass them as mirna_queries.
  • Target sequences should be mRNAs or 3’UTRs, not whole genomes. The aligner builds a query-by-target dynamic-programming matrix, so memory scales with target length. Scan transcript-scale sequences, and use trim to cap very long targets rather than feeding whole chromosomes.
  • Statistical shuffling and Z-scores are not supported in this fork. The randomization-based Z-score significance machinery is non-functional upstream and is not exposed by the wrapper; rank candidates by score and free energy instead.
Example notebook: See the full working example for a copy-paste-ready walkthrough.

Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

Tool Persistence

Keep a tool’s model warm across calls instead of reloading it every invocation.

Device Management

How GPUs are allocated to tools and how to target specific devices.

Parallel Execution

Fan a batch of inputs out across multiple GPUs.

Cloud Inference

Run tools on managed cloud infrastructure with no local setup.