isONcorrect
isONcorrect error-corrects Oxford Nanopore cDNA reads. It handles highly variable coverage and exon variation within reads, and leverages regions shared between reads from different isoforms to reach low error rates even for low-abundance transcripts. See the paper.
v0.2.0 — isONcorrect is now written in Rust
Same command line, so existing pipelines do not need editing. About 10x faster, uses less memory, and more accurate — a bug in region selection meant every previous version corrected fewer regions than it should have. Corrected output therefore differs from earlier releases.
The Python implementation is still here but is deprecated, kept as the reference the Rust version is verified against. Details, numbers, and the removed flags: CHANGELOG.md.
Install
Needs a Rust toolchain (1.85+) and nothing else — no C/C++ toolchain, no CMake.
git clone https://github.com/ksahlin/isONcorrect.git
cd isONcorrect
cargo build --release --manifest-path rust/Cargo.toml
This builds two binaries, isONcorrect and run_isoncorrect, in
rust/target/release/. Copy them somewhere on your PATH.
No Rust? curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Prefer not to build? Binaries for Linux and macOS (x86_64, arm64) are attached to
release v0.2.0. Linux comes in two
flavours: take musl if your glibc is older than 2.34 (CentOS 7, RHEL 8, Ubuntu 20.04) or you would
rather not check, and gnu otherwise — see CHANGELOG.md.
For the full pipeline you also want pychopper and isONclust:
conda create -n isoncorrect python=3.9 pip && conda activate isoncorrect
pip install isONclust
conda install -c bioconda "hmmer>=3.0" "pychopper>=2.0"
The deprecated Python version, if you need it to reproduce the paper:
pip install isONcorrect && conda install -c bioconda spoa.
Test the install
From the repository root:
rust/target/release/isONcorrect --fastq test_data/isoncorrect/0.fastq --outfolder /tmp/isoncorrect_test
Under a second. Writes /tmp/isoncorrect_test/corrected_reads.fastq — 100 reads, same headers as the
input, corrected sequences.
Run
One command for the whole pipeline:
./scripts/correction_pipeline.sh raw_reads.fq outfolder 20 # reads, outdir, cores
Or the steps yourself — pychopper for full-length reads, isONclust to group them into genes, then isONcorrect per cluster:
cdna_classifier.py raw_reads.fq out/full_length.fq -t 20
isONclust --t 20 --ont --fastq out/full_length.fq --outfolder out/clustering
isONclust write_fastq --N 1 --clusters out/clustering/final_clusters.tsv \
--fastq out/full_length.fq --outfolder out/clustering/fastq_files
run_isoncorrect --t 20 --fastq_folder out/clustering/fastq_files --outfolder out/correction
cat out/correction/*/corrected_reads.fastq > out/all_corrected_reads.fq
Reads need not be full-length, but running pychopper first is advised for downstream analysis.
Output is one corrected_reads.fastq per cluster with the input headers. Note the quality string
is not real — it is + repeated to the length of the sequence, as in the Python version.
Useful flags (--help for the rest): --split_wrt_batches cuts runtime when isONclust produces a
few very large clusters; --split_mod n --residual i spreads run_isoncorrect across n nodes;
--k 9 --w 10 --max_seqs 1000 reproduces the paper's settings rather than the faster defaults.
Paper data
The result data behind the paper used to be committed here, making the repo ~2.4 GB to clone. It is
now on Zenodo — https://zenodo.org/records/21920617 — and tools/fetch_data.sh restores and
checksums it into data/. You only need it to regenerate the paper figures under paper/.
Because the data was stripped from history, commit SHAs from before the rewrite no longer resolve.
Credits
Please cite:
Sahlin, K., Medvedev, P. Error correction enables use of Oxford Nanopore technology for reference-free transcriptome analysis. Nat Commun 12, 2 (2021). https://doi.org/10.1038/s41467-020-20340-8
Licence
GPL v3.0, see LICENSE.txt.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isoncorrect-0.2.0.tar.gz.
File metadata
- Download URL: isoncorrect-0.2.0.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47c30e762c22960bbc6a145646ab48df3eebc1671ffa332a67ed993aea2a380a
|
|
| MD5 |
63248b76b02f076d3330ceb38e51a7ab
|
|
| BLAKE2b-256 |
4c37f9c5f0369e8a1379e6c61aa002742d122943ee674c5371f5b9e428f18688
|
File details
Details for the file isoncorrect-0.2.0-py3-none-any.whl.
File metadata
- Download URL: isoncorrect-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5517b3adf6e180c34580f0d8588cca0bd339722808e1fb33070e26519d957d8
|
|
| MD5 |
1ba9f33bd307f2a5019f936991da94d3
|
|
| BLAKE2b-256 |
ac4ddc33a6c8dd930a9d1715e394fd31419370f15eda798ef5b4a01ec0400aa0
|