Esempio n. 1
0
 def __call__(self, **kwargs):
     """
     This function should perform some sanity checks, but right now it does nothing.
     """
     cf = CommonFunctions(self)
     cf.phycassert(not model.update_freqs_separately, 'update_freqs_separately is no longer allowed')
     cf.phycassert(not model.update_relrates_separately, 'update_freqs_separately is no longer allowed')
Esempio n. 2
0
 def __call__(self, **kwargs):
     cf = CommonFunctions(self)
     cf.phycassert(not self.update_freqs_separately, 'update_freqs_separately is no longer allowed')
     cf.phycassert(not self.update_relrates_separately, 'update_freqs_separately is no longer allowed')
     self.set(**kwargs)
     self.checkModelParameters(cf)
     return self.saveas()
Esempio n. 3
0
 def checkSanity(self):
     """
     Place asserts in this function that should be checked before anything substantive
     is done during a call of a SS object.
     """
     cf = CommonFunctions(self)
     if self.refdist_is_prior and self.refdistfile is not None:
         cf.phycassert(False, 'cannot specify ss.refdist_is_prior = True and also specify a reference distribution using ss.refdistfile')
     if not self.refdist_is_prior and self.refdistfile is None:
         cf.phycassert(False, 'ss.refdist_is_prior is False but you have not specified a reference distribution (i.e. ss.refdistfile is None)')
     cf.phycassert(mcmc.ncycles > 0, 'mcmc.ncycles cannot be less than 1 for the stepping-stone method')
     cf.phycassert(mcmc.allow_polytomies == False or self.ti == True, "mcmc.allow_polytomies must be False to use the generalized stepping-stone method (we're working on relaxing this requirement)")
     #if not self.override_fixed_topology_restriction:
     #    cf.phycassert(mcmc.fix_topology == True, "mcmc.fix_topology must be True to use the stepping-stone method (we're working on relaxing this requirement)")
     models = partition.getModels()
     if len(models) > 0:
         m = models[0]
     else:
         m = model
     if m.edgelen_hyperprior:
         cf.warning("the generalized stepping-stone method has only been tested on models in which model.edgelen_hyperprior = None (proceed at your own risk)")