This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Identify restriction sites of a cDNA sequence using a dictionary

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.

restriction enzymes python biopython dictionary

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.

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.

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...

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...

http://biopython.org/DIST/docs/cookbook/Restriction.html

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.