Crates.io | protein_translation |
lib.rs | protein_translation |
version | 0.1.2 |
source | src |
created_at | 2023-05-09 18:19:57.26596 |
updated_at | 2023-05-11 09:23:57.903327 |
description | A crate to translate &str or String of RNA sequence with nucleotide into a Vec<&str> of their appropriate protein names. |
homepage | |
repository | https://github.com/Feohr/protein_translation |
max_upload_size | |
id | 860748 |
size | 10,434 |
A crate to translate &str
or String
of RNA
sequence with nucleotide into a Vec<&str>
of
their appropriate protein names.
A codon is a DNA or RNA sequence of three nucleotides (a trinucleotide) that forms a unit of genomic information encoding a particular amino acid or signaling the termination of protein synthesis (stop signals). DNA and the corresponding messenger RNA are made up of a series of bases (nucleotides). In RNA, these bases are often labeled with the letters A, U, C, and G. A set of three bases makes up a codon. These codons have their corresponding protein names that are parsed until the STOP codon is found.
use protein_translation::*;
fn main() {
let rna = "AUGUUUUCUUAAAUG".to_string();
let protein_vec = rna.protein_translate().unwrap();
assert_eq!(
vec!["Methionine", "Phenylalanine", "Serine"],
protein_vec,
);
}