Ejemplo n.º 1
0
 def calc_NJ_trees(self, verbosity=0):
     self.analysis = 'nj'
     for rec in self.records:
         runPhyml(rec, analysis='nj', verbosity=verbosity,
             tmpdir=self.tmpdir)
         rec.tree = TrClTree.cast(rec.tree)
     if verbosity == 1:
         print
Ejemplo n.º 2
0
 def calc_NJ_trees(self, analysis='nj', verbosity=0):
     self.analysis = analysis
     for rec in self.records:
         runPhyml(rec, self.tmpdir, analysis=analysis, verbosity=verbosity,
             taxon_set=self.taxon_set)
         rec.tree = TrClTree.cast(rec.tree)
     if verbosity == 1:
         print
Ejemplo n.º 3
0
 def calc_ML_trees(self, verbosity=0):
     self.analysis = 'ml'
     for rec in self.records:
         runPhyml(rec,
                  analysis=self.analysis,
                  verbosity=verbosity,
                  tmpdir=self.tmpdir)
         rec.tree = TrClTree.cast(rec.tree)
Ejemplo n.º 4
0
 def calc_NJ_trees(self, verbosity=0):
     self.analysis = 'nj'
     for rec in self.records:
         runPhyml(rec,
                  analysis='nj',
                  verbosity=verbosity,
                  tmpdir=self.tmpdir)
         rec.tree = TrClTree.cast(rec.tree)
     if verbosity == 1:
         print
Ejemplo n.º 5
0
    def add(self, index_list):
        """ Takes a tuple of indices. Concatenates the records in the record
        list at these indices, and builds a tree. Returns the tree """

        if index_list in self.concats:
            return self.concats[index_list]

        concat = self.concatenate(index_list)

        if self.analysis == 'TreeCollection':
            guidetrees = [self.records[n].tree
                          for n in index_list][:self.max_guidetrees]
            tree = TrClTree.cast(
                runTC(concat, guidetrees, verbosity=self.verbosity))
        else:

            tree = TrClTree.cast(
                runPhyml(concat,
                         analysis=self.analysis,
                         verbosity=self.verbosity))

        # concat local variable dies here and goes to garbage collect

        self.concats[index_list] = tree
        return tree
Ejemplo n.º 6
0
    def add(self, index_list):
        """ Takes a tuple of indices. Concatenates the records in the record
        list at these indices, and builds a tree. Returns the tree """

        if index_list in self.concats:
            return self.concats[index_list]

        concat = self.concatenate(index_list)

        if self.analysis == 'TreeCollection':
            guidetrees = [self.records[n].tree for n in
                          index_list][:self.max_guidetrees]
            tree = TrClTree.cast(runTC(concat, guidetrees,
                                 verbosity=self.verbosity))
        else:

            tree = TrClTree.cast(runPhyml(concat, analysis=self.analysis,
                                 verbosity=self.verbosity))

        # concat local variable dies here and goes to garbage collect

        self.concats[index_list] = tree
        return tree
Ejemplo n.º 7
0
 def calc_ML_trees(self, verbosity=0):
     self.analysis = 'ml'
     for rec in self.records:
         runPhyml(rec, analysis=self.analysis, verbosity=verbosity,
             tmpdir=self.tmpdir)
         rec.tree = TrClTree.cast(rec.tree)