AlexsLemonade / AlexsLemonade/scpcaTools
Support spatial data in coldata_to_df()
- Dominant language
- R
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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 https://github.com/drighelli/SpatialExperiment/issues/84. We should plan to deal with that case as we write this for futureproofing.
Contributor guide
Research direction
Start by reading coldata_to_df() and the existing spatial_coldata_to_df() function mentioned in the issue to understand how colData and spatialData are merged. Check how SpatialExperiment identifies these data slots and account for the planned removal of spatialData; done means coldata_to_df() handles SpatialExperiment inputs while preserving existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100