theislab / destiny

R package for single cell and other data analysis using diffusion maps
https://theislab.github.io/destiny/
GNU General Public License v3.0
77 stars 11 forks source link

Heatmap of genes along pseudotime #20

Closed tkapello closed 5 years ago

tkapello commented 5 years ago

Hi,

I would like to plot a heatmap of the expressed genes along the pseudotime generated by Diffusion Maps. I understand that there is no current function for that, is this correct? Do you have any suggestions?

Theo

flying-sheep commented 5 years ago

Sure! Use pt[cell, ] to get a vector of DPT values starting from cell, then use the order() of those values to reorder your data for the heatmap:

dpt_order <- order(pt[cell, ])
heatmap(data[dpt_order, ])