Answers.Body: <pre><code>import Bio
  from Bio.Seq import Seq
  my_seq = Seq(&quot;aaaaaaaaaaatttttttttttgaattccccccccccggggggggggg&quot;)
  from Bio.Restriction import *
  print(EcoRI.search(my_seq))
  print(EcoRI.catalyse(my_seq))
  </code></pre>
  <blockquote>
  <p>Actully the EcoRI cuts the DNA after G in restriction site GAATTC.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T12:22:25.473Z
Answers.Text: Okay my apologies, optical analysis is one of the reasons why bioinformatics is so important. You can mark your post as 'accepted'.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T04:25:06.340Z
Answers.LastActivityDate: 2020-11-10T04:25:06.340Z
Answers.UserDisplayName: amardeep
Body: <p>Seq =
  AAAAAAAAAAATTTTTTTTTTTGAATTCCCCCCCCCCCGGGGGGGGGGG</p>
  <p>Restriction site = GAATTC</p>
  <p>I want to cut the sequence at GA/ATTC</p>
  <p>I tried split method in python but It does not cut at GA/ATTC.
  Please help</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-08T12:06:31.357Z
Comments.Text: Have you looked up the documentation on working with restriction enzymes in biopython? http://biopython.org/DIST/docs/cookbook/Restriction.html#1.3
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-08T13:44:16.373Z
Comments.Text: Nice documentation It really helped me. Thanks.
Comments.UserDisplayName: amardeep
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-08T14:01:28.127Z
Comments.Text: If you're able to do this after actually reading the documentation then please post a working example as an answer for others.
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-10T06:03:19.717Z
Comments.Text: The obvious bare native Python `'AAAAAAAAAAATTTTTTTTTTTGAATTCCCCCCCCCCCGGGGGGGGGGG'.split('GAATTC')` produces what I expect.
Comments.UserDisplayName: tripleee
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-10T14:45:27.303Z
Comments.Text: @tripleee, your solution would not reflect the "true biology" The restriction enzyme cuts within the recognized bases and the two resulting fragments would contain a part (different parts obviously) of the restriction site.
Comments.UserDisplayName: haci
Tags: <python>
Title: I want to write python program to cut a DNA sequence at an EcoRI restriction site and print the two fragments after cutting
ThreadText: # I want to write python program to cut a DNA sequence at an EcoRI restriction site and print the two fragments after cutting
  
  (Asked by: username_0 on 2020-11-08)
  
  Seq =
  AAAAAAAAAAATTTTTTTTTTTGAATTCCCCCCCCCCCGGGGGGGGGGG
  
  Restriction site = GAATTC
  
  I want to cut the sequence at GA/ATTC
  
  I tried split method in python but It does not cut at GA/ATTC.
  Please help
  
  **Tags:** python
  
  > **Comments:**
  > **username_1**: Have you looked up the documentation on working with restriction enzymes in biopython? http://biopython.org/DIST/docs/cookbook/Restriction.html#1.3  
  > **username_0**: Nice documentation It really helped me. Thanks.  
  > **username_1**: If you're able to do this after actually reading the documentation then please post a working example as an answer for others.  
  > **username_2**: The obvious bare native Python `'AAAAAAAAAAATTTTTTTTTTTGAATTCCCCCCCCCCCGGGGGGGGGGG'.split('GAATTC')` produces what I expect.  
  > **username_3**: @username_2, your solution would not reflect the "true biology" The restriction enzyme cuts within the recognized bases and the two resulting fragments would contain a part (different parts obviously) of the restriction site.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-11-10. Score: 3 | Accepted answer
  
  ```
  import Bio
  from Bio.Seq import Seq
  my_seq = Seq("aaaaaaaaaaatttttttttttgaattccccccccccggggggggggg")
  from Bio.Restriction import *
  print(EcoRI.search(my_seq))
  print(EcoRI.catalyse(my_seq))
  
  ```
  
  > Actully the EcoRI cuts the DNA after G in restriction site GAATTC.
  
  > **Comments:**
  > **username_4**: Okay my apologies, optical analysis is one of the reasons why bioinformatics is so important. You can mark your post as 'accepted'.  
  
  ---
  
  