Hi,
I'm trying to use STgradient to find any correlation between gene expression and distance. I used Seurat for preprocessing and normalization and I'm wondering if I can extract the counts and coordinates from the Seurat object as input?
I tried creating an STlist using the matrices but it didn't work. See error below:
sGE_1014rep2 <- STlist(rnacounts= rep2_1014[["Spatial"]]$counts, spotcoords = GetTissueCoordinates(rep2_1014), samples = NULL)
Error in STlist(rnacounts = rep2_1014[["Spatial"]]$counts, spotcoords = GetTissueCoordinates(rep2_1014), : Input not recognized. Please refer to documentation.
The counts matrix is 32285 x 2597, where the rows are genes and columns are Visium spots.
The coordinates matrix is 2597 x 2, where the rows are Visium spots and columns are x and y coordinates.
Additionally, when I specify samples = "rep2_1014", this error pops up:
Error in detect_input(rnacounts = rnacounts, spotcoords = spotcoords, : Number of sample names do not match number of RNA counts tables.
There's only one sample in the object.
Thanks!
Hi,
I'm trying to use STgradient to find any correlation between gene expression and distance. I used Seurat for preprocessing and normalization and I'm wondering if I can extract the counts and coordinates from the Seurat object as input?
I tried creating an STlist using the matrices but it didn't work. See error below:
sGE_1014rep2 <- STlist(rnacounts= rep2_1014[["Spatial"]]$counts, spotcoords = GetTissueCoordinates(rep2_1014), samples = NULL)The counts matrix is 32285 x 2597, where the rows are genes and columns are Visium spots.
The coordinates matrix is 2597 x 2, where the rows are Visium spots and columns are x and y coordinates.
Additionally, when I specify samples = "rep2_1014", this error pops up:
Error in detect_input(rnacounts = rnacounts, spotcoords = spotcoords, : Number of sample names do not match number of RNA counts tables.There's only one sample in the object.
Thanks!