Czh3 / iSpatial

infer whole genome spatial transcriptome by integrating single cell RNAseq and spatial transcriptome
3 stars 3 forks source link

Error in cor(t(spatial_feature), method = cor.method) : supply both 'x' and 'y' or a matrix-like 'x' #7

Open MingyuYang-Yale opened 3 weeks ago

MingyuYang-Yale commented 3 weeks ago

Hi,

I'm trying to run the tutorial on the striatum dataset but I got this error message:

Screenshot 2024-06-12 at 3 56 19 PM

Could you please provide guidance on how to resolve this issue?

Thank you!

Mingyu

Czh3 commented 3 weeks ago

Hi Mingyu,

Have you successfully obtained the SVGs gene list? There should be the SVG stored in this variable: SVGs_infer_sig$gene.

image

And, can you check the spatial coordinates in the seurat obj? I'm not sure the coordinates are missing or not in your data. head(NA_merFISH_iSpatial@images$image@coordinates)

image
MingyuYang-Yale commented 3 weeks ago

Thank you for your prompt reply!

I was able to successfully obtain the SVGs gene list. However, I noticed that the spatial coordinates in my Seurat object are slightly different, as they are not integers.

Screenshot 2024-06-13 at 12 32 25 PM

Additionally, when I ran the previous 'iSpatial::spatial_variable_genes' step, I received the following message: "As of Seurat v5, we recommend using AggregateExpression to perform pseudo-bulk analysis. The first group.by variable xy starts with a number, so we are appending g to ensure valid variable names." I'm not sure if this is causing the error.

Screenshot 2024-06-13 at 12 45 39 PM