Closed cesarsierran closed 4 years ago
Hi! Sorry for no supply for so long, I was on “holiday” (on my balcony because of corona)
it seems to take a very long time to complete
I guess it takes a long time due to calculating all expression differentials, which is a #cells × #nearest_neighbors × #genes array. You can set verbose = TRUE
to see which step takes how long. I think it would be easy to parallelize that step (I bet parallelization libraries have a parallel_apply
that could be used)
how can I apply your function on an UMAP
Just read the help(gene_relevance)
about coords
and exprs
, it explains what argument is what. Then you can proceed to visualize the resulting GeneRelevance
objects with one of the plot_*
methods (see showMethods(class = 'GeneRelevance')
or so)
I would like to plot two conditions together in the same reduction
Can you describe what you mean? Do you want to add a condition marker to one of the gene relevance plots or … ?
Thank you very much for your work.
I’m happy it’s of use!
Hi Philip,
Thank you very much for your answers.
I don't get your answer regarding UMAP. The function has worked fine and I have obtained a GeneRelevance plot. My question is whether I can visualize the GeneRelevance values on a UMAP reduction (and not on DiffusionMap).
Next, I want to plot the GeneRelevance object of two samples (WT and KO) together. As I'm not familiar with Destiny this might be a naive question.
Thank you again, Cèsar
Ah, the values themselves! that’s what plot_differential_map
does. Sorry for the names, I wrote them before finishing the paper, so they aren’t super consistent with the terms in the paper. If you want to visualize the plot data differently, you can just extract it and use it in a new plot:
d <- plot_differential_map(...)$data
ggplot(d, aes(...)) + ...
I should probably build a better way to get the data …
About the two samples: Same thing: get the two data frames, bind them together, and create a new plot from them:
d <- list(
WT = plot_differential_map(...)$data,
KO = plot_differential_map(...)$data
) %>% bind_rows(.id = "Sample")
ggplot(d, aes(...)) + ...
Unless you don’t want to create two completely independent gene relevance objects, but then you need to specify what you mean.
Hi,
I have successfully applied your gene_relevance function on a subset (about 2000 cells) of my sc dataset, using a diffusion map as the dimension reduction method. However:
When I try to implement it in the whole dataset (14000 cells) it seems to take a very long time to complete. Do you have any tips to solve this?
I have performed the rest of the analyses using the Seurat package and the UMAP dimension reduction. Therefore, I would like to know whether and how can I apply your function on an UMAP in order to visualise the gene relevance score in my same plot.
I would like to plot two conditions together in the same reduction. I am used to do this in Seurat but I have not been able to do it using the destiny package. Is there any vignette I can follow for this specific purpose?
Thank you very much for your work.