Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SegmentedCell function #52

Open
HaefligerSimon opened this issue Nov 8, 2024 · 4 comments
Open

SegmentedCell function #52

HaefligerSimon opened this issue Nov 8, 2024 · 4 comments

Comments

@HaefligerSimon
Copy link

Hi, I have a small issue with the SegmentedCell function in the spicyR package. It seems that in the new version of the package (version 1.17.10), this function is no longer present. Can you confirm this and possibly suggest a solution?

@alexrunqin
Copy link
Collaborator

Hi! Thanks for the feedback with our package.

As of 1.17.0, the SegmentedCell function and SegmentedCells as an object has been deprecated and is no longer in use. spicyR now operates primarily using SingleCellExperiment and SpatialExperiment objects.

Could I ask what you were using the SegmentedCell function for? There's likely now a new function which replaces its functionality.

Best,
Alex

@HaefligerSimon
Copy link
Author

Hi, thanks for the quick response. I wanted to follow these line of code here : "### Something that resembles cellProfiler data
set.seed(51773)
n = 10
cells <- data.frame(row.names = seq_len(n))
cells$ObjectNumber <- seq_len(n)
cells$ImageNumber <- rep(1:2,c(n/2,n/2))
cells$AreaShape_Center_X <- runif(n)
cells$AreaShape_Center_Y <- runif(n)
cells$AreaShape_round <- rexp(n)
cells$AreaShape_diameter <- rexp(n, 2)
cells$Intensity_Mean_CD8 <- rexp(n, 10)
cells$Intensity_Mean_CD4 <- rexp(n, 10)
cellExp <- SegmentedCells(cells, cellProfiler = TRUE)" I have IMC data and I am working with a SingleCellExperiment object and I want to compare the cell-to-cell interaction between two group of patient. Is there a another way to run this? Thanks in advance for the feedback

Best regards

Simon

@ellispatrick
Copy link
Member

Hi SImon,

If you've got your data into a SingleCellExperiment then you've done all of the hard work. Now you just need to tell spicy which columns in your colData() have information about your grouping structure (condition), your images (imageIDCol), cell type labels (cellTypeCol) and the x-y coordinates (spatialCoordCols).

If you have one image per person:
result <- spicy( cells, condition = "mygroups", imageIDCol = "imageID", cellTypeCol = "cellType", spatialCoordCols = c("x", "y"))

or if you have multiple images per person:
result <- spicy( cells, condition = "mygroups", subject = "subjectID", imageIDCol = "imageID", cellTypeCol = "cellType", spatialCoordCols = c("x", "y"))

@HaefligerSimon
Copy link
Author

Great, thanks a lot for your help! Best regards, Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants