cellrouter icon indicating copy to clipboard operation
cellrouter copied to clipboard

PlotTrajectory without smoothening? Genes that should be relatively constant are not?

Open hgb1111 opened this issue 5 years ago • 1 comments

Hi, Question 1) Is there a way to plottrajectory without smoothening? I want to look at what the "raw" expression change trajectory looks like beneath the smoothed graph.

For example, plotting this gives me the "smoothed" curves for a sample of endothelial cells transitioning from arterial to venous.

genelist <- c("Pecam1", "Kdr", "Jag1") plottrajectories(cellrouter, '8.9', genelist, rescale = TRUE, columns=1, width=5, height=2, filename='results/dynamics_curve.pdf')

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

Question 2) Genes that should be relatively constant across a population of cells do not appear constant in the plot trajectories function. For example, these genes (particularly Pecam1 and Flt1, "pan endothelial markers") should be relatively constant along this endothelial population, but instead they show extremely dramatic changes across the cell router trajectory:

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

What is happening so that they show such dramatic expression changes?

Question 3) Is there a way to superimpose the cell router trajectory onto the TSNE? Or is there some other way to see what cells from where in the TSNE represent which stages along the cell router analysis?

hgb1111 avatar Dec 06 '18 20:12 hgb1111

Sorry for my delayed response. Question 1) Yes, you can use something like this:

genelist <- c("Pecam1", "Kdr", "Jag1")

selected.transitions <- c('8.9') plotPathHeatmap(cellrouter, selected.transitions, genelist, 2, 4, 2, 'results/') #where selected.transitions is something like '8.9'. This will generate one heatmap for each selected transition plotpaths(cellrouter, selected.transitions, genelist, columns = 2, width=8, height = 5, file_prefix = 'results/selected_genes_trajectories')

I just updated the cellrouter class in github so you can use the plotpaths function above hopefully without any issues. Please, download the new version in github!

Question 2) It is important to note note the parameyter scale=TRUE in the plottrajectories function. When scale=TRUE, the kinetic patterns of each gene will be simultaneously rescaled while when scale=FALSE rescale each kinect pattern individually. I usually use scale=TRUE when I have genes that I know to be increasing (or decreasing) along the pseudotime and I want to check the relative timing of changes, for example, whether gene1 is upregulated before gene2, for example. As I know that these genes are being upregulated, I usually use scale=TRUE. Sometimes the magnitude is also very different and scale=TRUE helps to see the relative changes among the genes of interest. In your case, I remove to do the plot again using scale=FALSE. This should give you the pattern you expect. Hope it clarifies it.

Question 3) I am implementing a function to do that and I am hopeful to release another cellrouter release by mid Janurary if time permits. At the meantime, you could do this using the plotPathHeamtap function, as illustrated above, which I believe could be an workaround for what you need.

I am aware that the CellRouter documentation is not that great at this point so feel free to ask questions any time. I hope to provide faster answers in the future.

Please, let me know if that answer your questions and again, my apologies for the delayed response.

Thanks!

Em qui, 6 de dez de 2018 às 15:38, hgb1111 [email protected] escreveu:

Hi, Question 1) Is there a way to plottrajectory without smoothening? I want to look at what the "raw" expression change trajectory looks like beneath the smoothed graph.

For example, plotting this gives me the "smoothed" curves for a sample of endothelial cells transitioning from arterial to venous.

genelist <- c("Pecam1", "Kdr", "Jag1") plottrajectories(cellrouter, '8.9', genelist, rescale = TRUE, columns=1, width=5, height=2, filename='results/dynamics_curve.pdf')

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

Question 2) Genes that should be relatively constant across a population of cells do not appear constant in the plot trajectories function. For example, these genes (particularly Pecam1 and Flt1, "pan endothelial markers") should be relatively constant along this endothelial population, but instead they show extremely dramatic changes across the cell router trajectory:

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

http://127.0.0.1:33780/graphics/plot_zoom_png?width=467&height=314

What is happening so that they show such dramatic expression changes?

Question 3) Is there a way to superimpose the cell router trajectory onto the TSNE? Or is there some other way to see what cells from where in the TSNE represent which stages along the cell router analysis?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/edroaldo/cellrouter/issues/19, or mute the thread https://github.com/notifications/unsubscribe-auth/AJqUR4PEExCyNM5i3KR52cLb3GciltLmks5u2YBegaJpZM4ZHRhS .

-- Edroaldo

edroaldo avatar Dec 14 '18 15:12 edroaldo