Package Bio :: Package Phylo :: Module CDAOIO
[hide private]
[frames] | no frames]

Module CDAOIO

source code

I/O function wrappers for the RDF/CDAO file format.

This is an RDF format that conforms to the Comparative Data Analysis Ontology (CDAO). See: http://www.evolutionaryontology.org/cdao

This module requires the librdf Python bindings (http://www.librdf.org)

The CDAOIO.Parser, in addition to parsing text files, can also parse directly from a triple store that implements the Redland storage interface; similarly, the CDAOIO.Writer can store triples in a triple store instead of serializing them to a file.

Classes [hide private]
  CDAOError
Exception raised when CDAO object construction cannot continue.
  Parser
Parse a CDAO tree given a file handle.
  Writer
Based on the writer in Bio.Nexus.Trees (str, to_string).
Functions [hide private]
 
qUri(x) source code
 
format_label(x) source code
 
parse(handle, **kwargs)
Iterate over the trees in a CDAO file handle.
source code
 
write(trees, handle, plain=False, **kwargs)
Write a trees in CDAO format to the given file handle.
source code
Variables [hide private]
  rdfver = '4.0.1'
  RDF_NAMESPACES = {'cdao': 'http://purl.obolibrary.org/obo/cdao...
  ZEROES = 8
  __package__ = 'Bio.Phylo'
Function Details [hide private]

parse(handle, **kwargs)

source code 
Iterate over the trees in a CDAO file handle.
Returns:
generator of Bio.Phylo.CDAO.Tree objects.

write(trees, handle, plain=False, **kwargs)

source code 
Write a trees in CDAO format to the given file handle.
Returns:
number of trees written.

Variables Details [hide private]

RDF_NAMESPACES

Value:
{'cdao': 'http://purl.obolibrary.org/obo/cdao.owl#',
 'obo': 'http://purl.obolibrary.org/obo/',
 'owl': 'http://www.w3.org/2002/07/owl#',
 'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#'}