From 4e50c40e9531f857bd2d75ebdf35dfd1be056810 Mon Sep 17 00:00:00 2001 From: Ravi Shah <63246200+Rav4s@users.noreply.github.com> Date: Tue, 20 Apr 2021 09:30:49 -0500 Subject: [PATCH] Added link to base Rust code --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7cec835..27f1fe3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ G → C For example, `GTACTAGAGCATTT` would be converted to `CAUGAUCUCGUAA`. After this, it looks for a start codon (AUG) and removes anything before that codon. For example, `CAUGAUCUCGUAA` would be converted to `AUGAUCUCGUAA`. Then, it turns the result of the previous step into a vector broken into 3-character items. For example, `AUGAUCUCGUAA` would be converted to `['AUG', 'AUC', 'UCG', 'UAA']`. Then, it looks for a STOP codon (UAA, UAG, UGA) and truncates the vector at that codon. Finally, it uses an awesome [match statement](https://github.com/Rav4s/wasm-dna-transcription-translation/blob/main/src/lib.rs#L109), which is basically a predefined [codon chart](https://www.google.com/search?q=codon+chart&rlz=1C1CHBF_enUS912US912&tbm=isch&source=iu&ictx=1&fir=SVhfz4tRL5GzVM%252Cx4w9lB13r4FJ7M%252C_&vet=1&usg=AI4_-kSuwWL4sbNFjTZd3fkSLRoPujadRw&sa=X&ved=2ahUKEwi7verdq-7sAhVQSK0KHUXZAp8Q9QF6BAgBEFg&biw=1366&bih=625&safe=active&ssui=on#imgrc=SVhfz4tRL5GzVM), to translate each codon to an amino acid. ## What's so special about this? -I'm glad you asked! Unlike a regular program that just transcribes and translates DNA into amino acids, this one utilizes WebAssembly, so you can do it all in a browser. The `index.html` file has a form field, which redirects to `app.html` with a query string in the form `?strand=DNAstrandHere`. The `app.js` file then parses this query string and passes it to the Rust program as input. After transcribing and translating the strand, the Rust program uses `web_sys` to insert the amino acids into the DOM. +I'm glad you asked! Unlike a [regular program](https://github.com/Rav4s/Rust_DNA_transcription_translation) that just transcribes and translates DNA into amino acids, this one utilizes WebAssembly, so you can do it all in a browser. The `index.html` file has a form field, which redirects to `app.html` with a query string in the form `?strand=DNAstrandHere`. The `app.js` file then parses this query string and passes it to the Rust program as input. After transcribing and translating the strand, the Rust program uses `web_sys` to insert the amino acids into the DOM. Of course there's some CSS as well to make it all look nice ✨