Rename SpatialData elements
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 7
Description
Is your feature request related to a problem? Please describe.
The spatialdata_io.merscope reader has the two arguments 'region_name' and 'slide_name'. If set to None, file path directory is used. If set to a string, the order will always be slide_region_element. This can make element names more complicated and longer than needed.
Describe the solution you'd like
A renaming function that works on individual elements within the SpatialData would be great, so e.g.
spatialdata.rename(elements={"slide_region_transcripts": "just_transcripts"})
Describe alternatives you've considered
One can re-built a SpatialData object from scratch by copying from the old one and thereby fix the names (described here). But ideally, one would do this without copying the data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the spatialdata_io.merscope reader and the SpatialData class described in the linked tutorial. Trace how individual elements are stored and named, then determine the scope of a rename operation. Done means an example such as renaming "slide_region_transcripts" to "just_transcripts" works without copying the data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100