directclean 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- directclean-0.1.0/LICENSE +0 -0
- directclean-0.1.0/PKG-INFO +184 -0
- directclean-0.1.0/README.md +158 -0
- directclean-0.1.0/pyproject.toml +36 -0
- directclean-0.1.0/src/directclean/__init__.py +14 -0
- directclean-0.1.0/src/directclean/__main__.py +6 -0
- directclean-0.1.0/src/directclean/cli/__init__.py +1 -0
- directclean-0.1.0/src/directclean/cli/app.py +289 -0
- directclean-0.1.0/src/directclean/external/__init__.py +1 -0
- directclean-0.1.0/src/directclean/external/breakinator.py +386 -0
- directclean-0.1.0/src/directclean/external/configs/PCB109.json +20 -0
- directclean-0.1.0/src/directclean/external/dependencies.py +124 -0
- directclean-0.1.0/src/directclean/external/minimap2.py +275 -0
- directclean-0.1.0/src/directclean/external/restrander.py +282 -0
- directclean-0.1.0/src/directclean/filter/__init__.py +48 -0
- directclean-0.1.0/src/directclean/filter/artifact_classifier.py +556 -0
- directclean-0.1.0/src/directclean/filter/homopolymer.py +168 -0
- directclean-0.1.0/src/directclean/filter/junction_parser.py +392 -0
- directclean-0.1.0/src/directclean/pipeline.py +542 -0
- directclean-0.1.0/src/directclean/report/__init__.py +10 -0
- directclean-0.1.0/src/directclean/report/html_report.py +1129 -0
- directclean-0.1.0/src/directclean/rescuer/__init__.py +48 -0
- directclean-0.1.0/src/directclean/rescuer/adapter_finder.py +445 -0
- directclean-0.1.0/src/directclean/rescuer/adaptor_seq.py +98 -0
- directclean-0.1.0/src/directclean/rescuer/chopper.py +465 -0
- directclean-0.1.0/src/directclean/rescuer/unknowns_rescuer.py +321 -0
- directclean-0.1.0/src/directclean/utils/__init__.py +0 -0
- directclean-0.1.0/src/directclean/utils/io.py +339 -0
- directclean-0.1.0/src/directclean/utils/sequence_operator.py +308 -0
- directclean-0.1.0/src/directclean/utils/stats.py +77 -0
|
File without changes
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: directclean
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Strand orientation, artifact removal, and chimeric read rescue for ONT direct-cDNA, eliminates foldback inversions and homopolymer RT template switching artifacts
|
|
5
|
+
Home-page: https://github.com/ylab-hi/DirectClean
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: nanopore,direct-cdna,rna-seq,preprocessing,chimeric-read,rt-artifact
|
|
8
|
+
Author: Qingxiang Guo
|
|
9
|
+
Author-email: qingxiang.guo@northwestern.edu
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
19
|
+
Requires-Dist: biopython (>=1.81)
|
|
20
|
+
Requires-Dist: edlib (>=1.3.9)
|
|
21
|
+
Requires-Dist: pysam (>=0.21.0)
|
|
22
|
+
Requires-Dist: rich (>=13.0.0)
|
|
23
|
+
Requires-Dist: typer[all] (>=0.9.0)
|
|
24
|
+
Project-URL: Repository, https://github.com/ylab-hi/DirectClean
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img src="assets/DirectClean_Logo.png" width="250" alt="DirectClean Logo">
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
# DirectClean
|
|
32
|
+
|
|
33
|
+
Strand orientation, artifact removal, and chimeric read rescue for Oxford Nanopore direct-cDNA sequencing.
|
|
34
|
+
|
|
35
|
+
DirectClean processes raw ONT direct-cDNA FASTQ files and produces clean, oriented reads ready for transcript quantification and gene fusion analysis.
|
|
36
|
+
|
|
37
|
+
**What it removes:** foldback inversion reads (self-inverted artifacts) and reads that cannot be strand-oriented (missing primer signals).
|
|
38
|
+
|
|
39
|
+
**What it rescues** (chopped at the artifact junction, flanking sub-reads kept): reads containing internal TSO/RTP adapter junctions (concatemers from ligation) and reads containing homopolymer-mediated RT template switching junctions.
|
|
40
|
+
|
|
41
|
+
## Performance on VCaP direct-cDNA data
|
|
42
|
+
|
|
43
|
+
Tested on 5.35M reads from the VCaP prostate cancer cell line:
|
|
44
|
+
|
|
45
|
+
| Metric | Pychopper | DirectClean |
|
|
46
|
+
| :--- | :--- | :--- |
|
|
47
|
+
| Retention rate | 57.6% | **65.3%** |
|
|
48
|
+
| FSM isoforms detected | 17,873 | **20,535** |
|
|
49
|
+
| Validated fusions detected (of 99) | 37 | **49** |
|
|
50
|
+
| Residual homopolymer artifacts | 70,140 | **0** |
|
|
51
|
+
|
|
52
|
+
## Why DirectClean?
|
|
53
|
+
|
|
54
|
+
Oxford Nanopore's [Pychopper](https://github.com/epi2me-labs/pychopper) handles strand orientation and adapter-based read rescue, but direct-cDNA library preparation introduces additional artifact types that Pychopper does not address:
|
|
55
|
+
|
|
56
|
+
- **Foldback inversions**: the sequenced strand folds back on itself, producing a self-inverted chimeric read.
|
|
57
|
+
- **Homopolymer-mediated RT template switching**: during reverse transcription, the RT enzyme detaches at an A/T-rich region on one mRNA and re-primes on another, joining unrelated transcripts into a single chimeric read. These chimeras generate false gene fusion candidates and corrupt isoform quantification.
|
|
58
|
+
|
|
59
|
+
DirectClean integrates [Breakinator](https://github.com/jheinz27/breakinator) and [Restrander](https://github.com/mritchielab/restrander) with novel detection and rescue algorithms into a single end-to-end pipeline.
|
|
60
|
+
|
|
61
|
+
### Feature comparison
|
|
62
|
+
|
|
63
|
+
| Capability | Pychopper | DirectClean |
|
|
64
|
+
| :--- | :---: | :---: |
|
|
65
|
+
| Strand orientation | ✅ | ✅ |
|
|
66
|
+
| Adapter concatemer rescue | ✅ (requires terminal primers) | ✅ (partial internal signal sufficient) |
|
|
67
|
+
| Foldback inversion removal | ❌ | ✅ |
|
|
68
|
+
| Homopolymer RT template switching detection | ❌ | ✅ |
|
|
69
|
+
| Rescue from unclassified reads | ❌ | ✅ |
|
|
70
|
+
|
|
71
|
+
## Pipeline architecture
|
|
72
|
+
|
|
73
|
+
| Stage | Name | What it does |
|
|
74
|
+
| :--- | :--- | :--- |
|
|
75
|
+
| 1 | Breakinator | Remove foldback inversion artifacts |
|
|
76
|
+
| 2 | Restrander | Orient reads 5'→3', remove RTP-RTP / TSO-TSO artifacts, set aside unorientable reads |
|
|
77
|
+
| 3 | Unknowns Rescue | Recover orientable reads from Restrander unknowns via internal adapter detection and self-orientation |
|
|
78
|
+
| 4 | Adapter Rescue | Detect internal TSO/RTP adapters in oriented reads, chop and rescue sub-reads |
|
|
79
|
+
| 5 | Homopolymer Rescue | Detect RT template switching at A/T-rich chimeric junctions, chop and rescue sub-reads |
|
|
80
|
+
|
|
81
|
+
Stages 1–2 remove definitively artifactual or unorientable reads. Stages 3, 4, and 5 never discard reads — they chop chimeric reads at artifact junctions and keep the flanking sub-reads as independent sequences.
|
|
82
|
+
|
|
83
|
+
### How the homopolymer detector works
|
|
84
|
+
|
|
85
|
+
After minimap2 splice-aware alignment, DirectClean identifies chimeric reads (those with supplementary alignments mapping to different genomic loci). For each chimeric junction, a 10 bp sliding window scans the flanking sequence on both sides. A junction is flagged as an RT template switching artifact if any window satisfies both criteria:
|
|
86
|
+
|
|
87
|
+
- A/T base density ≥ 85%
|
|
88
|
+
- Longest consecutive A or T run ≥ 5 bp
|
|
89
|
+
|
|
90
|
+
Flagged reads are chopped at the artifact junction. Sub-reads ≥ 100 bp are written to the output; shorter fragments are discarded. Junctions on non-standard contigs (alt loci, unplaced scaffolds) are excluded via a standard-chromosome whitelist.
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Create environment with all dependencies
|
|
96
|
+
mamba env create -f environment.yml
|
|
97
|
+
mamba activate directclean
|
|
98
|
+
|
|
99
|
+
# Install DirectClean
|
|
100
|
+
poetry install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
External tools (minimap2, samtools, breakinator, restrander) are included in the conda environment. To install them separately:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
mamba install -c bioconda minimap2 samtools breakinator
|
|
107
|
+
mamba install -c genomedk restrander
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Usage
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
directclean \
|
|
114
|
+
-i raw_reads.fastq \
|
|
115
|
+
-r genome.fa \
|
|
116
|
+
-o results/ \
|
|
117
|
+
-t 8 \
|
|
118
|
+
-j gencode.v41.bed12
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The `-j` flag provides a junction BED file for guided alignment (recommended: GENCODE annotation in BED12 format).
|
|
122
|
+
|
|
123
|
+
### Key parameters
|
|
124
|
+
|
|
125
|
+
| Flag | Default | Description |
|
|
126
|
+
| :--- | :--- | :--- |
|
|
127
|
+
| `-i`, `--input` | required | Raw FASTQ from ONT direct-cDNA sequencing |
|
|
128
|
+
| `-r`, `--reference` | required | Reference genome FASTA |
|
|
129
|
+
| `-o`, `--output` | required | Output directory |
|
|
130
|
+
| `-t`, `--threads` | 4 | Threads for minimap2, samtools, breakinator |
|
|
131
|
+
| `-j`, `--junc-bed` | none | Junction BED12 for guided alignment |
|
|
132
|
+
| `--density-threshold` | 0.85 | A/T density threshold for homopolymer detection |
|
|
133
|
+
| `--min-run` | 5 | Minimum consecutive A/T run length |
|
|
134
|
+
| `--min-confidence` | 2 | Minimum adapter signals (1–3) required to chop |
|
|
135
|
+
| `--context-window` | 50 | Bases flanking each junction for scanning |
|
|
136
|
+
| `--html-report` | off | Generate an interactive HTML summary report |
|
|
137
|
+
|
|
138
|
+
Run `directclean -h` for the full list.
|
|
139
|
+
|
|
140
|
+
## Output
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
results/
|
|
144
|
+
├── directclean.cleaned.fastq All clean reads + rescued sub-reads
|
|
145
|
+
├── directclean.rescued.fastq Sub-reads rescued by homopolymer chopping
|
|
146
|
+
├── directclean.homopolymer_report.tsv Per-read artifact classification
|
|
147
|
+
├── directclean.report.html Interactive HTML report (if --html-report)
|
|
148
|
+
├── intermediates/
|
|
149
|
+
│ ├── directclean.no_foldback.fastq After Stage 1
|
|
150
|
+
│ ├── directclean.restranded.fastq After Stage 2
|
|
151
|
+
│ ├── directclean.unknowns_rescued.fastq Stage 3 output
|
|
152
|
+
│ ├── directclean.rescued.fastq After Stage 4
|
|
153
|
+
│ ├── directclean.merged.fastq Stage 3 + Stage 4 merged
|
|
154
|
+
│ └── directclean.aligned.sorted.bam Minimap2 alignment
|
|
155
|
+
└── reports/
|
|
156
|
+
└── directclean.rescue_report.tsv Stage 4 adapter rescue details
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The primary output is `directclean.cleaned.fastq`. This file contains all reads that passed the pipeline plus rescued sub-reads from Stages 3, 4, and 5, ready for downstream transcript quantification (e.g., IsoQuant, FLAIR) and gene fusion calling (e.g., FusionSeeker, JAFFAL).
|
|
160
|
+
|
|
161
|
+
### HTML Report
|
|
162
|
+
|
|
163
|
+
DirectClean generates an interactive HTML report with per-stage statistics and read flow visualization.
|
|
164
|
+
|
|
165
|
+
<p align="center">
|
|
166
|
+
<img src="assets/html.png" width="800" alt="DirectClean HTML Report Preview">
|
|
167
|
+
</p>
|
|
168
|
+
|
|
169
|
+
## Citation
|
|
170
|
+
|
|
171
|
+
If you use DirectClean in your research, please cite our manuscript along with the foundational tools integrated into this pipeline:
|
|
172
|
+
|
|
173
|
+
- **DirectClean:** Guo, Q., Li, Y., & Yang, R. (2026). DirectClean: a comprehensive preprocessing toolkit for Oxford Nanopore direct-cDNA sequencing. *Manuscript in preparation*.
|
|
174
|
+
- **Breakinator:** Heinz, J. M., Meyerson, M., & Li, H. (2026). Detecting foldback artifacts in long-reads. *BMC Genomics*.
|
|
175
|
+
- **Restrander:** Schuster, J., Ritchie, M. E., & Gouil, Q. (2023). Restrander: rapid orientation and artefact removal for long-read cDNA data. *NAR Genomics and Bioinformatics*, 5(4), lqad108.
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
MIT
|
|
180
|
+
|
|
181
|
+
## Contact
|
|
182
|
+
|
|
183
|
+
- Qingxiang Guo — qingxiang.guo@northwestern.edu
|
|
184
|
+
- Rendong Yang Lab — https://github.com/ylab-hi
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/DirectClean_Logo.png" width="250" alt="DirectClean Logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# DirectClean
|
|
6
|
+
|
|
7
|
+
Strand orientation, artifact removal, and chimeric read rescue for Oxford Nanopore direct-cDNA sequencing.
|
|
8
|
+
|
|
9
|
+
DirectClean processes raw ONT direct-cDNA FASTQ files and produces clean, oriented reads ready for transcript quantification and gene fusion analysis.
|
|
10
|
+
|
|
11
|
+
**What it removes:** foldback inversion reads (self-inverted artifacts) and reads that cannot be strand-oriented (missing primer signals).
|
|
12
|
+
|
|
13
|
+
**What it rescues** (chopped at the artifact junction, flanking sub-reads kept): reads containing internal TSO/RTP adapter junctions (concatemers from ligation) and reads containing homopolymer-mediated RT template switching junctions.
|
|
14
|
+
|
|
15
|
+
## Performance on VCaP direct-cDNA data
|
|
16
|
+
|
|
17
|
+
Tested on 5.35M reads from the VCaP prostate cancer cell line:
|
|
18
|
+
|
|
19
|
+
| Metric | Pychopper | DirectClean |
|
|
20
|
+
| :--- | :--- | :--- |
|
|
21
|
+
| Retention rate | 57.6% | **65.3%** |
|
|
22
|
+
| FSM isoforms detected | 17,873 | **20,535** |
|
|
23
|
+
| Validated fusions detected (of 99) | 37 | **49** |
|
|
24
|
+
| Residual homopolymer artifacts | 70,140 | **0** |
|
|
25
|
+
|
|
26
|
+
## Why DirectClean?
|
|
27
|
+
|
|
28
|
+
Oxford Nanopore's [Pychopper](https://github.com/epi2me-labs/pychopper) handles strand orientation and adapter-based read rescue, but direct-cDNA library preparation introduces additional artifact types that Pychopper does not address:
|
|
29
|
+
|
|
30
|
+
- **Foldback inversions**: the sequenced strand folds back on itself, producing a self-inverted chimeric read.
|
|
31
|
+
- **Homopolymer-mediated RT template switching**: during reverse transcription, the RT enzyme detaches at an A/T-rich region on one mRNA and re-primes on another, joining unrelated transcripts into a single chimeric read. These chimeras generate false gene fusion candidates and corrupt isoform quantification.
|
|
32
|
+
|
|
33
|
+
DirectClean integrates [Breakinator](https://github.com/jheinz27/breakinator) and [Restrander](https://github.com/mritchielab/restrander) with novel detection and rescue algorithms into a single end-to-end pipeline.
|
|
34
|
+
|
|
35
|
+
### Feature comparison
|
|
36
|
+
|
|
37
|
+
| Capability | Pychopper | DirectClean |
|
|
38
|
+
| :--- | :---: | :---: |
|
|
39
|
+
| Strand orientation | ✅ | ✅ |
|
|
40
|
+
| Adapter concatemer rescue | ✅ (requires terminal primers) | ✅ (partial internal signal sufficient) |
|
|
41
|
+
| Foldback inversion removal | ❌ | ✅ |
|
|
42
|
+
| Homopolymer RT template switching detection | ❌ | ✅ |
|
|
43
|
+
| Rescue from unclassified reads | ❌ | ✅ |
|
|
44
|
+
|
|
45
|
+
## Pipeline architecture
|
|
46
|
+
|
|
47
|
+
| Stage | Name | What it does |
|
|
48
|
+
| :--- | :--- | :--- |
|
|
49
|
+
| 1 | Breakinator | Remove foldback inversion artifacts |
|
|
50
|
+
| 2 | Restrander | Orient reads 5'→3', remove RTP-RTP / TSO-TSO artifacts, set aside unorientable reads |
|
|
51
|
+
| 3 | Unknowns Rescue | Recover orientable reads from Restrander unknowns via internal adapter detection and self-orientation |
|
|
52
|
+
| 4 | Adapter Rescue | Detect internal TSO/RTP adapters in oriented reads, chop and rescue sub-reads |
|
|
53
|
+
| 5 | Homopolymer Rescue | Detect RT template switching at A/T-rich chimeric junctions, chop and rescue sub-reads |
|
|
54
|
+
|
|
55
|
+
Stages 1–2 remove definitively artifactual or unorientable reads. Stages 3, 4, and 5 never discard reads — they chop chimeric reads at artifact junctions and keep the flanking sub-reads as independent sequences.
|
|
56
|
+
|
|
57
|
+
### How the homopolymer detector works
|
|
58
|
+
|
|
59
|
+
After minimap2 splice-aware alignment, DirectClean identifies chimeric reads (those with supplementary alignments mapping to different genomic loci). For each chimeric junction, a 10 bp sliding window scans the flanking sequence on both sides. A junction is flagged as an RT template switching artifact if any window satisfies both criteria:
|
|
60
|
+
|
|
61
|
+
- A/T base density ≥ 85%
|
|
62
|
+
- Longest consecutive A or T run ≥ 5 bp
|
|
63
|
+
|
|
64
|
+
Flagged reads are chopped at the artifact junction. Sub-reads ≥ 100 bp are written to the output; shorter fragments are discarded. Junctions on non-standard contigs (alt loci, unplaced scaffolds) are excluded via a standard-chromosome whitelist.
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Create environment with all dependencies
|
|
70
|
+
mamba env create -f environment.yml
|
|
71
|
+
mamba activate directclean
|
|
72
|
+
|
|
73
|
+
# Install DirectClean
|
|
74
|
+
poetry install
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
External tools (minimap2, samtools, breakinator, restrander) are included in the conda environment. To install them separately:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
mamba install -c bioconda minimap2 samtools breakinator
|
|
81
|
+
mamba install -c genomedk restrander
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Usage
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
directclean \
|
|
88
|
+
-i raw_reads.fastq \
|
|
89
|
+
-r genome.fa \
|
|
90
|
+
-o results/ \
|
|
91
|
+
-t 8 \
|
|
92
|
+
-j gencode.v41.bed12
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The `-j` flag provides a junction BED file for guided alignment (recommended: GENCODE annotation in BED12 format).
|
|
96
|
+
|
|
97
|
+
### Key parameters
|
|
98
|
+
|
|
99
|
+
| Flag | Default | Description |
|
|
100
|
+
| :--- | :--- | :--- |
|
|
101
|
+
| `-i`, `--input` | required | Raw FASTQ from ONT direct-cDNA sequencing |
|
|
102
|
+
| `-r`, `--reference` | required | Reference genome FASTA |
|
|
103
|
+
| `-o`, `--output` | required | Output directory |
|
|
104
|
+
| `-t`, `--threads` | 4 | Threads for minimap2, samtools, breakinator |
|
|
105
|
+
| `-j`, `--junc-bed` | none | Junction BED12 for guided alignment |
|
|
106
|
+
| `--density-threshold` | 0.85 | A/T density threshold for homopolymer detection |
|
|
107
|
+
| `--min-run` | 5 | Minimum consecutive A/T run length |
|
|
108
|
+
| `--min-confidence` | 2 | Minimum adapter signals (1–3) required to chop |
|
|
109
|
+
| `--context-window` | 50 | Bases flanking each junction for scanning |
|
|
110
|
+
| `--html-report` | off | Generate an interactive HTML summary report |
|
|
111
|
+
|
|
112
|
+
Run `directclean -h` for the full list.
|
|
113
|
+
|
|
114
|
+
## Output
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
results/
|
|
118
|
+
├── directclean.cleaned.fastq All clean reads + rescued sub-reads
|
|
119
|
+
├── directclean.rescued.fastq Sub-reads rescued by homopolymer chopping
|
|
120
|
+
├── directclean.homopolymer_report.tsv Per-read artifact classification
|
|
121
|
+
├── directclean.report.html Interactive HTML report (if --html-report)
|
|
122
|
+
├── intermediates/
|
|
123
|
+
│ ├── directclean.no_foldback.fastq After Stage 1
|
|
124
|
+
│ ├── directclean.restranded.fastq After Stage 2
|
|
125
|
+
│ ├── directclean.unknowns_rescued.fastq Stage 3 output
|
|
126
|
+
│ ├── directclean.rescued.fastq After Stage 4
|
|
127
|
+
│ ├── directclean.merged.fastq Stage 3 + Stage 4 merged
|
|
128
|
+
│ └── directclean.aligned.sorted.bam Minimap2 alignment
|
|
129
|
+
└── reports/
|
|
130
|
+
└── directclean.rescue_report.tsv Stage 4 adapter rescue details
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The primary output is `directclean.cleaned.fastq`. This file contains all reads that passed the pipeline plus rescued sub-reads from Stages 3, 4, and 5, ready for downstream transcript quantification (e.g., IsoQuant, FLAIR) and gene fusion calling (e.g., FusionSeeker, JAFFAL).
|
|
134
|
+
|
|
135
|
+
### HTML Report
|
|
136
|
+
|
|
137
|
+
DirectClean generates an interactive HTML report with per-stage statistics and read flow visualization.
|
|
138
|
+
|
|
139
|
+
<p align="center">
|
|
140
|
+
<img src="assets/html.png" width="800" alt="DirectClean HTML Report Preview">
|
|
141
|
+
</p>
|
|
142
|
+
|
|
143
|
+
## Citation
|
|
144
|
+
|
|
145
|
+
If you use DirectClean in your research, please cite our manuscript along with the foundational tools integrated into this pipeline:
|
|
146
|
+
|
|
147
|
+
- **DirectClean:** Guo, Q., Li, Y., & Yang, R. (2026). DirectClean: a comprehensive preprocessing toolkit for Oxford Nanopore direct-cDNA sequencing. *Manuscript in preparation*.
|
|
148
|
+
- **Breakinator:** Heinz, J. M., Meyerson, M., & Li, H. (2026). Detecting foldback artifacts in long-reads. *BMC Genomics*.
|
|
149
|
+
- **Restrander:** Schuster, J., Ritchie, M. E., & Gouil, Q. (2023). Restrander: rapid orientation and artefact removal for long-read cDNA data. *NAR Genomics and Bioinformatics*, 5(4), lqad108.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|
|
154
|
+
|
|
155
|
+
## Contact
|
|
156
|
+
|
|
157
|
+
- Qingxiang Guo — qingxiang.guo@northwestern.edu
|
|
158
|
+
- Rendong Yang Lab — https://github.com/ylab-hi
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "directclean"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Strand orientation, artifact removal, and chimeric read rescue for ONT direct-cDNA, eliminates foldback inversions and homopolymer RT template switching artifacts"
|
|
5
|
+
authors = ["Qingxiang Guo <qingxiang.guo@northwestern.edu>"]
|
|
6
|
+
license = "MIT"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
homepage = "https://github.com/ylab-hi/DirectClean"
|
|
9
|
+
repository = "https://github.com/ylab-hi/DirectClean"
|
|
10
|
+
keywords = ["nanopore", "direct-cdna", "rna-seq", "preprocessing", "chimeric-read", "rt-artifact"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Intended Audience :: Science/Research",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3.10",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
18
|
+
]
|
|
19
|
+
packages = [{include = "directclean", from = "src"}]
|
|
20
|
+
include = ["src/directclean/external/configs/*.json"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
[tool.poetry.dependencies]
|
|
24
|
+
python = "^3.10"
|
|
25
|
+
pysam = ">=0.21.0"
|
|
26
|
+
biopython = ">=1.81"
|
|
27
|
+
typer = {extras = ["all"], version = ">=0.9.0"}
|
|
28
|
+
rich = ">=13.0.0"
|
|
29
|
+
edlib = ">=1.3.9"
|
|
30
|
+
|
|
31
|
+
[tool.poetry.scripts]
|
|
32
|
+
directclean = "directclean.cli.app:app"
|
|
33
|
+
|
|
34
|
+
[build-system]
|
|
35
|
+
requires = ["poetry-core"]
|
|
36
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DirectClean — Remove RT artifacts from Oxford Nanopore Direct-cDNA sequencing.
|
|
3
|
+
|
|
4
|
+
A comprehensive preprocessing pipeline that detects and removes:
|
|
5
|
+
1. Internal TSO/RTP adapter chimeras (Rescuer module)
|
|
6
|
+
2. Homopolymer-mediated RT template switching artifacts (Filter module)
|
|
7
|
+
|
|
8
|
+
Typical CLI usage::
|
|
9
|
+
|
|
10
|
+
directclean -i reads.fastq -r genome.fa -o results/ -t 8
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.0"
|
|
14
|
+
__author__ = "Qingxiang Guo"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""DirectClean CLI package."""
|