Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.
/ protein_translation Public archive

A crate to translate `&str` or `String` of `RNA` sequence with nucleotide into a `Vec<&str>` of their appropriate protein names.

License

Notifications You must be signed in to change notification settings

Feohr/protein_translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protein_translation

LICENSE crates.io Version

A crate to translate &str or String of RNA sequence with nucleotide into a Vec<&str> of their appropriate protein names.

Explaination

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.

Example

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,
        );
    }

About

A crate to translate `&str` or `String` of `RNA` sequence with nucleotide into a `Vec<&str>` of their appropriate protein names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages