Skip to content

Instantly share code, notes, and snippets.

@Synvox
Created June 22, 2013 18:34
Show Gist options
  • Save Synvox/5842022 to your computer and use it in GitHub Desktop.
Save Synvox/5842022 to your computer and use it in GitHub Desktop.
DNA to RNA scrap
(function codon(sequence){
var sequence = sequence.toUpperCase().split('');
var codons = "";
sequence.forEach(function(ch, i){
if (i != 0 && i % 3 === 0) {
returned += " ";
}
switch (ch) {
case 'G':
returned += 'C'
break;
case 'T':
returned += 'A'
break;
case 'A':
returned += 'U'
break;
case 'C':
returned += 'G'
break;
}
});
returned = returned.split(' ');
returned.forEach(function(codon, i){
switch(codon) {
case 'UUU':
return
//UNFINISHED
}
});
return returned;
})('GTCTACAAACAATGCGCCTAGGGTATGGCCCACACCTCACCACTGATTGATCTA');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment