{"id":13835822,"url":"https://github.com/smithlabcode/ribotricer","last_synced_at":"2025-10-29T02:56:22.196Z","repository":{"id":34860036,"uuid":"147266969","full_name":"smithlabcode/ribotricer","owner":"smithlabcode","description":"A tool for accurately detecting actively translating ORFs from Ribo-seq data","archived":false,"fork":false,"pushed_at":"2025-01-30T04:57:11.000Z","size":52513,"stargazers_count":39,"open_issues_count":6,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-29T11:28:51.699Z","etag":null,"topics":["bioinformatics","orfs","ribo-seq","ribosome","ribosome-profiling","ribosome-profiling-data","translation","translation-regulation"],"latest_commit_sha":null,"homepage":"http://doi.org/djv4","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smithlabcode.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-04T00:33:51.000Z","updated_at":"2025-07-17T09:42:03.000Z","dependencies_parsed_at":"2023-02-10T05:25:12.534Z","dependency_job_id":"773b1e7c-b8dc-4134-923c-ff2a5686f752","html_url":"https://github.com/smithlabcode/ribotricer","commit_stats":{"total_commits":1044,"total_committers":5,"mean_commits":208.8,"dds":0.564176245210728,"last_synced_commit":"7d11a8ac5b5ea0d19b6c2414ce4fc2802f7aab21"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/smithlabcode/ribotricer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smithlabcode%2Fribotricer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smithlabcode%2Fribotricer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smithlabcode%2Fribotricer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smithlabcode%2Fribotricer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smithlabcode","download_url":"https://codeload.github.com/smithlabcode/ribotricer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smithlabcode%2Fribotricer/sbom","scorecard":{"id":833566,"data":{"date":"2025-08-11","repo":{"name":"github.com/smithlabcode/ribotricer","commit":"d1aa0787798f11448e3e5260b4b3e84d147e78cf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/17 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pythonpackage.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/smithlabcode/ribotricer/pythonpackage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonpackage.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/smithlabcode/ribotricer/pythonpackage.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/pythonpackage.yml:33","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T18:23:15.987Z","repository_id":34860036,"created_at":"2025-08-23T18:23:15.987Z","updated_at":"2025-08-23T18:23:15.987Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281549786,"owners_count":26520515,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","orfs","ribo-seq","ribosome","ribosome-profiling","ribosome-profiling-data","translation","translation-regulation"],"created_at":"2024-08-04T15:00:20.476Z","updated_at":"2025-10-29T02:56:22.166Z","avatar_url":"https://github.com/smithlabcode.png","language":"Python","readme":"![alt text](./ribotricer_logo.png)\n\n# ribotricer: Accurate detection of short and long active ORFs using Ribo-seq data\n\n[![install with pip](https://img.shields.io/pypi/v/ribotricer.svg?style=flat)](https://pypi.org/project/ribotricer/)\n[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/ribotricer/README.html)\n![python versions](https://img.shields.io/pypi/pyversions/ribotricer)\n[![pypi downloads](https://img.shields.io/pypi/dm/ribotricer)](https://pypi.org/project/ribotricer/)\n[![Downloads](https://anaconda.org/bioconda/ribotricer/badges/downloads.svg)](https://anaconda.org/bioconda/ribotricer)\n[![license](https://img.shields.io/pypi/l/ribotricer)](LICENSE)\n\n[Publication](https://academic.oup.com/bioinformatics/advance-article-abstract/doi/10.1093/bioinformatics/btz878/5637228) | [PDF](https://saket-choudhary.me/pdfs/ribotricer_2019.pdf) | [Supplementary File](https://saket-choudhary.me/pdfs/ribotricer_2019.pdf) | [Benchmarking scripts](https://github.com/smithlabcode/ribotricer-results/)\n\n\n## Installation\n\nWe highly recommend that you install ribotricer via [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) in a clean environment: \n\n```bash\nconda create -n ribotricer_env -c bioconda ribotricer\nconda activate ribotricer_env\nribotricer --help\n```\n\nTo install locally, you can either download the source code from release or clone the latest version using ```git clone```.\nAfter you get a copy of the source code, please change into the source directory and run:\n\n```bash\nmake install\n```\n\n**NOTE**: ribotricer will install the following dependencies (If some of these are already present, they might be replaced by the designated version): \n\n```\npyfaidx\u003e=0.5.0\npysam\u003e=0.11.2.2\nnumpy\u003e=1.11.0\npandas\u003e=0.20.3\nscipy\u003e=0.19.1\nmatplotlib\u003e=2.1.0\nclick\u003e=6.0\nclick-help-colors\u003e=0.3\nquicksect\u003e=0.2.0\ntqdm\u003e=4.23.4\n```\n\n\n------------------\n\n## Workflow of ribotricer\n\nIn order to run ribotricer, you need to have the following three files\nprepared including:\n\n* **genome annotation file** in GTF format: our implementation handles\nall variations of GTFs besides the often used GENCODE and Ensembl hosted ones\n* **reference genome file** in FASTA format\n* **alignment file** in BAM format\n\n### Preparing candidate ORFs\n\nThe first step of ribotricer is to take the GTF file and the FASTA file to find all\ncandidate ORFs. In order to generate all candidate ORFs, please run\n\n```bash\nribotricer prepare-orfs --gtf {GTF} --fasta {FASTA} --prefix {RIBOTRICER_INDEX_PREFIX}\n```\n\nThe command above by default only includes ORFs with length longer than 60 nts,\nand only uses 'ATG' as start codon. You can change the setting by including\noptions ```--min_orf_length``` and ```--start_codons```. \n\nOutput: {PREFIX}\\_candidate\\_orfs.tsv.\n\n### Detecting translating ORFs\n\nThe second step of ribotricer is to take the index file generated by ```prepare-orfs```\nand the BAM file to detect the actively translating ORFs by assessing the periodicity\nof all candidate ORFs:\n\n```bash\nribotricer detect-orfs \\\n             --bam {BAM} \\\n             --ribotricer_index {RIBOTRICER_INDEX_PREFIX}_candidate_ORFs.tsv \\\n             --prefix {OUTPUT_PREFIX}\n```\n\n**NOTE**: This above command, by default, uses a phase-score cutoff of 0.428. Our species specific recommended cutoffs\nare as follows:\n\n\n|Species      | Cutoff| \n|-------------|-------|\n|Arabidopsis  | 0.330 |\n|C. elegans   | 0.239 |\n|Baker's Yeast| 0.318 |\n|Drosophila   | 0.181 |\n|Human        | 0.440 |\n|Mouse        | 0.418 |\n|Rat          | 0.453 |\n|Zebrafish    | 0.249 |\n\nIn order to assign `non-translating` or `translating` status, ribotricer by default\nuses a cutoff threshold of `0.428`. ORFs with phase score above `0.428` are marked as \ntranslating as long as they have at least five codons with non-zero read count.\nBy default, ribotricer does not take coverage into account for predicting an ORF to be\ntranslating or not-translating. However, this behavior can be changed by following \nfilters:\n\n- `--min_valid_codons` (default=5): Minimum number of codons with non-zero reads for determining active translation\n- `--min_valid_codons_ratio` (default=0): Minimum ratio of codons with non-zero reads to total codons for determining active translation\n- `--min_reads_per_codon` (default=0): Minimum number of reads per codon for determining active translation\n- `--min_read_density` (default=0.0): Minimum read density (total_reads/length) over an ORF total codons for determining active translation\n\nFor each of the above filters, an ORF failing **any** of the filters is \nmarked as `non-translating`.\n\nFor example, to ensure that each ORF has at least 3/4 of its codons non-empty,\nwe can specify `--min_valid_codons_ratio` to be 0.75:\n\n```\n\nribotricer detect-orfs \\\n             --bam {BAM} \\\n             --ribotricer_index {RIBOTRICER_INDEX_PREFIX}_candidate_ORFs.tsv \\\n             --prefix {OUTPUT_PREFIX}\n             --min_valid_codons_ratio 0.75\n```\n\nThe ORF detection step consists of several small steps including:\n\n1. Infer the experimental protocol (strandedness of the reads)  \nYou can directly assign the strandedness using option ```--stranded```, it can be 'yes',\n'no', or 'reverse'. If this option is not provided, ribotricer will automatically infer the\nexperimental protocol by comparing the strand of reads to the reference.   \n\nOutput: {OUTPUT_PREFIX}\\_protocol.txt\n\n2. Split the bam file by strand and read length  \nIn this step, all mapped reads will be filtered to include only uniquely mapped reads. Reads\nwill be split by strand and read length with respect to the strandedness provided or inferred\nfrom the previous step. If you only want to include certain read lengths, they can be assigned with\noption ```--read_lengths```.  \nOutput: {OUTPUT_PREFIX}\\_bam\\_summary.txt\n\n3. Plot read length distribution  \nIn this step, read length distribution will be plotted and serves as quality control  \nOutput: {OUTPUT_PREFIX}\\_read\\_length\\_dist.pdf\n\n4. Calculate metagene profiles  \nIn this step, the metagene profile of all CDS transcripts for each read length is\ncalculated by aligning with start codon or stop codon.  \nOutput: {OUTPUT_PREFIX}\\_metagene\\_profiles\\_5p.tsv is the metagene profile aligning with the\nstart codon and {OUTPUT_PREFIX}\\_metagene\\_profiles\\_3p.tsv is the metagene profile aligning with\nthe stop codon\n\n5. Plot metagene profiles  \nIn this step, metagene plots will be made to serve as quality control.  \nOutput: {OUTPUT_PREFIX}\\_metagene\\_plots.pdf\n\n6. Align metagene profiles  \nIf the P-site offsets are not provided, this step will use cross-correlation to find out the relative\noffsets between different read lengths  \nOutput: {OUTPUT_PREFIX}\\_psite\\_offsets.txt\n\n7. merge reads from different read lengths based on P-site offsets  \nThis step will integrate reads of different read lengths by shifting with the P-site offsets\n\n8. Export wig file  \nA WIG file is exported in this step to be used for visualization in Genome Browser  \nOutput: {OUTPUT_PREFIX}\\_pos.wig for the positive strand and {OUTPUT_PREFIX}\\_neg.wig for the negative strand.\n\n9. Export actively translating ORFs  \nThe periodicity of all ORF profiles are assessed and the translating ones are outputed. You can output all ORFs regardless\nof the translation status with option ```--report_all```  \nOutput: {OUTPUT_PREFIX}\\_translating\\_ORFs.tsv\n\n------------------\n\n## Definition of ORF types\nRibotricer reports eight different ORF types as defined below:\n* **annotated**: CDS annotated in the provided GTF file\n* **super_uORF**: upstream ORF of the annotated CDS, not overlapping with any CDS of the same gene (first or most upstream uORF)\n* **super_dORF**: downstream ORF of the annotated CDS, not overlapping with any CDS of the same gene  (last or most downstream dORF)\n* **uORF**: upstream ORF of the annotated CDS, not overlapping with the main CDS\n* **dORF**: downstream ORF of the annotated CDS, not overlapping with the main CDS\n* **overlap_uORF**: upstream ORF of the annotated CDS, overlapping with the main CDS\n* **overlap_dORF**: downstream ORF of the annotated CDS, overlapping with the main CDS\n* **novel**: ORF in non-coding genes or in non-coding transcripts of coding genes\n\n------------------\n\n## Learning cutoff empirically from data\n\nRibotricer can also learn cutoff empirically from the data. Given at least one Ribo-seq and one RNA-seq BAM file,\n`ribotricer` learns the cutoff by running one iteration of the algorithm on the provided files with a prespecified\ncutoff (`--phase_score_cutoff`, default: 0.428) and then uses the generated output to find the median difference between Ribo-seq and RNA-seq phase scores of only candidate ORFs with `transcript_type` set to `protein_coding` (`--filter_by_tx_annotation`).\n\n```\nribotricer learn-cutoff --ribo_bams ribo_bam1.bam,ribo_bam2.bam \\\n--rna_bams rna_1.bam \\\n--prefix ribo_rna_prefix \\\n--ribotricer_index {RIBOTRICER_ANNOTATION}\n```\n\n## Visualizing ribotricer output\n\nRibotricer generates a de-noised profile of read counts for each ORF. We can visualize the read distribution for any ORF. For an example,\nsee [this notebook](https://github.com/smithlabcode/ribotricer/blob/master/notebooks/Plotting_ribotricer_profile.ipynb).\n\n\n------------------\n\n## Contacts and bug reports\n\nhttps://github.com/smithlabcode/ribotricer/issues\n\nIf you found a bug or mistake in this project, we would like to know about it.\nBefore you send us the bug report though, please check the following:\n\n1. Are you using the latest version? The bug you found may already have been\n   fixed.\n2. Check that your input is in the correct format and you have selected the\n   correct options.\n3. Please reduce your input to the smallest possible size that still produces\n   the bug; we will need your input data to reproduce the problem, and the\n   smaller you can make it, the easier it will be.\n   \n------------------\n\n## LICENSE\n\nRibotricer for detecting actively translating ORFs from Ribo-seq data\nCopyright (C) 2022 Saket Choudhary, Wenzheng Li, Andrew D Smith, and\nthe University of Southern California\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or (at\nyour option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","funding_links":[],"categories":["ORF Calling"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithlabcode%2Fribotricer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmithlabcode%2Fribotricer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithlabcode%2Fribotricer/lists"}