{"id":16755342,"url":"https://github.com/natir/yacrd","last_synced_at":"2025-05-09T01:44:39.915Z","repository":{"id":53107920,"uuid":"127210384","full_name":"natir/yacrd","owner":"natir","description":"Yet Another Chimeric Read Detector","archived":false,"fork":false,"pushed_at":"2024-11-07T16:30:42.000Z","size":38361,"stargazers_count":78,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T09:53:40.537Z","etag":null,"topics":["bioinformatics","chimera","long-reads","sequence"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natir.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-28T23:29:17.000Z","updated_at":"2025-03-15T13:06:43.000Z","dependencies_parsed_at":"2025-04-13T09:53:48.409Z","dependency_job_id":"d9938546-cbde-48b7-9126-44355599d38c","html_url":"https://github.com/natir/yacrd","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natir%2Fyacrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natir%2Fyacrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natir%2Fyacrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natir%2Fyacrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natir","download_url":"https://codeload.github.com/natir/yacrd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","chimera","long-reads","sequence"],"created_at":"2024-10-13T03:07:24.522Z","updated_at":"2025-05-09T01:44:39.891Z","avatar_url":"https://github.com/natir.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/natir/yacrd/blob/master/LICENSE)\n![CI](https://github.com/natir/yacrd/workflows/CI/badge.svg)\n[![CodeCov](https://codecov.io/gh/natir/yacrd/branch/master/graph/badge.svg)](https://codecov.io/gh/natir/yacrd)\n\n# Yet Another Chimeric Read Detector for long reads  🧬 💻\n\nUsing all-against-all read mapping, yacrd performs:\n\n1. computation of pile-up coverage for each read\n2. detection of chimeras\n\nChimera detection is done as follows:\n\n1. for each region where coverage is smaller or equal than `min_coverage` (default 0), yacrd creates a _bad region_.\n2. 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`\n3. if total _bad region_ length \u003e 0.8 * read length, the read is marked as `NotCovered`\n4. if a read isn't `Chimeric` or `NotCovered` is `NotBad`\n\n- [Rationale](#rationale)\n- [Input](#input)\n- [Output](#output)\n- [Requirements](#requirements)\n- [How to use Yacrd](#how-to-use-yacrd)\n- [Minimum supported Rust version](#minimum-supported-rust-version)\n- [Citation](#citation)\n\n**WARNING:**\n\nMinimap2 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](https://github.com/natir/yacrd/issues/57) (thanks to Rohit-Satyam for testing), but if you use higher version it's at your own risk.\n\n## Rationale\n\nLong read error-correction tools usually detect and also remove chimeras. But it is difficult to isolate or retrieve information from just this step.\n\nDAStrim (from the [DASCRUBBER suite](https://github.com/thegenemyers/DASCRUBBER) 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.\n\nThis [repository](https://github.com/natir/yacrd-and-fpa-upstream-tools-for-lr-genome-assembly) contains a set of scripts to evaluate yacrd against other similar tools such as [DASCRUBBER](https://github.com/thegenemyers/DASCRUBBER/) and [miniscrub](https://bitbucket.org/berkeleylab/jgi-miniscrub) on real data sets.\n\n## Input\n\nAny set of long reads (PacBio, Nanopore, anything that can be given to [minimap2](https://github.com/lh3/minimap2)).\nyacrd takes the resulting PAF (Pairwise Alignement Format) from minimap2 or BLASR m4 file from some other long reads overlapper as input.\n\n## Requirements\n\n- [Rust](https://www.rust-lang.org/) in stable channel\n- libgz\n- libbzip2\n- liblzma\n- [minimap2](https://github.com/lh3/minimap2) \u003c= v2.18\n\n## Instalation\n\n### With conda\n\nyacrd is avaible in [bioconda channel](https://bioconda.github.io/)\n\nif bioconda channel is setup you can run :\n\n```\nconda install yacrd\n```\n\n### From source\n\n```\ngit clone https://github.com/natir/yacrd.git\ncd yacrd\ngit checkout v0.6.2\n\ncargo build\ncargo test\ncargo install --path .\n```\n\n## How to use Yacrd\n\n### Find chimera\n\n```\nminimap2 -x {corresponding preset} reads.fq reads.fq \u003e overlap.paf\nyacrd -i overlap.paf -o reads.yacrd\n```\n\n### Post-detection operation\n\nyacrd can perform some post-detection operation:\n\n- filter: for sequence or overlap file, record with reads marked as Chimeric or NotCovered isn't write in output\n- extract: for sequence or overlap file, record contains reads marked as Chimeric or NotCovered is write in output\n- split: for sequence file bad region in middle of reads are removed, NotCovered read is removed\n- scrubb: for sequence file all bad region are removed, NotCovered read is removed\n\n```\nminimap2 -x {corresponding preset} reads.fq reads.fq \u003e mapping.paf\nyacrd -i mapping.paf -o reads.yacrd filter -i reads.fasta -o reads.filter.fasta\nyacrd -i mapping.paf -o reads.yacrd extract -i reads.fasta -o reads.extract.fasta\nyacrd -i mapping.paf -o reads.yacrd split -i reads.fasta -o reads.split.fasta\nyacrd -i mapping.paf -o reads.yacrd scrubb -i reads.fasta -o reads.scrubb.fasta\n```\n\n### Read scrubbing overlapping recommended parameter\n\nWe recommended this parameter for dataset with coverage upper than **30x**.\n\nFor 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`).\n\nThis is an exemple of how run a yacrd scrubbing:\n```\nminimap2 -x ava-ont -g 500 reads.fasta reads.fasta \u003e overlap.paf\nyacrd -i overlap.paf -o report.yacrd -c 4 -n 0.4 scrubb -i reads.fasta -o reads.scrubb.fasta\n```\n\nFor 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`).\n\n```\nminimap2 -x ava-pb -g 800 reads.fasta reads.fasta \u003e overlap.paf\nyacrd -i overlap.paf -o report.yacrd -c 4 -n 0.4 scrubb -i reads.fasta -o reads.scrubb.fasta\n```\n\nFor 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`).\n\n```\nminimap2 -x ava-pb -g 5000 reads.fasta reads.fasta \u003e overlap.paf\nyacrd -i overlap.paf -o report.yacrd -c 3 -n 0.4 scrubb -i reads.fasta -o reads.scrubb.fasta\n```\n\nIf you have parameter sets for other types of data do not hesitate to make a pull request to add them, thanks.\n\n### Important note\n\n#### Extension\n\nyacrd use extension to detect format file if your filename contains (anywhere):\n- `.paf`: file is consider has minimap file\n- `.m4`, `.mhap`: file is consider has blasr m4 file (mhap output)\n- `.fa`, `.fasta`: file is consider has fasta file\n- `.fq`, `.fastq`: file is consider has fastq file\n- `.yacrd`: file is consider has yacrd output file\n\n#### Compression\n\nyacrd 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.\n\n#### Use yacrd report as input\n\nYou can use yacrd report as input in place of overlap file, `ondisk` option are ignored if you use yarcd report has input.\n\n## Output\n\n```\ntype_of_read    id_in_mapping_file  length_of_read  length_of_gap,begin_pos_of_gap,end_pos_of_gap;length_of_gap,be…\n```\n\n### Example\n\n```\nNotCovered readA 4599    3782,0,3782\n```\n\nHere, readA doesn't have sufficient coverage, there is a zero-coverage region of length 3782bp between positions 0 and 3782.\n\n```\nChimeric    readB   10452   862,1260,2122;3209,4319,7528\n```\n\nHere, readB is chimeric with 2 zero-coverage regions: one between bases 1260 and 2122, another between 4319 and 7528.\n\n## Minimum supported Rust version\n\nCurrently the minimum supported Rust version is 1.74.\n\n## Citation\n\nIf you use yacrd in your research, please cite the following publication:\n\n```\nPierre Marijon, Rayan Chikhi, Jean-Stéphane Varré, yacrd and fpa: upstream tools for long-read genome assembly, Bioinformatics, btaa262, https://doi.org/10.1093/bioinformatics/btaa262\n```\n\nbibtex format:\n```\n@article {@article{Marijon_2020,\n\tdoi = {10.1093/bioinformatics/btaa262},\n\turl = {https://doi.org/10.1093%2Fbioinformatics%2Fbtaa262},\n\tyear = 2020,\n\tmonth = {apr},\n\tpublisher = {Oxford University Press ({OUP})},\n\tauthor = {Pierre Marijon and Rayan Chikhi and Jean-St{\\'{e}}phane Varr{\\'{e}}},\n\teditor = {Inanc Birol},\n\ttitle = {yacrd and fpa: upstream tools for long-read genome assembly},\n\tjournal = {Bioinformatics}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatir%2Fyacrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatir%2Fyacrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatir%2Fyacrd/lists"}