pachterlab / FGP_2024

4 stars 0 forks source link

Old name of tool still present in inference.py #9

Open kaushik-roy-physics opened 4 weeks ago

kaushik-roy-physics commented 4 weeks ago

Please notice the mistake in the last line of the attached code below. This is taken from the inference.py file in the ~/Chronocell/ directory. I think it needs to be changed to import_module("Chronocell.models."+model). Another place where it still contains the old name is in the test.py file in the same directory although it won't affect users at all.

Another small request would be to add comments in the .py files for the models and the inference.py specially for defining the variables which are quite different from those used in the paper. For eg. the parametric solutions of \lambda as defined in the paper have an \alpha_{s} which has dimensions 1/time. However, in the code for 'two_species_ss.py' and 'two_species_ss_tau.py', all dimensionless quantities are used and hence many terms have a scaling by the factor \beta. It would be really helpful to have consistency between the code and the manuscript.

Hope this helps.

Kaushik


class Trajectory:     """     Representation of a trajectory model probability distribution.             Attributes     ----------     topo: 2D np.darray     tau:         """

    def init(self, topo, tau, model="two_species_ss", restrictions={}, verbose=0):         """         set model and global parameters         """         self.topo=np.array(topo,dtype=int)         self.prior_tau=np.array(tau,dtype=float)         self.tau=np.array(tau,dtype=float)         self.L=len(topo)         self.n_states=len(set(topo.flatten()))         self.K=len(tau)-1         self.model_restrictions=restrictions         self.model=model         self.verbose = verbose                 ## import model specific methods from the provided file         tempmod = import_module("RADOM.models."+model)

meichenfang commented 3 weeks ago

Thank you for catching that! I've updated the import. I'll also make sure to harmonize the parameters between the paper and the code.