Thank you so much for your help, it was really helpful.
Hi all, I just wanted to know if any of you have experience creating a Seurat object with GSE data. I downloaded the files from GEO, and I'm getting the counts (h5 file), the scale factors (json), the image (png) and the tissue positions (csv). I've been trying to create a Seurat object, so far no success.
Thanks in advance.
2 answers
You can download dataset of GSE188257 from here. Here I m showing how to create a Seurat object for 1 dataset. You can follow the same process for other three datasets-
#There are 4 datasets in GSE188257. I m working on only GSM5673398_655 set
1. Perform these in your terminal.
mkdir 01-GSM5673398_655
cd 01-GSM5673398_655
ls
GSM5673398_655_counts.csv.gz
GSM5673398_655_scalefactors_json.json.gz
GSM5673398_655_tissue_positions_list.csv.gz
GSM5673398_655_filtered_feature_bc_matrix.h5
GSM5673398_655_tissue_lowres_image.png
#create a spatial directory inside 01-GSM5673398_655
mkdir spatial
cd spatial
#Copy spatial data into spatial dir, unzip and rename them as in 10x output
cp ../GSM5673398_655_scalefactors_json.json.gz .
cp ../GSM5673398_655_tissue_* .
gunzip *gz
ls
GSM5673398_655_scalefactors_json.json
GSM5673398_655_tissue_lowres_image.png
GSM5673398_655_tissue_positions_list.csv
mv GSM5673398_655_scalefactors_json.json scalefactors_json.json
mv GSM5673398_655_tissue_lowres_image.png tissue_lowres_image.png
mv GSM5673398_655_tissue_positions_list.csv tissue_positions_list.csv
ls
scalefactors_json.json
tissue_lowres_image.png
tissue_positions_list.csv
2. Perform these in R
library(Seurat)
data_dir="/User/01-GSM5673398_655"
s655 <- Seurat::Load10X_Spatial(
data.dir = data_dir,
filename = "GSM5673398_655_filtered_feature_bc_matrix.h5",
assay = "Spatial", # specify name of the initial assay
slice = "slice1", # specify name of the stored image
filter.matrix = TRUE,
to.upper = FALSE
)
s655
An object of class Seurat
32285 features across 841 samples within 1 assay
Active assay: Spatial (32285 features, 0 variable features)
1 layer present: counts
1 image present: slice1
head(s655@meta.data)
orig.ident nCount_Spatial nFeature_Spatial
AAACCGGGTAGGTACC-1 SeuratProject 26570 6507
AAACCGTTCGTCCAGG-1 SeuratProject 30001 6605
AAACTGCTGGCTCCAA-1 SeuratProject 45459 6943
AAAGGCTCTCGCGCCG-1 SeuratProject 20792 5455
AAAGGGATGTAGCAAG-1 SeuratProject 19440 5338
AAAGTAGCATTGCTCA-1 SeuratProject 25035 6590
Have you looked at the Seurat vignettes for guidance?
Edit: this vignette in particular goes through analysing Visium data
Thanks you so much !
this vignette does not explain how to load data from files. does 10X have a tutorial for this?
This the page for the Load10X_Spatial() function, which bk11 used in his reply above (if you refer to step 2 in his answer). https://satijalab.org/seurat/reference/load10x_spatial
Also, once you are more familiar with the Seurat workflows, the command cheat sheet is a nice reference as well :) I often still refer to this, as I can never remember all the functions and their arguments! https://satijalab.org/seurat/articles/essential_commands
Log in to answer this question.
Could you provide the GEO accession that you are working on?
Sure it is GSE188257
It's Visium with just one s. I've fixed your post.