How can I do that if my string is a whole cDNA sequence and the dictionary contains ALL retsriction enzymes? I need to identify all the enzymes that cut the sequence...
Hi.
I need to identify restriction sites of a cDNA sequence in a fasta file. First, I transform the sequence from FASTA to a string and I have created a dictionary which contains recognition sequences and names of all restriction enzymes.
I want to identify these restriction sites using the dictionary... how can I do that?
Thank you.
2 answers
You need to search for each recognition sequence string within the cDNA string.
In python you would use the find() method in the String object.
Is this a real task for your lab or just some class practice?
If you are in the first case you don't have to reinvent the wheel. This is already implemented in biopython...
It's a class practice. I've tried to do it with the Restriction module, but I couldn't, so I decided to create a dictionary with the enzymes...
Could you tell me how I should do this practice with the Retsriction module?
Log in to answer this question.
Do your restriction sites have different length?
Yes, the sequence contains different restriction sites of different lengths
Then this is really hard to do because you don't know how much of your cDNA string you would want to use as a key for the dictionary (because of the different length). I would vote for trying something similar to what Torst is suggesting.
Thank you for your answer.