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

Get and set the primary colGeometry #24

Open
lambdamoses opened this issue Feb 13, 2024 · 2 comments
Open

Get and set the primary colGeometry #24

lambdamoses opened this issue Feb 13, 2024 · 2 comments
Labels
beginner enhancement New feature or request

Comments

@lambdamoses
Copy link
Collaborator

In practice there usually is a primary colGeometry, and we can reorder the colGeometries so the first one is the primary one, like cell segmentation in MERFISH and Visium spots (or you can change it to the centroids). Maybe we can have a convenience function to do such reordering since many functions default to the first one.

@lambdamoses lambdamoses added enhancement New feature or request beginner labels Feb 13, 2024
@lambdamoses
Copy link
Collaborator Author

Assigned to @mingqizh

@lambdamoses
Copy link
Collaborator Author

Inspect internals:

library(SingleCellExperiment)
devtools::load_all()
# Inspect the internals
int_colData(sfe)

You should see that int_colData(sfe) is a DataFrame (S4 data frame), with columns that include reducedDims, spatialCoords, and colGeometries. The columns themselves can be DataFrames. Next run int_colData(sfe)$colGeometries to see the internals of colGeometries. It should be a DataFrame whose columns are sf data frames. Then simply reorder the columns of int_colData(sfe)$colGeometries so the first column is the primary colGeometry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant