Modular Override Guide
Design Philosophy
siRNAforge uses a single canonical species selector (--species) that automatically maps to all off-target analysis layers:
# All formats work - automatically normalized to canonical names
sirnaforge workflow TP53 --species human,mouse,rat
sirnaforge workflow TP53 --species hsa,mmu,rno # miRBase codes
sirnaforge workflow TP53 --species "Homo sapiens,Mus musculus,Rattus norvegicus"
Automatic Normalization: Species names are intelligently converted to canonical form (human, mouse, rat, etc.) regardless of input format:
Common names:
human,mouse,macaque,rhesusmiRBase codes:
hsa,mmu,rno,mml,gga,sscScientific names:
Homo sapiens,Mus musculus,Rattus norvegicus
This single parameter drives:
miRNA database lookups → MirGeneDB/miRBase queries for all specified species
Transcriptome fetching → Automatic Ensembl cDNA downloads for available species
Report aggregation → Consolidated off-target summaries across species
You can surgically override any layer without affecting others.
Default Behavior
Without Any Overrides
sirnaforge workflow TP53
What happens:
Species: Uses
DEFAULT_MIRNA_CANONICAL_SPECIES(5 species: chicken, rat, mouse, human, rhesus)miRNA Database: MirGeneDB lookups for all 5 species
Transcriptome: Ensembl cDNA auto-fetched for 4 species (human, mouse, rat, macaque)
Genomic DNA: never. siRNA acts on mRNA, so screening is transcriptome-only (#99)
Surgical Overrides
Override miRNA Species Only
# Use human species everywhere, but only check rat miRNAs
sirnaforge workflow TP53 \
--species human \
--mirna-species rno
Result: Human transcriptome + rat miRNA database
Override Transcriptome Reference
# Custom transcriptome for human analysis
sirnaforge workflow TP53 \
--species human \
--transcriptome-fasta /path/to/custom_transcripts.fa
Options for --transcriptome-fasta:
Pre-configured source:
ensembl_human_cdna,ensembl_mouse_cdna, etc.Local file:
/path/to/transcripts.faRemote URL:
https://ftp.ensembl.org/.../cdna.fa.gz
The system automatically:
Downloads remote files to cache
Decompresses
.gzarchivesReuses valid cached BWA-MEM2 indices, or builds missing indices through the selected Nextflow provider
Reuses pipeline-built indices through the Nextflow work cache / resume
Multiple Explicit References
Provide comma-separated, species-labelled references to select them explicitly:
sirnaforge workflow TP53 \
--transcriptome-fasta human:/data/human_cdna.fa,mouse:/data/mouse_cdna.fa
This replaces automatic defaults. To add custom sequences to one species’ reference, concatenate those sequences into that species’ FASTA before indexing; do not label a mixed-species reference as one organism. New indices are built by the selected Nextflow provider, using the same runtime as alignment. See execution modes.
Override BWA Indices Directly
Skip automatic fetching and use cDNA indices you have already built:
sirnaforge workflow TP53 \
--transcriptome-indices human:/data/hs_cdna_index,mouse:/data/mm_cdna_index
Format: species:/absolute/path/to/index_prefix (--offtarget-indices is the same option)
Effect: replaces automatic transcriptome reference selection with the provided indices. No default
Ensembl transcriptome is fetched. If you also supply --transcriptome-fasta, that explicit reference
is screened alongside the indices. --species / --mirna-species still control the miRNA layer.
Requirement: the cDNA FASTA the index was built from must be readable as plain text beside the
prefix (the prefix itself, or <prefix>.fa/.fasta/.fna; a gzipped or binary neighbour does not
count). Hits are resolved to genes from its headers, so a species whose sequence cannot be read is
reported unscreened, with the reason, rather than screened against something nothing can
classify. The species you name here is the label that reference carries, and it must be one the
registry recognises — the same set --species accepts.
Advanced Use Cases
Custom miRNA Database (Not Recommended)
The miRNA system doesn’t currently support custom FASTA override via CLI, but you can:
Use the API directly with
MiRNADatabaseManager.get_custom_database()(undocumented)Add sequences to cache by placing files in
~/.cache/sirnaforge/mirna/Request the feature if this is a common workflow
Why discouraged? miRNA databases use species-specific three-letter codes (e.g., hsa, mmu) and specialized filtering. Using canonical sources (MirGeneDB, miRBase) ensures consistency.
Design-Only Mode
Skip all off-target analysis:
sirnaforge design transcripts.fasta --top-n 50
Result: Generates candidates_all.csv and candidates_pass.csv with thermodynamic scores only.
Genomic DNA Off-Target
Not available, by design. siRNA and miRNA guides act on mRNA, so the transcriptome is the correct
reference for on- and off-target alike; naming a genomic assembly (for example
ensembl_human_hg38_primary) for a screen is refused before anything is downloaded. Genomic search
belongs to sirnaforge zfn, which targets DNA.
Override Hierarchy
When multiple parameters affect the same resource:
Explicit references replace automatic transcriptome selection:
--transcriptome-indicessuppresses default downloads.--transcriptome-fastaalso replaces defaults; if both are supplied, both explicit references are screened.miRNA overrides are independent:
--mirna-speciesdoesn’t affect transcriptomesDefaults are smart: System auto-detects what’s available (e.g., only four of the default species have Ensembl cDNA)
Example: Mixed Override
sirnaforge workflow TP53 \
--species human,mouse,rat,macaque \
--mirna-species hsa,mmu,rno,mml,gga,ssc \
--transcriptome-fasta /custom/human_isoforms.fa \
--transcriptome-indices mouse:/data/mm_cdna,rat:/data/rn_cdna
Interpretation:
Canonical species: 4 (human, mouse, rat, macaque)
miRNA checks: 6 species (includes chicken, pig)
Transcriptome: Custom human file (replaces default Ensembl human cDNA)
Prebuilt indices: Custom mouse/rat cDNA indices (replaces Ensembl-fetched)
Macaque: Falls back to default Ensembl behavior (no override)
Cache Management
All fetched resources are cached:
~/.cache/sirnaforge/
├── transcriptomes/ # Ensembl cDNA + BWA indices
├── mirna/ # MirGeneDB/miRBase FASTA files
├── nextflow/ # Pipeline work directories
└── cache.json # Metadata (TTL, checksums, URLs)
View Cache Status
sirnaforge cache list
Clear Stale Data
sirnaforge cache clear --older-than 90
Common Workflows
1. Human-Only Analysis (Fast)
sirnaforge workflow TP53 --species human --top-n 20
2. Multi-Species Comparative
sirnaforge workflow TP53 --species human,mouse,rat,macaque --top-n 50
3. Custom Transcriptome + Standard miRNA
sirnaforge workflow CUSTOM_GENE \
--input-fasta my_isoforms.fa \
--transcriptome-fasta my_isoforms.fa \
--species human
Why repeat the file?
--input-fasta: Skips gene search, uses these sequences for siRNA design--transcriptome-fasta: Uses these sequences for off-target checking
4. Pre-Indexed Transcriptomes (Production)
sirnaforge workflow BRCA1 \
--transcriptome-indices \
human:/mnt/refs/hs_cdna,\
mouse:/mnt/refs/mm_cdna,\
rat:/mnt/refs/rn_cdna
Troubleshooting
“No transcriptome data for species X”
Cause: Only 4 species have pre-configured Ensembl sources (human, mouse, rat, macaque)
Solution: Provide custom FASTA via --transcriptome-fasta
“Species not recognized” or “Invalid species code”
Cause: Rare - species not in registry Solution: Species names are auto-normalized. Supported formats include:
Common names:
human,mouse,rat,macaque,chicken,pigmiRBase codes:
hsa,mmu,rno,mml,gga,sscScientific names:
Homo sapiens,Mus musculus,Rattus norvegicus
If you encounter this error, verify spelling or check src/sirnaforge/data/species_registry.py for supported species.
“BWA index not found”
Cause: Automatic index building failed or was interrupted
Solution: Check cache dir permissions, re-run with --force-refresh, or provide --transcriptome-indices
Custom FASTA not detected
Cause: System treats URLs/paths as single sources Solution: Use comma-separated list (future feature) or concatenate files manually
Implementation Notes
Current Limitations
Additive transcriptomes: Not yet exposed via CLI (internal support exists)
Custom miRNA FASTA: No direct CLI override (use cache manipulation)
Genomic DNA: out of scope for siRNA/miRNA screening
Future Enhancements
Comma-separated
--transcriptome-fastafor additive mode--custom-mirnaparameter accepting FASTA files--add-sequencefor on-the-fly contig injection
Species Normalization
siRNAforge automatically normalizes species names to canonical form (human, mouse, rat, macaque, chicken, pig) using the built-in species registry.
Supported Input Formats
Common Names (preferred):
--species human,mouse,rat,macaque,chicken,pig
miRBase Three-Letter Codes:
--species hsa,mmu,rno,mml,gga,ssc
Scientific Names:
--species "Homo sapiens,Mus musculus,Rattus norvegicus,Macaca mulatta"
Mixed Formats (all normalized consistently):
--species hsa,mouse,"Rattus norvegicus",mml
# Internally stored as: human,mouse,rat,macaque
Why Normalization Matters
Without normalization, you’d have to remember:
--species human --mirna-species hsa(miRNA needs miRBase code)Transcriptome expects
"mouse", miRNA expects"mmu"Cross-system comparisons fail due to format mismatch
With normalization, all these work identically:
sirnaforge workflow TP53 --species human
sirnaforge workflow TP53 --species hsa
sirnaforge workflow TP53 --species "Homo sapiens"
Registry Lookup
Species mappings are defined in src/sirnaforge/data/species_registry.py:
Primary canonical:
human,mouse,rat,macaque,chicken,pigmiRBase codes:
hsa,mmu,rno,mml,gga,sscAliases:
rhesus→macaque,homo_sapiens→humanScientific names:
Homo sapiens,Mus musculus,Rattus norvegicus, etc.
API Usage
For programmatic control, use the Python API:
from sirnaforge.workflow import create_workflow, WorkflowConfig
from sirnaforge.config import ReferenceSelection, ReferenceChoice
# Multi-source transcriptome (internal API)
transcriptome_selection = ReferenceSelection(
choices=(
ReferenceChoice.default("ensembl_human_cdna"),
ReferenceChoice.explicit("/custom/sequences.fa"),
)
)
workflow = await create_workflow(
gene_query="TP53",
output_dir="/results",
species=["human", "mouse"],
mirna_database="mirgenedb",
transcriptome_selection=transcriptome_selection,
)
results = await workflow.run()
Summary
Parameter |
Scope |
Default |
Override Example |
|---|---|---|---|
|
All layers |
5 species (miRNA) |
|
|
miRNA only |
Maps from |
|
|
Transcriptome only |
Ensembl cDNA (4 species) |
|
|
cDNA BWA indices |
Auto-build from transcriptome |
|
Key insight: One parameter (--species) intelligently drives everything, with surgical overrides available when needed.