Answers.Body: <p>I would honestly just remove the non-homologous cutting site enzymes from the database. Firstly, these are biology students and require a simple picture to grasp the concept of coding via regex pattern matching. Secondly, in a wet-lab nobody uses these enzymes, I was not even aware the "8" existed until your post. In a teaching lab the best motto is "keep it simple".</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-15T23:10:08.817Z
Answers.Text: I was tempted to remove these 8 from the database, and might end up doing so, but I was genuinely impressed with the student who noticed it and told her that I would look into it. Most of the students are actually CS students taking it as an elective, but I have a couple of biology majors or students that have some major-minor combo between CS and biology or chemistry.
Answers.UserDisplayName: John Coleman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T15:50:26.787Z
Answers.Text: I guess the cat is out of the bag. The difference is this is teaching rather than research. In my experience I would create a subproject to avoid distraction, and offer to all students is interested. Thus if you introduce the | and use it to filter the "anomalous 8 restriction enzymes" into a dictionary, panda, or np, to be analysed later if there is interest. Its interesting a core-bioinformatics text has a "bug".
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T16:22:27.077Z
Answers.Text: At first I thought that these enzymes postdated the Tisdall book (which was published in 2001) but a check of the references for these shows that some of them were studied as early as the 1980s. I'll have to check out the book again, it is possible that there was something I missed. It is also possible that in an earlier edition of REBASE these were either missing (since when Tisdall wrote there was only around 1000 enzymes included) or had ? for their recognition sequence. I'll see if it is possible to download earlier versions of it. It could be interesting to see how it changed over time.
Answers.UserDisplayName: John Coleman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-23T03:14:11.443Z
Answers.Text: Keep in mind 1980s the way cleavage sites were determined different than today. Currently, it's easier to find degeneracy in enzyme cleavage site by NGS. You could also email Dr. Rich Roberts (Nobel Laureate)  and Dana Mecelis. I am sure they will get back to you.
Answers.UserDisplayName: Supertech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-15T23:04:32.940Z
Answers.LastActivityDate: 2019-03-15T23:04:32.940Z
Answers.UserDisplayName: M__
Body: <p>In a bioinformatics programming course I am currently teaching (using Python, and approached from a mostly CS rather than a biology background) I assigned a project which involves finding sites where restriction enzymes bind to a DNA sequence. The project is heavily influenced by Chapter 9 of the now classic text "Beginning Perl for Bioinformatics" by James Tisdall. I am using the REBASE database, in particular <a href="http://rebase.neb.com/rebase/rebase.f9.html" rel="nofollow noreferrer">REBASE Format #9</a>. In this format, each restriction enzyme has a recognition sequence which looks like e.g. <code>C^YCGRG</code> where <code>^</code> gives information about the exact cut-point and upper-case letters such as <code>Y</code> and <code>R</code> other than <code>ACGT</code> are ambiguity codes. The point of the project is to turn these into regular expressions where cleavage information is discarded and the ambiguity codes are expanded into character classes, and then use these regular expressions to search for matches.</p>
  
  <p>All fairly straightforward, but one very observant student noticed that some enzymes had multiple sequences, for example <code>M.BssHIII</code> has a total of 5 sequences: <code>ACGCGT,CCGCGG,RGCGCY,RCCGGY,GCGCGC</code>. It is easy to see that these correspond to a total of 11 sequences (after the Rs and Ys are expanded), far fewer than the 144 sequences which would match <code>VSSSSB</code> (which is the least ambiguous single sequence capable of matching the above).</p>
  
  <p>My question is, what is going on here? Am I safe in simply replacing <code>,</code> by <code>|</code> (for "or") in the regular expression, or is there something more subtle going on? Only 8 of the nearly 5000 enzymes have such multiple sequences, and neither the Tisdall book nor even the description of the format (both of which seem to assume single sequences) shed any light on the situation.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-23T03:03:15.907Z
