dynverse / dynmethods

A collection of 50+ trajectory inference methods within a common interface 📥📤
https://dynverse.org
Other
118 stars 26 forks source link

Waddington-OT #89

Closed zouter closed 6 years ago

zouter commented 6 years ago

https://pypi.org/project/wot/

zouter commented 6 years ago

Given that the time prior information is now included in dynwrap, this should be easy to wrap

rcannood commented 6 years ago

I've looked into adding Waddington-OT (See exploratory script). With some example data, I've managed to run wot optimal_transport, wot force_layout, and wot trajectory (See example_data.zip for input and output files).

However, from the tmaps_* files, I'm not sure how I would convert this into our format; something like this:

> data$milestone_network
# A tibble: 3 x 4
  from  to    length directed
  <chr> <chr>  <dbl> <lgl>   
1 M3    M4     0.619 TRUE    
2 M1    M3     0.876 TRUE    
3 M3    M2     0.442 TRUE    

> data$progressions
# A tibble: 300 x 4
   cell_id from  to    percentage
   <chr>   <chr> <chr>      <dbl>
 1 C1      M3    M2         0.206
 2 C2      M3    M4         0    
 3 C3      M1    M3         0.966
 4 C4      M3    M4         0.690
 5 C5      M1    M3         1    
 6 C6      M1    M3         0.321
 7 C7      M3    M2         0.129

Perhaps @robindar or @joshua-gould could chime in on how we could convert one format into the other? Could I use the tmaps_* files, calculate an MST, and use this as my milestone_network?

joshua-gould commented 6 years ago

You want to convert the transport maps to long format, correct?

On Tue, Jul 31, 2018 at 5:22 AM, Robrecht Cannoodt <notifications@github.com

wrote:

I've looked into adding Waddington-OT (See exploratory script https://github.com/dynverse/dynmethods/blob/feature/add_wot/containers/wot/run.py). With some example data, I've managed to run wot optimal_transport, wot force_layout, and wot trajectory (See example_data.zip https://github.com/dynverse/dynmethods/files/2244594/example_data.zip for input and output files).

However, from the tmaps_* files, I'm not sure how I would convert this into our format; something like this:

data$milestone_network

A tibble: 3 x 4

from to length directed

1 M3 M4 0.619 TRUE 2 M1 M3 0.876 TRUE 3 M3 M2 0.442 TRUE data$progressions # A tibble: 300 x 4 cell_id from to percentage 1 C1 M3 M2 0.206 2 C2 M3 M4 0 3 C3 M1 M3 0.966 4 C4 M3 M4 0.690 5 C5 M1 M3 1 6 C6 M1 M3 0.321 7 C7 M3 M2 0.129

Perhaps @robindar https://github.com/robindar or @joshua-gould https://github.com/joshua-gould could chime in on how we could convert one format into the other? Could I use the tmaps_* files, calculate an MST, and use this as my milestone_network?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dynverse/dynmethods/issues/89#issuecomment-409155137, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_pn8kNUVEwvf2wwHHlfuRpHJOeYf14ks5uMCHCgaJpZM4VPOIN .

rcannood commented 6 years ago

Hello Joshua!

No, not exactly. We want to convert the transport maps to our 'common trajectory format' (See Figure 1 in our bioRxiv). Converting the transport maps to a long format would result in a graph that is way too dense. In order to make it less sparse, I could calculate an MST, but I'm not sure this is the spirit of wot.

Robrecht

robindar commented 6 years ago

Hello Robrecht,

From what I understand, all methods compared in this paper are trying to build a graph (with different constraints) that best describes the evolution of the cells, and then project all cells to its edges, to get the progression values of your example. Wot does not impose such topology constraints, it only estimates the probabillity that each cell is the ancestor/descendant of a given cell. While I am sure that the transport maps carry enough information for the construction of a milestone network, I doubt that there is a unique construction that makes sense here, so I wouldn't know what to include in this benchmark.

David

rcannood commented 6 years ago

Thanks for this information, David :)

Based on your explanation, we will exclude Waddington-OT from the benchmark for now.

Kind regards, Robrecht