<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      Some time ago I wrote Biopython module for handling Ontologies and
      calculating terms enrichments. Here is the module:<br>
      <a class="moz-txt-link-freetext" href="https://github.com/kkoziara/biopython/tree/master/Bio/Ontology">https://github.com/kkoziara/biopython/tree/master/Bio/Ontology</a><br>
      Bio.Ontology.IO.OboIO contains OboReader which can read the obo
      file into OntologyGraph. OntologyGraph contains get_ancestor
      method which returns all ancestors of a term. It also contains
      to_networkx method which returns networkx representation of
      OntologyGraph.<br>
      I hope it helps.<br>
      Regards,<br>
      Kamil<br>
      <br>
      On 06/14/2014 09:16 PM, Iddo Friedberg wrote:<br>
    </div>
    <blockquote
cite="mid:CABm4-MQqn3rNkUUZDyouTD_=yPpnb=q+9TBsetJrRMpEGhtx6g@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="font-family:arial,sans-serif;font-size:13px">hi,</span>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">Does
          anybody have a script that can extract an ancestor list of an
          ontology term (or all ontology terms) from an OBO file? Or
          something close enough so I can modify it?<br clear="all">
          <div><br>
          </div>
          <div>Thanks,</div>
          <div><br>
          </div>
          <div>Iddo</div>
        </div>
        <div><br>
        </div>
        -- <br>
        Iddo Friedberg<br>
        <a moz-do-not-send="true"
          href="http://iddo-friedberg.net/contact.html" target="_blank">http://iddo-friedberg.net/contact.html</a><br>
++++++++++[&gt;+++&gt;++++++&gt;++++++++&gt;++++++++++&gt;+++++++++++&lt;&lt;&lt;&lt;&lt;-]&gt;&gt;&gt;&gt;++++.&gt;<br>
++++++..----.&lt;&lt;&lt;&lt;++++++++++++++++++++++++++++.-----------..&gt;&gt;&gt;+.-----.<br>
.&gt;-.&lt;&lt;&lt;&lt;--.&gt;&gt;&gt;++.&gt;+++.&lt;+++.----.-.&lt;++++++++++++++++++.&gt;+.&gt;.&lt;++.&lt;&lt;&lt;+.&gt;&gt;<br>
&gt;&gt;----.&lt;--.&gt;++++++.&lt;&lt;&lt;&lt;------------------------------------.<br>
      </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>
  </body>
</html>