Difference between revisions of "NeXML and RDF API for BioRuby"

From Phyloinformatics
Jump to: navigation, search
(Reader)
(update)
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Preface==
+
<strong>Note:</strong> This page has moved to: https://github.com/rvosa/bio-nexml/wiki/NeXML-API-for-BioRuby
The following document discusses the implementation of an NeXML parser and serializer and an RDF API for BioRuby. Note that this document is not final yet.
 
 
 
==Parsing==
 
The parsed document is abstracted with <code>Bio::NeXML::Parser</code> class. A file, i/o object, URL or string is parsed transparently while instantiating <code>Bio::NeXML::Parser</code> or with the shortcut, <code>Bio::NeXML.parse</code> method.
 
 
 
<code>
 
nexml = Bio::NeXML.parse( "trees.xml" )
 
</code>
 
 
 
<code>otus</code> can be iterated over by calling the <code>each_otus</code> iterator on <code>nexml</code>.
 
 
 
<code>
 
nexml.each_otus{ |otus| puts otus.id }
 
</code>
 
 
 
===OTUS and OTU===
 
An <code>otus</code> is modeled by <code>Bio::NeXML::Otus</code> and an <code>otu</code> by <code>Bio::NeXML::Otu</code>. With an <code>otus</code> object all the <code>otu</code> nested in it can be iterated over, with the <code>each_otu</code> iterator.
 
 
 
<code>
 
otus.each_otu{ |otu| puts otu.id }
 
</code>
 
 
 
Bio::NeXML::Otu, inherits from Bio::Taxonomy.
 
  
 
[[Category:NeXML and RDF API for BioRuby]]
 
[[Category:NeXML and RDF API for BioRuby]]

Latest revision as of 19:06, 22 September 2011

Note: This page has moved to: https://github.com/rvosa/bio-nexml/wiki/NeXML-API-for-BioRuby