Comments.Text: It's programming exercise. Just use "|" for regex. It would be also biologically correct.
Comments.UserDisplayName: Supertech
Tags: <phylogenetics><phylogeny><database>
Title: Restriction enzymes with multiple recognition sequences
ThreadText: # Restriction enzymes with multiple recognition sequences
  
  (Asked by: username_0 on 2019-03-15)
  
  In a bioinformatics programming course I am currently teaching (using Python, and approached from a mostly CS rather than a biology background) I assigned a project which involves finding sites where restriction enzymes bind to a DNA sequence. The project is heavily influenced by Chapter 9 of the now classic text "Beginning Perl for Bioinformatics" by James Tisdall. I am using the REBASE database, in particular [REBASE Format #9](http://rebase.neb.com/rebase/rebase.f9.html). In this format, each restriction enzyme has a recognition sequence which looks like e.g. `C^YCGRG` where `^` gives information about the exact cut-point and upper-case letters such as `Y` and `R` other than `ACGT` are ambiguity codes. The point of the project is to turn these into regular expressions where cleavage information is discarded and the ambiguity codes are expanded into character classes, and then use these regular expressions to search for matches.
  
  All fairly straightforward, but one very observant student noticed that some enzymes had multiple sequences, for example `M.BssHIII` has a total of 5 sequences: `ACGCGT,CCGCGG,RGCGCY,RCCGGY,GCGCGC`. It is easy to see that these correspond to a total of 11 sequences (after the Rs and Ys are expanded), far fewer than the 144 sequences which would match `VSSSSB` (which is the least ambiguous single sequence capable of matching the above).
  
  My question is, what is going on here? Am I safe in simply replacing `,` by `|` (for "or") in the regular expression, or is there something more subtle going on? Only 8 of the nearly 5000 enzymes have such multiple sequences, and neither the Tisdall book nor even the description of the format (both of which seem to assume single sequences) shed any light on the situation.
  
  **Tags:** phylogenetics, phylogeny, database
  
  > **Comments:**
  > **username_1**: It's programming exercise. Just use "|" for regex. It would be also biologically correct.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-03-15. Score: 3 | Accepted answer
  
  I would honestly just remove the non-homologous cutting site enzymes from the database. Firstly, these are biology students and require a simple picture to grasp the concept of coding via regex pattern matching. Secondly, in a wet-lab nobody uses these enzymes, I was not even aware the "8" existed until your post. In a teaching lab the best motto is "keep it simple".
  
  > **Comments:**
  > **username_0**: I was tempted to remove these 8 from the database, and might end up doing so, but I was genuinely impressed with the student who noticed it and told her that I would look into it. Most of the students are actually CS students taking it as an elective, but I have a couple of biology majors or students that have some major-minor combo between CS and biology or chemistry.  
  > **username_2**: I guess the cat is out of the bag. The difference is this is teaching rather than research. In my experience I would create a subproject to avoid distraction, and offer to all students is interested. Thus if you introduce the | and use it to filter the "anomalous 8 restriction enzymes" into a dictionary, panda, or np, to be analysed later if there is interest. Its interesting a core-bioinformatics text has a "bug".  
  > **username_0**: At first I thought that these enzymes postdated the Tisdall book (which was published in 2001) but a check of the references for these shows that some of them were studied as early as the 1980s. I'll have to check out the book again, it is possible that there was something I missed. It is also possible that in an earlier edition of REBASE these were either missing (since when Tisdall wrote there was only around 1000 enzymes included) or had ? for their recognition sequence. I'll see if it is possible to download earlier versions of it. It could be interesting to see how it changed over time.  
  > **username_1**: Keep in mind 1980s the way cleavage sites were determined different than today. Currently, it's easier to find degeneracy in enzyme cleavage site by NGS. You could also email Dr. Rich Roberts (Nobel Laureate)  and Dana Mecelis. I am sure they will get back to you.  
  
  ---
  
  