Skip to content
cccskills
FreePublished on GitHub

bio-workflows-smrna-pipeline

End-to-end small RNA-seq analysis from FASTQ to differential miRNA expression and target prediction. Use when analyzing miRNA, isomiR, tRF, or piRNA sequencing data through preprocessing, quantification, discovery, DE, and targets.

The English summary is being prepared. Showing the original description.

See how to install

Files included (3)

  • SKILL.md5.1 KB
  • examples/smrna_full_pipeline.sh2.3 KB
  • usage-guide.md3.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Version Compatibility

Reference examples tested with: cutadapt 4.4+, miRDeep2 2.0.1.3+, miRge3.0 0.1.4+, DESeq2 1.42+

Before using code patterns, verify installed versions match. If versions differ:

  • R: packageVersion('<pkg>') then ?function_name to verify parameters
  • CLI: <tool> --version then <tool> --help to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Small RNA-seq Pipeline

"Analyze my small RNA-seq data from FASTQ to differential miRNAs" -> Orchestrate adapter trimming (cutadapt), quantification (miRge3) or discovery (miRDeep2), differential expression (DESeq2), and target prediction (miRanda), with the small-RNA-specific decisions surfaced at each step.

Pipeline Overview

FASTQ -> cutadapt trim -> miRge3 (known) / miRDeep2 (novel) -> DESeq2 -> target prediction
                                                |
                                                +-> tRF / piRNA profiling (MINTmap / unitas)

Step 1: Preprocessing

# The 3' adapter is on EVERY real read (insert ~22 nt << read length), so --discard-untrimmed
# drops adapter-dimer / no-insert junk - the inverse of genomic DNA. For NEXTflex 4N libraries,
# strip the random bases AFTER adapter removal (cutadapt -u 4 -u -4); for QIAseq UMIs, extract
# and dedup with umi_tools. Never position-dedup a non-UMI small-RNA library.
cutadapt -a TGGAATTCTCGGGTGCCAAGG \
    --minimum-length 18 --maximum-length 30 --discard-untrimmed \
    -o trimmed.fastq.gz reads.fastq.gz

Step 2: Quantification or discovery

# Known-miRNA + isomiR quantification (the common case) - fast, curated libraries:
miRge3.0 annotate -s trimmed.fastq.gz -lib /path/to/miRge3_Lib -on human -db miRBase \
    -a illumina -gff -ai -cpu 8 -o mirge_out

# OR novel discovery (high false-positive; needs a genome and bowtie 1):
mapper.pl trimmed.fastq.gz -e -h -i -j -l 18 -m -p genome_index \
    -s reads_collapsed.fa -t reads_collapsed_vs_genome.arf
miRDeep2.pl reads_collapsed.fa genome.fa reads_collapsed_vs_genome.arf \
    mature_ref.fa none hairpin_ref.fa -t Human
# Choose the miRDeep2 score cutoff from survey.pl signal-to-noise; it is not a fixed rule.

Step 3: Differential expression

library(DESeq2)
# Feed RAW counts (miR.Counts.csv), NOT RPM. A few miRNAs can dominate the library, so
# inspect sizeFactors for compositional distortion before trusting the calls.
counts <- read.csv('mirge_out/miR.Counts.csv', row.names = 1)
dds <- DESeqDataSetFromMatrix(round(counts), colData, ~condition)
dds <- dds[rowSums(counts(dds)) >= 10, ]   # lower prefilter than mRNA
dds <- DESeq(dds)
print(sizeFactors(dds))
res <- lfcShrink(dds, coef = 'condition_treated_vs_control', type = 'apeglm')

Step 4: Target prediction

# Prediction is a hypothesis: intersect with anti-correlated mRNA DE before trusting targets.
miranda mature_mirnas.fa target_3utrs.fa -sc 140 -en -20 -strict -out targets.txt

QC Checkpoints

  1. Before quantification: run miRTrace for length/complexity, RNA-class composition (miRNA vs rRNA/tRNA/artifact), and cross-clade contamination (a good mapping rate hides sample swaps and reagent contamination). For a fully reproducible pipeline, nf-core/smrnaseq chains these steps.
  2. After trimming: read-length distribution should peak at 21-23 nt; a 30+ nt smear means degradation or tRNA/rRNA contamination, a 26-32 nt peak means piRNA (for PANDORA/phospho preps the broad tRF/rRF distribution is expected)
  3. Ligation bias: absolute cross-miRNA abundance within a sample is untrustworthy; compare the same miRNA across samples, never across kits
  4. After alignment: check the RNA-class composition (miRNA vs tRF/rRF/piRNA); abundant non-miRNA classes mean this is a tRF/piRNA story (see trf-pirna-profiling)
  5. Before DE: confirm RAW counts (not RPM) and inspect size factors for compositional distortion
  6. After DE: report base mean with every call; a significant fold-change on a ~5-count miRNA is noise
  7. Targets: filter predictions by anti-correlated mRNA DE and validated databases, never enrichment on raw predictions

Related Skills

  • small-rna-seq/smrna-preprocessing - Kit-specific adapter, UMI, and 4N handling
  • small-rna-seq/mirdeep2-analysis - Novel miRNA discovery
  • small-rna-seq/mirge3-analysis - Known-miRNA and isomiR quantification
  • small-rna-seq/differential-mirna - Compositionally-aware DE
  • small-rna-seq/target-prediction - Seed prediction filtered by expression
  • small-rna-seq/trf-pirna-profiling - tRF and piRNA profiling
  • workflow-management/nf-core-pipelines - Run nf-core/smrnaseq as a curated, reproducible pipeline instead of chaining the steps by hand

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

ADMET property prediction for drug candidates. Full pharmacokinetic panel (Caco-2, PPB, clearance, CYP), toxicity (hERG, AMES, DILI), drug-likeness (Lipinski, QED), using RDKit descriptors and TDC models.

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

Interpretable ADMET analysis with mechanistic reasoning. Maps liabilities to structural causes and biological pathways. Based on CoTox (Park 2025) and DrugR (Liu 2026).

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

aeon

Free

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.

The English summary is being prepared. Showing the original description.

huang-sh/DeepScience4Updated Jul 15, 2026

See all skills by huang-sh

Report a problem with this skill