JEFworks-Lab / STdeconvolve

Reference-free cell-type deconvolution of multi-cellular spatially resolved transcriptomics data
http://jef.works/STdeconvolve/
98 stars 12 forks source link

scatter plot circles instead of sctter pie circles #41

Closed cathalgking closed 8 months ago

cathalgking commented 9 months ago

@bmill3r Would it be possible to plot the output of vizAllTopics as individual scatterplot circles instead of scatterpie circles? For example with geom_point() or some other way. Could I edit the vizAllTopics function to do this? And if so where can I access the code to do so? Thanks.

bmill3r commented 9 months ago

Hi @cathalgking,

Sure thing! Feel free to adapt the functions as you see fit. You can find the plotting functions here: https://github.com/JEFworks-Lab/STdeconvolve/blob/package/R/plot.R

You can use the pos data.frame. with x and y columns as the x and y arguments in geom_point() if you want to make a scatter plot of the capture locations:

ggplot(data = pos) +
    geom_point(aes(x = x, y = y)

If you are trying to plot the capture locations as points and color by a given cell type proportion, you might want to check out the function vizTopic(), too.

Hope this helps, Brendan