Skip to content

Commit

Permalink
sweep: Create src/utils/codonMapping.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Aug 3, 2023
1 parent 53020e4 commit f0e0590
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions src/utils/codonMapping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
const codonToAminoAcid = (codon) => {
switch (codon) {
case "TTT":
case "TTC":
return "F";
case "TTA":
case "TTG":
case "CTT":
case "CTC":
case "CTA":
case "CTG":
return "L";
case "ATT":
case "ATC":
case "ATA":
return "I";
case "ATG":
return "M";
case "GTT":
case "GTC":
case "GTA":
case "GTG":
return "V";
case "TCT":
case "TCC":
case "TCA":
case "TCG":
case "AGT":
case "AGC":
return "S";
case "CCT":
case "CCC":
case "CCA":
case "CCG":
return "P";
case "ACT":
case "ACC":
case "ACA":
case "ACG":
return "T";
case "GCT":
case "GCC":
case "GCA":
case "GCG":
return "A";
case "TAT":
case "TAC":
return "Y";
case "TAA":
case "TAG":
case "TGA":
return "*";
case "CAT":
case "CAC":
return "H";
case "CAA":
case "CAG":
return "Q";
case "AAT":
case "AAC":
return "N";
case "AAA":
case "AAG":
return "K";
case "GAT":
case "GAC":
return "D";
case "GAA":
case "GAG":
return "E";
case "TGT":
case "TGC":
return "C";
case "TGG":
return "W";
case "CGT":
case "CGC":
case "CGA":
case "CGG":
case "AGA":
case "AGG":
return "R";
case "GGT":
case "GGC":
case "GGA":
case "GGG":
return "G";
default:
return "X";
}
};

export default codonToAminoAcid;

0 comments on commit f0e0590

Please sign in to comment.