bio-read-qc-adapter-trimming

Remove sequencing adapters from FASTQ files using Cutadapt and Trimmomatic. Supports single-end and paired-end reads, Illumina TruSeq, Nextera, and custom adapter sequences. Use when FastQC shows adapter contamination or before alignment of short reads.

16 stars

Best use case

bio-read-qc-adapter-trimming is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Remove sequencing adapters from FASTQ files using Cutadapt and Trimmomatic. Supports single-end and paired-end reads, Illumina TruSeq, Nextera, and custom adapter sequences. Use when FastQC shows adapter contamination or before alignment of short reads.

Teams using bio-read-qc-adapter-trimming should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bio-read-qc-adapter-trimming/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/bio-read-qc-adapter-trimming/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bio-read-qc-adapter-trimming/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bio-read-qc-adapter-trimming Compares

Feature / Agentbio-read-qc-adapter-trimmingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Remove sequencing adapters from FASTQ files using Cutadapt and Trimmomatic. Supports single-end and paired-end reads, Illumina TruSeq, Nextera, and custom adapter sequences. Use when FastQC shows adapter contamination or before alignment of short reads.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Adapter Trimming

Remove sequencing adapters from reads using Cutadapt (precise, flexible) or Trimmomatic (paired-end optimized).

## Common Adapter Sequences

| Platform/Kit | Adapter | Sequence |
|--------------|---------|----------|
| Illumina TruSeq | Read 1 3' | AGATCGGAAGAGCACACGTCTGAACTCCAGTCA |
| Illumina TruSeq | Read 2 3' | AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT |
| Nextera | Transposase | CTGTCTCTTATACACATCT |
| Small RNA | 3' adapter | TGGAATTCTCGGGTGCCAAGG |
| Poly-A | Poly-A tail | AAAAAAAAAAAAAAAA |

## Cutadapt

### Single-End Reads

```bash
# 3' adapter (most common)
cutadapt -a AGATCGGAAGAGC -o trimmed.fastq.gz sample.fastq.gz

# 5' adapter
cutadapt -g ACGTACGT -o trimmed.fastq.gz sample.fastq.gz

# Both ends
cutadapt -a ADAPTER1 -g ADAPTER2 -o trimmed.fastq.gz sample.fastq.gz

# Multiple adapters (tries each)
cutadapt -a ADAPTER1 -a ADAPTER2 -a ADAPTER3 -o trimmed.fastq.gz sample.fastq.gz
```

### Paired-End Reads

```bash
# Basic paired-end
cutadapt -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCA \
         -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \
         -o trimmed_R1.fastq.gz -p trimmed_R2.fastq.gz \
         sample_R1.fastq.gz sample_R2.fastq.gz

# Short form for Illumina TruSeq (auto-detect)
cutadapt -a AGATCGGAAGAGC -A AGATCGGAAGAGC \
         -o trimmed_R1.fastq.gz -p trimmed_R2.fastq.gz \
         sample_R1.fastq.gz sample_R2.fastq.gz
```

### Adapter Options

```bash
# Error rate (default 0.1 = 10% mismatches allowed)
cutadapt -a ADAPTER -e 0.15 -o out.fq in.fq

# Minimum overlap (default 3)
cutadapt -a ADAPTER -O 5 -o out.fq in.fq

# No indels in adapter alignment
cutadapt -a ADAPTER --no-indels -o out.fq in.fq

# Trim Ns from ends
cutadapt --trim-n -o out.fq in.fq

# Anchored adapters (must be at end)
cutadapt -a ADAPTER$ -o out.fq in.fq
```

### Linked Adapters

```bash
# 5' adapter followed by 3' adapter (same read)
cutadapt -a ADAPTER1...ADAPTER2 -o out.fq in.fq

# Anchored 5' linked to 3'
cutadapt -a ^ADAPTER1...ADAPTER2 -o out.fq in.fq
```

### Filtering After Trimming

```bash
# Minimum length (discard shorter)
cutadapt -a ADAPTER -m 20 -o out.fq in.fq

# Maximum length
cutadapt -a ADAPTER -M 150 -o out.fq in.fq

# Maximum N content
cutadapt -a ADAPTER --max-n 0.1 -o out.fq in.fq

# Discard trimmed reads
cutadapt -a ADAPTER --discard-trimmed -o out.fq in.fq

# Discard untrimmed reads
cutadapt -a ADAPTER --discard-untrimmed -o out.fq in.fq
```

### Paired-End Filtering

```bash
# Both reads must pass minimum length
cutadapt -a ADAPT1 -A ADAPT2 -m 20 \
         -o R1.fq -p R2.fq in_R1.fq in_R2.fq

# Output too-short reads separately
cutadapt -a ADAPT1 -A ADAPT2 -m 20 \
         --too-short-output short_R1.fq --too-short-paired-output short_R2.fq \
         -o R1.fq -p R2.fq in_R1.fq in_R2.fq
```

### Action Options

```bash
# Mask adapter instead of trim (replace with N)
cutadapt -a ADAPTER --action=mask -o out.fq in.fq

# Retain adapter but lowercase
cutadapt -a ADAPTER --action=lowercase -o out.fq in.fq

# Just find adapters, don't modify
cutadapt -a ADAPTER --action=none -o out.fq in.fq
```

