<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear Sean,<br>
    <br>
    remove the quotes from the restriction enzyme's name, its not a
    string.<br>
    <br>
    This should work:<br>
    >>> from Bio import Restriction as res<br>
    >>> from Bio.Restriction import RestrictionBatch as rb<br>
    >>> from Bio.Seq import Seq<br>
    >>> my_batch = rb([res.EcoRI, res.HindIII])<br>
    >>> my_seq = Seq('GAATTC')<br>
    >>> my_analysis = res.Analysis(my_batch, my_seq)<br>
    >>> result = my_analysis.full()<br>
    >>> print(result)<br>
    {EcoRI: [2], HindIII: []}<br>
    >>> result[res.EcoRI]<br>
    [2]<br>
    <br>
    Best,<br>
    Markus<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 22.08.2017 um 23:15 schrieb Sean
      Brimer:<br>
    </div>
    <blockquote
cite="mid:CACbeMhRyULuofaXfrhWKgAxsp2qt2t+jdFRu_z5R4E-epqFv6w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Alright, So I have gotten it to work, I had to do
        'from Bio.Restriction import *' I know its not the best way to
        import a module but it worked. So now I have a follow up
        question. 
        <div><br>
        </div>
        <div>I would like to capture the output of the restriction batch
          result and use it to look for a match from another table. The
          result looks like a dictionary however when I do the following
          I'm denied. </div>
        <div><br>
        </div>
        <div>
          <pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span class="inbox-inbox-ansicyan" style="box-sizing:border-box;color:steelblue"><span class="inbox-inbox-ansigreen" style="box-sizing:border-box;color:darkgreen">----> 1<span class="inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)"> </span>ana<span class="inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)">[</span><span class="inbox-inbox-ansiblue" style="box-sizing:border-box;color:darkblue">'MluI'</span><span class="inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)">]</span><span class="inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)"></span>

<span class="inbox-inbox-ansired" style="box-sizing:border-box;color:darkred">TypeError</span>: 'Analysis' object is not subscriptable</span></span></pre>
          <pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline">
</pre>
          <pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;word-wrap:break-word;border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline">Am I wrong about this class? </pre>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Tue, Aug 22, 2017 at 3:11 PM Sean Brimer <<a
            moz-do-not-send="true" href="mailto:skbrimer@gmail.com">skbrimer@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">Hi All, 
            <div><br>
            </div>
            <div>I'm having issue with the RestrictionBatch class, when
              I tried to create it I get the following error</div>
            <div><br>
            </div>
            <div>
              <div>rb = RestrictionBatch([MluI,HincII,SacII])</div>
              <div>---------------------------------------------------------------------------</div>
              <div>NameError                                 Traceback
                (most recent call last)</div>
              <div><ipython-input-11-90ba40b69f00> in
                <module>()</div>
              <div>      1 # rb stands for restriction batch</div>
              <div>----> 2 rb = RestrictionBatch([MluI,HincII,SacII])</div>
              <div><br>
              </div>
              <div>NameError: name 'RestrictionBatch' is not defined</div>
            </div>
            <div><br>
            </div>
            <div>I'm not sure how you would define this class, I am
              following the cookbook but not having much luck. </div>
            <div><br>
            </div>
            <div>Any advice is welcomed and thank you, </div>
          </div>
          <div dir="ltr">
            <div><br>
            </div>
            <div>Sean</div>
            <div><br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Biopython mailing list  -  <a class="moz-txt-link-abbreviated" href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.open-bio.org/mailman/listinfo/biopython">http://mailman.open-bio.org/mailman/listinfo/biopython</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
_________________________________
Dr. Markus Piotrowski
Privatdozent/Akademischer Rat
Lehrstuhl für Molekulare Genetik und Physiologie der Pflanzen
ND 3/49
Universitätsstr. 150
44801 Bochum

Tel. xx49-(0)234-3224290
Fax. xx49-(0)234-3214187

<a class="moz-txt-link-freetext" href="http://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/PG_Piotrowski_d.html">http://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/PG_Piotrowski_d.html</a>
<a class="moz-txt-link-freetext" href="http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html">http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html</a></pre>
  </body>
</html>