bio-workflows-smrna-pipeline
$
npx mdskill add GPTomics/bioSkills/bio-workflows-smrna-pipelineAnalyzes small RNA-seq data from FASTQ files to identify differential miRNA expression
- Processes miRNA, piRNA, and other small RNA sequencing data for differential expression analysis
- Uses cutadapt for trimming, miRDeep2 for quantification, and DESeq2 for differential analysis
- Automates adapter trimming, genome alignment, quantification, and target prediction workflows
- Delivers results through structured output files and integrates with downstream analysis tools
SKILL.md
.github/skills/bio-workflows-smrna-pipelineView on GitHub ↗
---
name: bio-workflows-smrna-pipeline
description: End-to-end small RNA-seq analysis from FASTQ to differential miRNA expression. Use when analyzing miRNA, piRNA, or other small RNA sequencing data.
tool_type: mixed
primary_tool: miRDeep2
---
## Version Compatibility
Reference examples tested with: DESeq2 1.42+, cutadapt 4.4+
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), miRNA quantification (miRDeep2/miRge3), novel miRNA discovery, differential expression (DESeq2), and target prediction (miRanda).
## Pipeline Overview
```
FASTQ → cutadapt trim → miRDeep2 → Quantification → DESeq2 → Target prediction
```
## Step 1: Preprocessing
```bash
# Adapter trimming and size selection
cutadapt -a TGGAATTCTCGGGTGCCAAGG \
--minimum-length 18 --maximum-length 30 \
-o trimmed.fastq.gz reads.fastq.gz
```
## Step 2: miRDeep2 Analysis
```bash
# Align to genome
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
# miRNA quantification and novel prediction
miRDeep2.pl reads_collapsed.fa genome.fa \
reads_collapsed_vs_genome.arf \
mature_ref.fa none hairpin_ref.fa
```
## Step 3: Differential Expression
```r
library(DESeq2)
counts <- read.csv('mirna_counts.csv', row.names = 1)
dds <- DESeqDataSetFromMatrix(counts, colData, ~condition)
dds <- DESeq(dds)
results <- results(dds)
```
## Step 4: Target Prediction
```bash
# miRanda for target prediction
miranda mature_mirnas.fa target_3utrs.fa -out targets.txt
```
## QC Checkpoints
1. **After trimming**: Size distribution should peak at 21-23nt
2. **After alignment**: >70% mapping rate expected
3. **After DE**: Check volcano plot and PCA
## Related Skills
- small-rna-seq/mirdeep2-analysis - Detailed miRDeep2
- small-rna-seq/differential-mirna - DE analysis
- small-rna-seq/target-prediction - Target analysis
More from GPTomics/bioSkills
- bio-admet-predictionPredicts ADMET properties using ADMETlab 3.0 API or DeepChem models. Estimates bioavailability, CYP inhibition, hERG liability, and 119 toxicity endpoints with uncertainty quantification. Filters for PAINS and other structural alerts. Use when filtering compounds for drug-likeness or prioritizing leads by predicted safety.
- bio-alignment-amplicon-clippingTrim PCR primers from aligned reads in amplicon-panel BAMs using samtools ampliconclip. Use when processing SARS-CoV-2 ARTIC, hereditary cancer panels, ctDNA hot-spot panels, or any amplicon assay where primer-derived bases would falsely confirm reference at primer footprints.
- bio-alignment-filteringFilter alignments by flags, mapping quality, and regions using samtools view and pysam. Use when extracting specific reads, removing low-quality alignments, or subsetting to target regions.
- bio-alignment-indexingCreate and use BAI/CSI indices for BAM/CRAM files using samtools and pysam. Use when enabling random access to alignment files or fetching specific genomic regions.
- bio-alignment-ioRead, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.
- bio-alignment-msa-parsingParse and analyze multiple sequence alignments using Biopython. Extract sequences, identify conserved regions, analyze gaps, work with annotations, and manipulate alignment data for downstream analysis. Use when parsing or manipulating multiple sequence alignments.
- bio-alignment-msa-statisticsCalculate alignment statistics including sequence identity, conservation scores, substitution matrices, and similarity metrics. Use when comparing alignment quality, measuring sequence divergence, and analyzing evolutionary patterns.
- bio-alignment-multiplePerform multiple sequence alignment using MAFFT, MUSCLE5, ClustalOmega, or T-Coffee. Guides tool and algorithm selection based on dataset size, sequence divergence, and downstream application. Use when aligning three or more homologous sequences for phylogenetics, conservation analysis, or evolutionary studies.
- bio-alignment-pairwisePerform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner. Use when comparing two sequences, finding optimal alignments, scoring similarity, and identifying local or global matches between DNA, RNA, or protein sequences.
- bio-alignment-sortingSort alignment files by coordinate or read name using samtools and pysam. Use when preparing BAM files for indexing, variant calling, or paired-end analysis.