Error with 'For Loop' for finding non-overlapping genes
1
0
Entering edit mode
8.2 years ago
akash27519 • 0

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

dna genes perl • 1.4k views
ADD COMMENT
0
Entering edit mode
8.2 years ago
GenoMax 141k

Set a flag when you find the first codon and then ignore subsequent ones till you find a stop and complete processing that ORF. Then reset the flag and start looking again. This would have to be modified if you are expected to find all ORF's from all starts.

ADD COMMENT

Login before adding your answer.

Traffic: 1575 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6