File: __init__.py

package info (click to toggle)
python-iow 1.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 660 kB
  • sloc: python: 2,322; makefile: 24; sh: 12
file content (28 lines) | stat: -rw-r--r-- 982 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, BP development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from ._bp import BP
from ._io import parse_newick, write_newick, parse_jplace
from ._conv import to_skbio_treenode, from_skbio_treenode, to_skbio_treearray
from ._insert import insert_fully_resolved


def load(fp, as_treenode=False):
    data = open(fp).read()
    tree = parse_newick(data)
    if as_treenode:
        return to_skbio_treenode(tree)
    else:
        return tree


__all__ = ['BP', 'parse_newick', 'to_skbio_treenode', 'from_skbio_treenode',
           'to_skbio_treearray', 'write_newick', 'parse_jplace',
           'insert_fully_resolved', 'load']

from . import _version
__version__ = _version.get_versions()['version']