gifford-lab / prescient

Codebase for PRESCIENT (Potential eneRgy undErlying Single Cell gradIENTs) for generative modeling of single-cell time-series.
MIT License
44 stars 7 forks source link

Simulate trajectories: Those cells were not found in the metadata. Wrong 'tp_subset' or 'celltype_subset'? #12

Closed waltno closed 3 weeks ago

waltno commented 3 months ago

Hey y'all,

Im trying to run the Veres 2019 example and am having issues running simulate trajectories. It requires me to give a timepoint and celltype subset, whereas in the example and paper I assume you're running this across all timepoints?

Also unrelated, i tried to access the Weinreb et al. paper via drop box drive and its not accessible.

prescient simulate_trajectories -i data.pt --model_path kegg-growth-softplus_1_500-1e-06 --num_steps 80 -o ./ --seed 2 --gpu 0 --celltype_subset prog_sox2
ValueError: Those cells were not found in the metadata. Wrong 'tp_subset' or 'celltype_subset'? Timepoint given was None and celltype given was prog_sox2. Metadata examples should be printed to stdout.

whereas this runs but i dont get a whole trajectory


prescient simulate_trajectories -i data.pt --model_path kegg-growth-softplus_1_500-1e-06 --num_steps 80 -o ./ --seed 2 --gpu 0 --celltype_subset prog_sox2 --tp_subset 0
waltno commented 3 months ago

It seems like this is just an issue with the development version. I deleted it, downloaded the main version, and it worked!

waltno commented 3 weeks ago

following up ive really tried to trouble shoot this.... the metadata subsetting really is not working

sachitsaksena commented 3 weeks ago

Hi @waltno the data should now be pulled from the Klein lab release here: https://github.com/AllonKleinLab/paper-data/blob/master/Lineage_tracing_on_transcriptional_landscapes_links_state_to_fate_during_differentiation/README.md

As for the subsetting bug, is your issue persisting in the main version as you pointed out when you closed the issue?

I see a potential flaw in the latest pull request that I can address at some point, but I think it might resolve if you revert back to this commit: https://github.com/gifford-lab/prescient/commit/912f6dec2b149525a8a9fe6c5dcd681bd8946cc5

Let me know. Thanks or raising the issue.

waltno commented 3 weeks ago

Hey! i debugged it earlier this week. I’ll show you what i did but yes it had to do with handling the types from tp_subset. for some reason the types didn’t match from the cli input and my pytorch metadata.

sachitsaksena commented 3 weeks ago

Ah great to hear, sorry I missed the original message - got buried because it was under "closed". If you're interested, feel free to submit a pull request, or just let me know, and I can implement your change :)

Thanks so much!