https://github.com/linsalrob/get_orfs
C code to translate a DNA sequence using different translation tables. Designed to be fast and lightweight, with few dependencies (only zlib and pthreads)
https://github.com/linsalrob/get_orfs
Last synced: over 1 year ago
JSON representation
C code to translate a DNA sequence using different translation tables. Designed to be fast and lightweight, with few dependencies (only zlib and pthreads)
- Host: GitHub
- URL: https://github.com/linsalrob/get_orfs
- Owner: linsalrob
- License: mit
- Created: 2023-12-31T01:44:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T00:08:27.000Z (about 2 years ago)
- Last Synced: 2024-05-28T09:37:40.392Z (about 2 years ago)
- Language: C
- Size: 77.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://edwards.flinders.edu.au)
[](https://opensource.org/licenses/MIT)

[](https://zenodo.org/doi/10.5281/zenodo.11218737)
# get_orfs
C code to translate a DNA sequence using different translation tables. Designed to be fast and lightweight, with few dependencies (only kseq.h, zlib and pthreads).
This is a fast multi-threaded DNA sequence translation application that will convert any DNA sequence to protein sequence.
# Should I use this code?
If you want a light-weight but powerful DNA -> amino-acid translation, then perhaps. You probably want to check out the [Python](https://github.com/linsalrob/genetic_codes) library that includes this C code for an easier interface to access the data, but if you want to process things in snakemake or bash, this may be your easiest bet.
# Building from source
At the moment, the only option I provide is to build this from source, because there is the above-mentioned Python package. If there is interest I might package it using conda.
```
mkdir build
cd build/
cmake ..
make
cmake --install . --prefix ..
cd ..
bin/get_orfs
```
# Using get_orfs
There are only a few options
- `-f` or `--fasta` (required) the `fasta` format DNA sequence file to translate
- `-t` or `--translation_table` the [NCBI translation table](https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?chapter=tgencodes#SG1) to use in the translation
- `-l` or `--length` the minimum length of ORFs to be printed. The default is to print anything one codon or longer, even if that is a stop codon (so we terminate with \*).
> Note:
> An polypeptide sequence that terminates with a stop codon includes a \* at the end (regardless of the stop codon). If the polypeptide terminates at the end of the sequence, it does not include that termination character (unless the last codon happens to be a stop codon in your translation table!).