navinlabcode / navinlabcode/CellTrek
Dealing with spatial data with merged samples
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 135
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I try to use CellTrek to merge my spatial and single-cell data. However, I had this error when running the traint ():
Cannot add more or fewer cell meta.data information without values being named with cell names
I found out that it is caused by st_data$coord_x <- st_data@images[[1]]@coordinates[, coord_xy[1]].
The spatial data is merged from two different samples. Therefore, the total spot number in the meta.data is larger if only images[[1]] coordinates are loaded.
The two spatial samples are replicates so I don't want to remove it. Is there a way I can load the merged st object for this analysis?
Thanks,
Ziliang
Contributor guide
No contributing guide indexed for this repository
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 at the traint() entry point and inspect the coordinate assignment from st_data@images[[1]]@coordinates. Compare that data with the merged object’s spot metadata across both samples; done means traint() accepts the merged spatial object without the cell metadata length error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100