Пример #1
0
    def __init__(
        self,
        infile=None,
        file_format='fasta',
        name=None,
        datatype=None,
        headers=[],
        sequences=[],
        dv=None,
        tree=None,
        tmpdir=None,
        ):

        self.TCfiles = {}
        self.dv = dv or []
        if tree and isinstance(tree, Tree):
            self.tree = TrClTree.cast(tree)
        else:
            self.tree = None


        super(TrClSeq, self).__init__(
            infile,
            file_format,
            name,
            datatype,
            headers,
            sequences,
            tmpdir,
            )
Пример #2
0
    def tree_collection(self):
        """ Uses TreeCollection (via
        treeCl.externals.tree_builders.TreeCollection) to build a least squares
        tree for the current record """

        if self.dv <= []:
            self.dv_matrix()
        tc = TreeCollection(self)
        self.tree = TrClTree.cast(tc.run())
Пример #3
0
    def tree_collection(self):
        """ Uses TreeCollection (via
        treeCl.externals.tree_builders.TreeCollection) to build a least squares
        tree for the current record """

        if self.dv <= []:
            self.dv_matrix()
        tc = TreeCollection(self)
        self.tree = TrClTree.cast(tc.run())
Пример #4
0
    def bionj_plus(self):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        bioNJ tree for the current record """
        if self.tmpdir is not None:
            tmpdir = self.tmpdir
        else:
            directorycheck(tmpdir)

        p = Phyml(self)
        self.tree = TrClTree.cast(p.run('lr'))
Пример #5
0
    def phyml(self, tmpdir):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        full ML tree for the current record """
        if self.tmpdir is not None:
            tmpdir = self.tmpdir
        else:
            directorycheck(tmpdir)

        p = Phyml(self, tmpdir)
        self.tree = TrClTree.cast(p.run('ml'))
Пример #6
0
    def bionj(self, tmpdir, verbosity=0):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        bioNJ tree for the current record """

        if self.tmpdir is not None:
            tmpdir = self.tmpdir
        else:
            directorycheck(tmpdir)

        p = Phyml(self, tmpdir)
        self.tree = TrClTree.cast(p.run('nj', verbosity))
        return self.tree
Пример #7
0
    def tree_collection(self, tmpdir):
        """ Uses TreeCollection (via
        treeCl.externals.tree_builders.TreeCollection) to build a least squares
        tree for the current record """
        if self.tmpdir is not None:
            tmpdir = self.tmpdir
        else:
            directorycheck(tmpdir)

        if self.dv <= []:
            self.dv_matrix()
        tc = TreeCollection(self, tmpdir)
        self.tree = TrClTree.cast(tc.run())
Пример #8
0
    def tree_collection_deprecated(self, tmpdir):
        """ DEPRECATED:   Uses TreeCollection (via
        treeCl.software_interfaces.treecollection) to build a least squares
        tree for the current record """
        if self.tmpdir is not None:
            tmpdir = self.tmpdir
        else:
            directorycheck(tmpdir)

        if self.dv <= []:
            self.dv_matrix()
        tc = TreeCollection(self, tmpdir)
        self.tree = TrClTree.cast(tc.run())
Пример #9
0
    def bionj(self):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        bioNJ tree for the current record """

        p = Phyml(self)
        self.tree = TrClTree.cast(p.run('nj'))
Пример #10
0
    def phyml(self):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        full ML tree for the current record """

        p = Phyml(self)
        self.tree = TrClTree.cast(p.run('ml'))
Пример #11
0
    def bionj(self):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        bioNJ tree for the current record """

        p = Phyml(self)
        self.tree = TrClTree.cast(p.run('nj'))
Пример #12
0
    def phyml(self):
        """ Uses phyml (via treeCl.externals.tree_builders.Phyml) to build a
        full ML tree for the current record """

        p = Phyml(self)
        self.tree = TrClTree.cast(p.run('ml'))