← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-small-rna-seq-smrna-preprocessing / references / usage-guide.md

Small RNA Preprocessing - Usage Guide

Overview

Preprocess small RNA-seq data by removing the kit-specific 3' adapter, handling any UMI or 4N degenerate bases, size-selecting to the target class window, and collapsing identical reads before quantification or discovery. The central facts are that the 3' adapter is sequenced through on every real insert (so --discard-untrimmed is correct), that ligation bias makes absolute cross-miRNA abundance untrustworthy within a sample, and that the post-trim read-length histogram is the primary library-quality readout. Correct handling depends on the kit: invariant-end kits get adapter trimming only, NEXTflex 4N spacers must be stripped, and QIAseq true UMIs must be extracted and used for deduplication.

Prerequisites

pip install cutadapt umi_tools
conda install -c bioconda cutadapt fastp seqkit

Quick Start

Tell your AI agent: - "Trim the TruSeq adapter and size-select my small RNA-seq to 18-30 nt" - "My library is NEXTflex with 4N adapters - trim and strip the random bases" - "My library is QIAseq with UMIs - extract the UMI and deduplicate" - "Plot the read-length distribution and tell me if the library is good" - "Collapse identical reads to a counted FASTA for miRDeep2"

Example Prompts

Adapter Trimming and Size Selection

"Trim Illumina TruSeq small RNA adapters and keep reads 18-30 nt, discarding any read without an adapter"

"Set up a piRNA-focused window (24-35 nt) instead of the miRNA window"

"My reads are still 60 nt after trimming - what went wrong with the adapter?"

Kit-Specific Degenerate Bases and UMIs

"This is a NEXTflex library - trim the adapter, then strip the 4 random nucleotides from each end"

"This is a QIAseq miRNA library - extract the 12-nt UMI and deduplicate after alignment"

"Should I PCR-deduplicate this TruSeq small RNA library?"

Quality Control

"Plot the read-length distribution after trimming and interpret the peak"

"What fraction of my reads are adapter dimers?"

"My length histogram has no 22 nt peak and a broad 30+ nt smear - what does that mean?"

What the Agent Will Do

  1. Identify the kit and its exact 3' adapter, and whether it carries a 4N spacer or a true UMI
  2. Trim the 3' adapter with cutadapt or fastp, discarding untrimmed reads and applying the size window
  3. Strip 4N degenerate bases (NEXTflex) or extract and retain the UMI (QIAseq), in the correct order relative to adapter removal
  4. Collapse identical reads to a counted FASTA (preserving the _xN count) when the downstream tool expects it
  5. Plot and interpret the read-length distribution as the primary library-quality check

Tips