<div dir="ltr">Wonderful! Thank you Markus! I will try this right away!</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 24, 2017 at 10:09 AM Markus Piotrowski <<a href="mailto:Markus.Piotrowski@ruhr-uni-bochum.de">Markus.Piotrowski@ruhr-uni-bochum.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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</div><div bgcolor="#FFFFFF" text="#000000"><br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <div class="m_5910772646744152631moz-cite-prefix">Am 22.08.2017 um 23:15 schrieb Sean
      Brimer:<br>
    </div>
    </div><div bgcolor="#FFFFFF" text="#000000"><blockquote 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="m_5910772646744152631inbox-inbox-ansicyan" style="box-sizing:border-box;color:steelblue"><span class="m_5910772646744152631inbox-inbox-ansigreen" style="box-sizing:border-box;color:darkgreen">----> 1<span class="m_5910772646744152631inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)"> </span>ana<span class="m_5910772646744152631inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)">[</span><span class="m_5910772646744152631inbox-inbox-ansiblue" style="box-sizing:border-box;color:darkblue">'MluI'</span><span class="m_5910772646744152631inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)">]</span><span class="m_5910772646744152631inbox-inbox-ansiyellow" style="box-sizing:border-box;color:rgb(196,160,0)"></span>

<span class="m_5910772646744152631inbox-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 href="mailto:skbrimer@gmail.com" target="_blank">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="m_5910772646744152631mimeAttachmentHeader"></fieldset>
      <br>
      </blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite"><pre>_______________________________________________
Biopython mailing list  -  <a class="m_5910772646744152631moz-txt-link-abbreviated" href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a>
<a class="m_5910772646744152631moz-txt-link-freetext" href="http://mailman.open-bio.org/mailman/listinfo/biopython" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a></pre>
    </blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite"></blockquote>
    <br>
    <pre class="m_5910772646744152631moz-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="m_5910772646744152631moz-txt-link-freetext" href="http://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/PG_Piotrowski_d.html" target="_blank">http://www.ruhr-uni-bochum.de/pflaphy/Seiten_dt/PG_Piotrowski_d.html</a>
<a class="m_5910772646744152631moz-txt-link-freetext" href="http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html" target="_blank">http://homepage.ruhr-uni-bochum.de/Markus.Piotrowski/Index.html</a></pre>
  </div>

_______________________________________________<br>
Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a></blockquote></div>