Artifact-aware preprocessing for Oxford Nanopore direct-cDNA sequencing
DirectClean is a preprocessing toolkit for ONT direct-cDNA sequencing reads. It integrates strand correction, artifact detection, and sequence rescue to improve recovery of usable transcript sequences for transcript discovery, isoform analysis, and fusion detection.
Unlike conventional read filtering approaches that discard artifact-containing reads, DirectClean aims to preserve informative sequence by identifying artifact structures and applying targeted trimming, splitting, and rescue strategies.
Oxford Nanopore direct-cDNA sequencing provides long transcript molecules but can contain multiple artifact classes introduced during library preparation and reverse transcription.
DirectClean addresses these challenges through a multi-stage workflow:
flowchart TD
A[Raw ONT direct-cDNA FASTQ] --> B[Stage 1<br/>Breakinator<br/>Foldback artifact detection]
B --> C[Stage 2<br/>Restrander<br/>Strand correction]
C --> D[Stage 3<br/>Unknowns Rescue<br/>Recover usable reads]
D --> E[Stage 4<br/>Adapter Rescue<br/>Remove adapters and split supported concatemers]
E --> F[Stage 5<br/>Homopolymer Rescue<br/>Resolve RT template-switch artifacts]
F --> G[Clean FASTQ<br/>Transcript and fusion analysis]
Stage Component Description
1 Breakinator Detects and removes foldback inversion artifacts
2 Restrander Corrects read orientation and identifies strand-related artifacts
3 Unknowns Rescue Recovers usable sequence from reads with unresolved classification
4 Adapter Rescue Removes adapter-associated artifacts and splits supported concatemer structures
The recommended installation method is through Bioconda:
mamba create -n directclean \
-c conda-forge \
-c bioconda \
directclean
mamba activate directcleanVerify installation:
directclean --helpDirectClean automatically installs required dependencies, including:
- minimap2
- samtools
- breakinator
- restrander
Example:
directclean \
-i raw_reads.fastq \
-r genome.fa \
-o results \
-t 8 \
-j annotation.bed12Main output:
results/
├── directclean.cleaned.fastq
├── directclean.report.html
└── intermediates/
The cleaned FASTQ can be directly used for downstream transcriptome analysis.
Pychopper is widely used for ONT direct-cDNA preprocessing, particularly for primer detection and strand orientation correction.
DirectClean complements this functionality by addressing additional artifact classes generated during direct-cDNA sequencing and by rescuing usable sequence from artifact-containing reads.
Capability Pychopper DirectClean
Primer-based orientation ✓ ✓ Strand correction ✓ ✓ Foldback inversion artifact detection -- ✓ Adapter-associated concatemer resolution -- ✓ Homopolymer-mediated RT template-switch detection -- ✓ Rescue of usable sequence from artifact-containing reads -- ✓
DirectClean was evaluated on an ONT direct-cDNA dataset from VCaP prostate cancer cells.
Metric Pychopper DirectClean
Input reads 5,348,910 5,348,910 Output-record yield 57.6% 65.3%
DirectClean recovered more output records while performing additional artifact-resolution steps.
Importantly, output-record yield alone does not define transcript retention. DirectClean performs artifact-aware trimming and splitting to preserve usable transcript sequence rather than simply retaining or discarding complete reads.
Foldback structures can arise when a molecule contains inverted sequence copies caused by strand folding events.
DirectClean uses Breakinator-based detection to identify and remove these artifacts before downstream analysis.
Direct-cDNA reads may contain adapter-derived structures or concatemer-like artifacts.
DirectClean distinguishes these cases by:
- removing unsupported adapter sequence;
- splitting supported internal concatemer junctions;
- retaining resulting transcript fragments when sequence evidence supports recovery.
Reverse transcription template switching can generate artificial junctions associated with A/T-rich homopolymer regions.
DirectClean identifies these events using sequence-context features and rescues supported subreads.
DirectClean generates a self-contained interactive HTML report containing:
- executive summary statistics;
- read-flow waterfall visualization;
- stage-specific classification summaries;
- artifact-resolution statistics.
This allows users to inspect processing outcomes without additional visualization software.
Typical output structure:
results/
├── directclean.cleaned.fastq
├── directclean.report.html
├── statistics/
└── intermediates/
directclean.cleaned.fastq is recommended for:
- transcript reconstruction;
- isoform quantification;
- fusion detection;
- downstream long-read RNA analysis.
For development or source installation:
git clone https://github.com/ylab-hi/DirectClean.git
cd DirectClean
mamba env create -f environment.yml
mamba activate directclean
pip install -e .If you use DirectClean, please cite:
- DirectClean manuscript
- Breakinator
- Restrander
MIT