Skip to main content
7 events
when toggle format what by license comment
Mar 5, 2016 at 5:23 comment added user137 Drawing the map isn't hard either. If linear, the DNA of B bases is a line of P pixels long. So the restriction site at position b is drawn at pixel p where p = P * b/B. When circular, you'll need to calculate the pixel from an angle, where the angle is 360 * b/B.
Mar 5, 2016 at 5:20 comment added user137 Python has good string functions, as do Java and C++. You could make a list of restriction enzymes, probably a map or hashmap. Then you load your DNA sequence as a string and iterate through the list of enzymes, searching for the restriction site in the DNA string, and returning the position of the site in the DNA sequence. If the strings do not match, a -1 will be returned. So if you just want a list, you can print to console or a text file. If you want an image, you need to make a list of restriction sites, with enzyme type and cut location, then use pygame or something to draw the map.
Mar 4, 2016 at 22:30 history edited David CC BY-SA 3.0
Have taken account of the poster's comments and removed suggestion he didn't know what python was etc.
Mar 4, 2016 at 22:15 comment added David OK. I'll edit my answer to take account of that.
Mar 4, 2016 at 19:44 comment added Daniel Bryden Johnson Thanks for the advice David. It was a homework assignment and I did manage to figure it out. My inquiry to whether it was possible using python is one of interest as I've just started learning it
Mar 4, 2016 at 13:48 history edited David CC BY-SA 3.0
Added a couple more points regarding an algorithm to do this.
Mar 3, 2016 at 22:29 history answered David CC BY-SA 3.0