Yet Another Chimeric Read Detector for long reads 🧬 💻
Using all-against-all read mapping, yacrd performs:
computation of pile-up coverage for each read
detection of chimeras
Chimera detection is done as follows:
for each region where coverage is smaller or equal than min_coverage (default 0), yacrd creates a bad region.
if there is a bad region that starts at a position strictly after the beginning of the read and ends strictly before the end of the read, the read is marked as Chimeric
if total bad region length > 0.8 * read length, the read is marked as NotCovered
Minimap2 v2.19 introduce some change in selection of seed and chaining of this seed to generate overlap. This change could have an impacte on yacrd behavior, it’s seems not so important (thanks to Rohit-Satyam for testing), but if you use higher version it’s at your own risk.
Rationale
Long read error-correction tools usually detect and also remove chimeras. But it is difficult to isolate or retrieve information from just this step.
DAStrim (from the DASCRUBBER suite does a similar job to yacrd but relies on a different mapping step, and uses different (likely more advanced) heuristics. Yacrd is simpler and easier to use.
This repository contains a set of scripts to evaluate yacrd against other similar tools such as DASCRUBBER and miniscrub on real data sets.
Input
Any set of long reads (PacBio, Nanopore, anything that can be given to minimap2).
yacrd takes the resulting PAF (Pairwise Alignement Format) from minimap2 or BLASR m4 file from some other long reads overlapper as input.
We recommended this parameter for dataset with coverage upper than 30x.
For nanopore data, we recommend using minimap2 with all-vs-all nanopore preset with a maximal distance between seeds fixe to 500 (option -g 500) to generate overlap. We recommend to run yacrd with minimal coverage fixed to 4 (option -c) and minimal coverage of read fixed to 0.4 (option -n).
For pacbio P6-C4 data, we recommend to use minimap2 with all-vs-all pacbio preset with a maximal distance between seeds fixe to 800 (option -g 800) to generate overlap. We recommend to run yacrd with minimal coverage fixed to 4 (option -c 4) and minimal coverage of read fixed to 0.4 (option -n 0.4).
For pacbio Sequel data, we recommend to use minimap2 with all-vs-all pacbio preset with a maximal distance between seeds fixe to 5000 (option -g 5000) to generate overlap. We recommand to run yacrd with minimal coverage fixed to 3 (option -c 3) and minimal coverage of read fixed to 0.4 (option -n 0.4).
If you have parameter sets for other types of data do not hesitate to make a pull request to add them, thanks.
Important note
Extension
yacrd use extension to detect format file if your filename contains (anywhere):
.paf: file is consider has minimap file
.m4, .mhap: file is consider has blasr m4 file (mhap output)
.fa, .fasta: file is consider has fasta file
.fq, .fastq: file is consider has fastq file
.yacrd: file is consider has yacrd output file
Compression
yacrd automatically detect file if is compress or not (gzip, bzip2 and lzma compression is available). For post-detection operation, if input is compressed output have the same compression format.
Use yacrd report as input
You can use yacrd report as input in place of overlap file, ondisk option are ignored if you use yarcd report has input.
Yet Another Chimeric Read Detector for long reads 🧬 💻
Using all-against-all read mapping, yacrd performs:
Chimera detection is done as follows:
min_coverage(default 0), yacrd creates a bad region.ChimericNotCoveredChimericorNotCoveredisNotBadWARNING:
Minimap2 v2.19 introduce some change in selection of seed and chaining of this seed to generate overlap. This change could have an impacte on yacrd behavior, it’s seems not so important (thanks to Rohit-Satyam for testing), but if you use higher version it’s at your own risk.
Rationale
Long read error-correction tools usually detect and also remove chimeras. But it is difficult to isolate or retrieve information from just this step.
DAStrim (from the DASCRUBBER suite does a similar job to yacrd but relies on a different mapping step, and uses different (likely more advanced) heuristics. Yacrd is simpler and easier to use.
This repository contains a set of scripts to evaluate yacrd against other similar tools such as DASCRUBBER and miniscrub on real data sets.
Input
Any set of long reads (PacBio, Nanopore, anything that can be given to minimap2). yacrd takes the resulting PAF (Pairwise Alignement Format) from minimap2 or BLASR m4 file from some other long reads overlapper as input.
Requirements
Instalation
With conda
yacrd is avaible in bioconda channel
if bioconda channel is setup you can run :
From source
How to use Yacrd
Find chimera
Post-detection operation
yacrd can perform some post-detection operation:
Read scrubbing overlapping recommended parameter
We recommended this parameter for dataset with coverage upper than 30x.
For nanopore data, we recommend using minimap2 with all-vs-all nanopore preset with a maximal distance between seeds fixe to 500 (option
-g 500) to generate overlap. We recommend to run yacrd with minimal coverage fixed to 4 (option-c) and minimal coverage of read fixed to 0.4 (option-n).This is an exemple of how run a yacrd scrubbing:
For pacbio P6-C4 data, we recommend to use minimap2 with all-vs-all pacbio preset with a maximal distance between seeds fixe to 800 (option
-g 800) to generate overlap. We recommend to run yacrd with minimal coverage fixed to 4 (option-c 4) and minimal coverage of read fixed to 0.4 (option-n 0.4).For pacbio Sequel data, we recommend to use minimap2 with all-vs-all pacbio preset with a maximal distance between seeds fixe to 5000 (option
-g 5000) to generate overlap. We recommand to run yacrd with minimal coverage fixed to 3 (option-c 3) and minimal coverage of read fixed to 0.4 (option-n 0.4).If you have parameter sets for other types of data do not hesitate to make a pull request to add them, thanks.
Important note
Extension
yacrd use extension to detect format file if your filename contains (anywhere):
.paf: file is consider has minimap file.m4,.mhap: file is consider has blasr m4 file (mhap output).fa,.fasta: file is consider has fasta file.fq,.fastq: file is consider has fastq file.yacrd: file is consider has yacrd output fileCompression
yacrd automatically detect file if is compress or not (gzip, bzip2 and lzma compression is available). For post-detection operation, if input is compressed output have the same compression format.
Use yacrd report as input
You can use yacrd report as input in place of overlap file,
ondiskoption are ignored if you use yarcd report has input.Output
Example
Here, readA doesn’t have sufficient coverage, there is a zero-coverage region of length 3782bp between positions 0 and 3782.
Here, readB is chimeric with 2 zero-coverage regions: one between bases 1260 and 2122, another between 4319 and 7528.
Minimum supported Rust version
Currently the minimum supported Rust version is 1.74.
Citation
If you use yacrd in your research, please cite the following publication:
bibtex format: