In , @allyhawkins created a function spatial_coldata_to_df() that adds some of the data from the spatialData slot of a SpatialExperiment to the main colData contents after merging.
For scpcaTools, I think it would make sense to wrap that functionality into coldata_to_df(), where the function would check whether we were working with a SpatialExperiment, and if so, merge all contents of the spatialData slot with the colData contents.
There is a small wrinkle in that we expect spatialData to go away in a future version of the SpatialExperiment package drighelli/SpatialExperiment#84. We should plan to deal with that case as we write this for futureproofing.
In , @allyhawkins created a function
spatial_coldata_to_df()that adds some of the data from thespatialDataslot of a SpatialExperiment to the maincolDatacontents after merging.For scpcaTools, I think it would make sense to wrap that functionality into
coldata_to_df(), where the function would check whether we were working with a SpatialExperiment, and if so, merge all contents of thespatialDataslot with thecolDatacontents.There is a small wrinkle in that we expect
spatialDatato go away in a future version of theSpatialExperimentpackage drighelli/SpatialExperiment#84. We should plan to deal with that case as we write this for futureproofing.