broadinstitute / wot

A software package for analyzing snapshots of developmental processes
https://broadinstitute.github.io/wot/
BSD 3-Clause "New" or "Revised" License
137 stars 34 forks source link

trajectories fail except from final time point #65

Closed concatenize closed 5 years ago

concatenize commented 5 years ago

Hi WOT devs! Very impressive work with this tool. The documentation in notebook 4 implies that trajectory inference should work forwards and backwards: "The method trajectories takes a list of probability vectors and returns the trajectories containing descendant distributions at later time points and ancestor distributions at earlier time points." But, if you edit the notebook to focus on a middle time-point, for instance by changing at_time=18 to at_time=17 when constructing populations, trajectory inference yields an object with NaN's in the variable metadata, and it cannot be used downstream as expected.

It may be an easy fix: the issue seems to go away if you fill in the NaNs with the appropriate names, i.e.

trajectory_ds.var.index = [p.name for p in populations]

I'm not sure if this is related, but the probability vectors are also not as advertised: their sums are >>1 .

joshua-gould commented 5 years ago

Fixed trajectory error when starting from a middle (not start or end) time point