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

Module NeXMLIO

source code

I/O function wrappers for the NeXML file format.

See: http://www.nexml.org

Classes [hide private]
  NeXMLError
Exception raised when NeXML object construction cannot continue.
  Parser
Parse a NeXML tree given a file handle.
  Writer
Based on the writer in Bio.Nexus.Trees (str, to_string).
Functions [hide private]
 
register_namespace(prefix, uri) source code
 
qUri(s)
Given a prefixed URI, return the full URI.
source code
 
cdao_to_obo(s)
Optionally converts a CDAO-prefixed URI into an OBO-prefixed URI.
source code
 
matches(s)
Check for matches in both CDAO and OBO namespaces.
source code
 
parse(handle, **kwargs)
Iterate over the trees in a NeXML file handle.
source code
 
write(trees, handle, plain=False, **kwargs)
Write a trees in NeXML format to the given file handle.
source code
Variables [hide private]
  NAMESPACES = {'cdao': 'http://purl.obolibrary.org/obo/cdao.owl...
  DEFAULT_NAMESPACE = 'http://www.nexml.org/2009'
  VERSION = '0.9'
  SCHEMA = 'http://www.nexml.org/2009/nexml/xsd/nexml.xsd'
  __package__ = 'Bio.Phylo'
  prefix = 'xsi'
  uri = 'http://www.w3.org/2001/XMLSchema-instance'
Function Details [hide private]

parse(handle, **kwargs)

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

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

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

Variables Details [hide private]

NAMESPACES

Value:
{'cdao': 'http://purl.obolibrary.org/obo/cdao.owl#',
 'nex': 'http://www.nexml.org/2009',
 'obo': 'http://purl.obolibrary.org/obo/',
 'xml': 'http://www.w3.org/XML/1998/namespace',
 'xsd': 'http://www.w3.org/2001/XMLSchema#',
 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}