Hey everyone!
I was just hoping for some help with logic on a bioinformatics solution that I'm working on.
I have an assignment for a bioinformatics class where the professor has given us a file with a long DNA sequence. We are supposed to read in the sequence and find as many non-overlapping genes as possible.
I'm currently using one 'for loop' with an if statement to find the start codon and then a nested for loop with an if statement to find the stop codon. Unfortunately my code is still identifying extra start codons that exist before a stop codon but after the first start codon.
i.e.,
ATGCCCAAATTTATGCCCTAG
^^^ ^^^ ***
Is there a way to prevent this by redirecting the loop in some way. I have included the code for the for loop below.
I would like some guidance, but I do NOT need a coded solution to my problem. Some specific commands or logic help would be much appreciated though