drieslab / Giotto

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

`updateGiottoObject` from v 1.1.0 to 3.3.0 #667

Open daccachejoe opened 1 year ago

daccachejoe commented 1 year ago

Hi-

I want to use the heatmSpatialCorFeats but did my initial analysis in v 1.1.0 and the function (from what I can tell) is only newly present. I've upgraded my Giotto version to 3.3.0 but due to the giotto class changing, my old objects are no longer working. The updateGiottoObject does not seem to rectify the issue as well... Any help would be greatly appreciated!

> giotto_obj
An object of class giotto 
[SUBCELLULAR INFO]
Error in (new("standardGeneric", .Data = function (object)  : 
  no slot of name "spatial_info" for this object of class "giotto"
> new.giotto <- updateGiottoObject(giotto_obj)
> new.giotto
An object of class giotto 
[SUBCELLULAR INFO]
Error in (new("standardGeneric", .Data = function (object)  : 
  no slot of name "spatial_info" for this object of class "giotto"
> kmeans_spatialgenes <- binSpect(new.giotto, bin_method = "kmeans")
Error in set_default_spat_unit(gobject = gobject, spat_unit = spat_unit) : 
  no slot of name "expression" for this object of class "giotto"

Thanks, Joe

acjordan333 commented 1 year ago

Hi jad362 - I ran into the same issue, but with Giotto objects created with version 2.0 or later. I couldn't find a way to open them with 3.3.0, so I had to re-create them from the raw NanoString CosMx data. Not sure if this helps you at all, but wanted to let you know.

daccachejoe commented 1 year ago

Thanks @acjordan333 ! I've since downgraded my Giotto version back to 1.1 and just created the plot manually since it was just a visualization and not any analysis. Hopefully the update function can work around this in the future though.

RubD commented 1 year ago

@josschavezf would your new function fix this issue?

josschavezf commented 1 year ago

Yes! It should be. @jad362 and @acjordan333 I recently included the function giottoMasterToSuite() could you please try it and let me know if it works? Any feedback is very welcome.