Exemplo n.º 1
0
 def makeDistanceDefn(self, bprobs):
     length = LengthDefn()
     if self.with_rate and bprobs is not None:
         b_rate = self._makeBinParamDefn('rate', 'rate', bprobs)
         distance = ProductDefn(length, b_rate, name="distance")
     else:
         distance = length
     return distance
Exemplo n.º 2
0
 def makeRateParams(self, bprobs):
     params = []
     for param_name in self.parameter_order:
         if bprobs is None or param_name not in self.partitioned_params:
             defn = ParamDefn(param_name)
         else:
             e_defn = ParamDefn(param_name, dimensions=['edge', 'locus'])
             # should be weighted by bprobs*rates not bprobs
             b_defn = self._makeBinParamDefn(param_name,
                                             param_name + '_factor', bprobs)
             defn = ProductDefn(b_defn, e_defn, name=param_name + '_BE')
         params.append(defn)
     return params