2) Identify the start codon: In order for RNA to be translated into
amino acids, it must be in a coding region. Therefore, we will not start
looking for the code for tryptophan until we see the start codon.
The start codon we are looking for is AUG. When you find it, print something
out like "The coding region starts at position X", where X is the position
of the array where you find the first letter of the start codon.
I don't understand how to do this i tried making the program but it giving 333 instead of just 3. can somebody help or explain?
Find the instances of tryptophan, and the end codon: After finding the
start codon, you will be looking for the codon for tryptophan, which is UGG.
You will look until you either reach the end of the input, or see the stop
codon (UAG). After the start codon, each group of 3 bases makes a codon.
Then, you will print out how many times tryptophan is coded for, and where
the coding region ends.
Is there a way for me to break it into 3 bases after the codon? and would this be right if i see UAG it will stop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
void codon (string start)
int position = 0, len = start.length();
char x = 'A';
for (int i = 0; i < len; i++)
if(start[i] == 'A' && start[i+1] == 'U' && start[i+2] == 'G')
position=i+1; // Add 1 since the checking starts with a 0
else(start[i] == 'U' && start[i+1] == 'A' && start[i+2] =='G'break;
if(position > 0)
cout << "The coding region starts at position " << position << endl;
cout << "Could not find the codon region..." << endl;