Beispiel #1
0
 def branchOut(self, centerTaxon, subsetSize, **kwargs):
     dist = {}
     pdm = treecalc.PatristicDistanceMatrix(self.den_tree)
     for i, s in enumerate(self.den_tree.taxon_set):  # @UnusedVariable
         if "filterTaxon" in kwargs:
             if not kwargs["filterTaxon"](s):
                 continue
         dist[s.label] = pdm(centerTaxon, s)
     incircle = sortByValue(dist)[0:subsetSize]
     return [node[0] for node in incircle]
Beispiel #2
0
 def branchOut(self,centerTaxon,subsetSize,**kwargs):
     dist = {}                
     pdm = treecalc.PatristicDistanceMatrix(self.den_tree)
     for i , s in enumerate(self.den_tree.taxon_set): #@UnusedVariable
         if kwargs.has_key("filterTaxon"):
             if not kwargs["filterTaxon"](s):
                 continue;
         dist [s.label] = pdm(centerTaxon, s);
     incircle = sortByValue(dist)[0:subsetSize]
     return [node[0] for node in incircle]