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, )
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())
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'))
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'))
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
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())
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())
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'))
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'))