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

error with SpatialEnhance #129

Open
laetitiacollet opened this issue Aug 2, 2024 · 3 comments
Open

error with SpatialEnhance #129

laetitiacollet opened this issue Aug 2, 2024 · 3 comments

Comments

@laetitiacollet
Copy link

Dear Edward,

I am trying to run bayes space version ‘1.8.2’ with visium ST data (from Cytassist). When I run
spatialCluster(se_filtered, q=8, platform="Visium", d=7, nit.method="mclust", model="t", gamma=3, nrep=1000, burn.in=100, save.chain=TRUE) it is working.
However with spatialEnhance I have an error message :
se_filtered.enhanced <- spatialEnhance(se_filtered, q=8, d=7, platform="Visium",

  •                                 model="t", gamma=3,
    
  •                                 jitter_prior=0.3, jitter_scale=3.5,
    
  •                                 nrep=1000, #suggest running with at least 10,000 iterations 
    
  •                                 burn.in=100,
    
  •                                 save.chain=TRUE)
    

Error: subscript contains invalid names

However when I run the same command with platform = "ST" it does work.

Have you already encounter this specific problem ?

Thank you in advance for your reply.

Best regards,

@edward130603
Copy link
Owner

Sorry for the delayed response. Can you post the output of traceback()? Did you load the data using BayesSpace or another package such as SpatialExperiment?

@laetitiacollet
Copy link
Author

laetitiacollet commented Aug 20, 2024 via email

@edward130603
Copy link
Owner

Ok, I think this is happening because your colData doesn't have the full spatial set of spatial coordinate info. Your colData should have columns from tissue_positions.csv. Depending on the version of software you are using it would be either 1) the columns row, col, imagerow, and imagecol or 2) the columns array_row, array_col, pxl_row_in_fullres, and pxl_col_in_fullres.

If you used BayesSpace or SpatialExperiment to load in your data, you should have these columns by default. If you used some other tool, you may need to modify your data object to add these columns.

Neighborhood detection for spatialCluster only uses row/col but for spatialEnhance uses both sets of coordinates.

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

2 participants