SGDDNB / ShinyCell

Shiny Interactive Web Apps for Single-Cell Data
GNU General Public License v3.0
148 stars 57 forks source link

heatmap request/suggestion #62

Open davhum opened 1 year ago

davhum commented 1 year ago

Hi ShinyCell team,

New to ShinyCell apps - very useful so big thanks for developing this great software.

Was wondering if you would consider adding an additional heatmap feature that would plot ONE gene but where the x and y axis are taken from the meta-data inputs. This would be useful for when the user wants to see expression of a particular gene across cell types vs another feature (eg development time points, patient ID etc).

Cheers, David

davhum commented 1 year ago

Have modified ui.R and server.R template documents that implement the function of my request. Finding it very useful and am happy to update writer.R code accordingly.

If anyone else is interested in testing this you can copy paste the following shiny cell doc into existing shinycell directory (note perhaps best to rename existing ui.R and server.R files as this hack will not preserve titles and footnotes). ShinyCellTemplate.zip

Rafaelsoler13 commented 1 year ago

It is very cool @davhum thanks! However, when you try to cluster the expression by any metadata x or y and one of the samples it has 0 reads for that gene, it appears this error: "NA/NaN/Inf when calling an external function (arg 10)"

Maybe it is better if you put a message saying "Unable to cluster by X or Y due to some samples have 0 counts", or having a solution.

Also I was thinking that would be a great idea to be able to plot the violin plots using 2 metadatas, like this

imagen