drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
258 stars 98 forks source link

Giotto suite bug of dimPlot2D #274

Closed cranetht closed 1 year ago

cranetht commented 2 years ago

I observed that when using group_by slot in the dimPlot2D() function, the ggplot2 plot that comes out is completely blank.

I then checked the source code and found a possible error in https://github.com/RubD/Giotto/blob/suite/R/spatial_visuals.R#L1273

subset_cell_IDs = comb_metadata[['cell_ID']][get(group_by) == group] may be correct form.

[['cell_ID']] should be put in front of [get(group_by) == group], not behind it.

RubD commented 2 years ago

Thanks @cranetht for letting us know. That should be an easy fix and we'll take a look soon.

RubD commented 1 year ago

Hi @cranetht , apologies for the late reply. I took a look at the code, and although I did not change anything, it produces the expected results. I will close this issue, but if you still have problems and can provide us with a reproducible example (small script), then I'm happy to re-open it.

Screen Shot 2022-11-19 at 11 15 18

Screen Shot 2022-11-19 at 11 15 04