Пример #1
0
def enable_ncl():
    from dendropy.dataio import nexusreader_ncl
    if nexusreader_ncl.DENDROPY_NCL_AVAILABILITY:
        _LOG.debug('Enabling Nexus Class Library bindings: using NCL NEXUS parser')
        ioclient.register("nexus", nexusreader_ncl.NexusReader, nexuswriter.NexusWriter, nexustreeiter.tree_source_iter)
    else:
        _LOG.debug('Nexus Class Library bindings are not available: using native Python NEXUS parser')
Пример #2
0
def disable_ncl():
    _LOG.debug(
        'Disabling Nexus Class Library bindings: using native Python NEXUS parser'
    )
    from dendropy.dataio import nexusreader_py
    ioclient.register("nexus", nexusreader_py.NexusReader,
                      nexuswriter.NexusWriter, nexustreeiter.tree_source_iter)
Пример #3
0
def enable_ncl():
    from dendropy.dataio import nexusreader_ncl
    if nexusreader_ncl.DENDROPY_NCL_AVAILABILITY:
        _LOG.debug(
            'Enabling Nexus Class Library bindings: using NCL NEXUS parser')
        ioclient.register("nexus", nexusreader_ncl.NexusReader,
                          nexuswriter.NexusWriter,
                          nexustreeiter.tree_source_iter)
    else:
        _LOG.debug(
            'Nexus Class Library bindings are not available: using native Python NEXUS parser'
        )
Пример #4
0
def disable_ncl():
    _LOG.debug('Disabling Nexus Class Library bindings: using native Python NEXUS parser')
    from dendropy.dataio import nexusreader_py
    ioclient.register("nexus", nexusreader_py.NexusReader, nexuswriter.NexusWriter, nexustreeiter.tree_source_iter)
Пример #5
0
from dendropy.dataio import nexuswriter
from dendropy.dataio import fasta
from dendropy.dataio import phylip
from dendropy.dataio import nexml
from dendropy.dataio import beast
from dendropy.dataio.ioclient import get_reader, get_writer, tree_source_iter, multi_tree_source_iter

_LOG = messaging.get_logger(__name__)

###############################################################################
## Data Schema Handlers
##
## Syntax is:
##   ioclient.register(<FORMAT NAME>, <READER TYPE>, <WRITER TYPE>, <TREE ITERATOR>)
##
ioclient.register("nexus", nexusreader_py.NexusReader, nexuswriter.NexusWriter, nexustreeiter.tree_source_iter)
ioclient.register("newick", newick.NewickReader, newick.NewickWriter, newick.tree_source_iter)
ioclient.register("nexus/newick", None, None, nexustreeiter.generalized_tree_source_iter)
ioclient.register("fasta", fasta.FastaReader, fasta.FastaWriter, None)
ioclient.register("dnafasta", fasta.DNAFastaReader, fasta.FastaWriter, None)
ioclient.register("rnafasta", fasta.RNAFastaReader, fasta.FastaWriter, None)
ioclient.register("proteinfasta", fasta.ProteinFastaReader, fasta.FastaWriter, None)
ioclient.register("phylip", phylip.PhylipReader, phylip.PhylipWriter, None)
ioclient.register("nexml", nexml.NexmlReader, nexml.NexmlWriter, None)
ioclient.register("beast-summary-tree", beast.BeastSummaryTreeReader, None, beast.summary_tree_source_iter)

###############################################################################
## NEXUS Parser Implementation Selection
##

def disable_ncl():
Пример #6
0
from dendropy.dataio import nexuswriter
from dendropy.dataio import fasta
from dendropy.dataio import phylip
from dendropy.dataio import nexml
from dendropy.dataio import beast
from dendropy.dataio.ioclient import get_reader, get_writer, tree_source_iter, multi_tree_source_iter

_LOG = messaging.get_logger(__name__)

###############################################################################
## Data Schema Handlers
##
## Syntax is:
##   ioclient.register(<FORMAT NAME>, <READER TYPE>, <WRITER TYPE>, <TREE ITERATOR>)
##
ioclient.register("nexus", nexusreader_py.NexusReader, nexuswriter.NexusWriter,
                  nexustreeiter.tree_source_iter)
ioclient.register("newick", newick.NewickReader, newick.NewickWriter,
                  newick.tree_source_iter)
ioclient.register("nexus/newick", None, None,
                  nexustreeiter.generalized_tree_source_iter)
ioclient.register("fasta", fasta.FastaReader, fasta.FastaWriter, None)
ioclient.register("dnafasta", fasta.DNAFastaReader, fasta.FastaWriter, None)
ioclient.register("rnafasta", fasta.RNAFastaReader, fasta.FastaWriter, None)
ioclient.register("proteinfasta", fasta.ProteinFastaReader, fasta.FastaWriter,
                  None)
ioclient.register("phylip", phylip.PhylipReader, phylip.PhylipWriter, None)
ioclient.register("nexml", nexml.NexmlReader, nexml.NexmlWriter, None)
ioclient.register("beast-summary-tree", beast.BeastSummaryTreeReader, None,
                  beast.summary_tree_source_iter)

###############################################################################