navinlabcode / navinlabcode/CellTrek

Dealing with spatial data with merged samples

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.