SKILL.md
Version Compatibility
Reference examples tested with: Bowtie2 2.5.3+, STAR 2.7.11+, cutadapt 4.4+, numpy 1.26+, pysam 0.22+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto 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.
Ribo-seq Preprocessing
"Preprocess my ribosome profiling data" → Trim adapters, size-select ribosome-protected fragments (26-34 nt), remove rRNA contamination, and align to the transcriptome for translation analysis.
- CLI:
cutadapt→bowtie2(rRNA removal) →STAR(genome alignment)
Workflow Overview
Raw Ribo-seq FASTQ
|
v
Adapter trimming (cutadapt)
|
v
Size selection (25-35 nt typical)
|
v
rRNA removal (SortMeRNA/bowtie2)
|
v
Alignment to transcriptome
|
v
Quality filtered BAM
Adapter Trimming
Goal: Remove 3' adapter sequences from ribosome footprint reads to recover the true insert.
Approach: Run cutadapt with the known adapter sequence and length filters to discard fragments outside the expected footprint range.
# Trim 3' adapter
cutadapt \
-a CTGTAGGCACCATCAAT \
-m 20 \
-M 40 \
-o trimmed.fastq.gz \
input.fastq.gz
Size Selection
Goal: Retain only reads corresponding to ribosome-protected fragments (typically 28-32 nt).
Approach: Apply minimum and maximum length filters with cutadapt to select the footprint size range.