## Trimmomatic

### Single-End Mode

```bash
trimmomatic SE -phred33 \
    input.fastq.gz output.fastq.gz \
    ILLUMINACLIP:adapters.fa:2:30:10
```

### Paired-End Mode

```bash
trimmomatic PE -phred33 -threads 4 \
    input_R1.fastq.gz input_R2.fastq.gz \
    output_R1_paired.fastq.gz output_R1_unpaired.fastq.gz \
    output_R2_paired.fastq.gz output_R2_unpaired.fastq.gz \
    ILLUMINACLIP:TruSeq3-PE-2.fa:2:30:10
```

### ILLUMINACLIP Parameters

```bash
ILLUMINACLIP:<fastaWithAdapters>:<seed>:<palindrome>:<simple>

# Parameters:
# seed - max mismatches in 16bp seed (usually 2)
# palindrome - threshold for palindrome match (usually 30)
# simple - threshold for simple match (usually 10)

# Example with all options
ILLUMINACLIP:adapters.fa:2:30:10:2:keepBothReads
```

### Built-in Adapter Files

Trimmomatic includes adapter files:
- `TruSeq2-SE.fa` - TruSeq v2 single-end
- `TruSeq2-PE.fa` - TruSeq v2 paired-end
- `TruSeq3-SE.fa` - TruSeq v3 single-end
- `TruSeq3-PE.fa` - TruSeq v3 paired-end
- `TruSeq3-PE-2.fa` - TruSeq v3 PE (palindrome mode)
- `NexteraPE-PE.fa` - Nextera paired-end

### Find Trimmomatic Adapters

```bash
# Find adapter directory
TRIMMOMATIC_JAR=$(which trimmomatic | xargs dirname)/../share/trimmomatic-*/adapters/

# Or with conda
ls $CONDA_PREFIX/share/trimmomatic-*/adapters/
```

## Performance

```bash
# Cutadapt with multiple cores
cutadapt -j 8 -a ADAPTER -o out.fq in.fq

# Trimmomatic threads
trimmomatic PE -threads 8 ...
```

## Verify Trimming

```bash
# Check adapter removal with FastQC
fastqc trimmed.fastq.gz

# Count reads before/after
zcat input.fastq.gz | wc -l
zcat trimmed.fastq.gz | wc -l
```

## Related Skills

- quality-reports - Check adapter content with FastQC
- quality-filtering - Quality trimming after adapter removal
- fastp-workflow - Combined adapter and quality trimming

Related Skills

projecoes-read-models

16
from diegosouzapw/awesome-omni-skill

Use para criar projeções como 9BOX, dashboards e visões de leitura otimizadas para decisão.

breadcrumb

16
from diegosouzapw/awesome-omni-skill

Leave notes on files for other agents to see in future sessions. Use after making non-obvious changes, fixing tricky bugs, or when code looks wrong but is intentional.

autonomous-agent-readiness

16
from diegosouzapw/awesome-omni-skill

Assess a codebase's readiness for autonomous agent development and provide tailored recommendations. Use when asked to evaluate how well a project supports unattended agent execution, assess development practices for agent autonomy, audit infrastructure for agent reliability, or improve a codebase for autonomous agent workflows. Triggers on requests like "assess this project for agent readiness", "how autonomous-ready is this codebase", "evaluate agent infrastructure", or "improve development practices for agents".

acc-create-read-model

16
from diegosouzapw/awesome-omni-skill

Generates Read Model/Projection for PHP 8.5. Creates optimized query models for CQRS read side with projections and denormalization. Includes unit tests.

arxiv-reader

16
from diegosouzapw/awesome-omni-skill

arXiv 論文の内容を取得・要約するスキル。URL が arxiv.org/abs/{論文ID} 形式の場合に使用。PDF をダウンロードして Read ツールで読み取る。

amia-github-thread-management

16
from diegosouzapw/awesome-omni-skill

Use when managing PR review threads. Reply does NOT auto-resolve threads. Trigger with /manage-threads.

ai-proofreading

16
from diegosouzapw/awesome-omni-skill

系统化降低AI检测率至30%以下,通过三遍审校流程(内容、风格、细节)增加人味。当用户提到"AI味太重"、"像AI写的"、"降低AI检测率"、"更像人写的"、"自然一些"、"口语化"时使用此技能。

analyze-thread

16
from diegosouzapw/awesome-omni-skill

Analyze complete email thread with conversation context, timeline, participants, and attachments tracking.

readability-optimization

16
from diegosouzapw/awesome-omni-skill

Analyze and improve text readability using Flesch-Kincaid scores, sentence length, paragraph density, and plain language techniques. Use this skill when reviewing or editing existing text for clarity.

production-readiness-checklist

16
from diegosouzapw/awesome-omni-skill

Comprehensive production readiness verification, code quality gates, deployment checks, and production standards compliance for platform-go

agentuity-cli-cloud-thread-list

16
from diegosouzapw/awesome-omni-skill

List recent threads. Requires authentication. Use for Agentuity cloud platform operations

agentuity-cli-cloud-thread-delete

16
from diegosouzapw/awesome-omni-skill

Delete a thread. Requires authentication. Use for Agentuity cloud platform operations