Creating a Seurat object with Visium public available data
2
0
Entering edit mode
4 months ago

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.

Spatial Visium 10X • 1.1k views
ADD COMMENT
1
Entering edit mode

Vissium

It's Visium with just one s. I've fixed your post.

ADD REPLY
0
Entering edit mode

Could you provide the GEO accession that you are working on?

ADD REPLY
0
Entering edit mode

Sure it is GSE188257

ADD REPLY
4
Entering edit mode
4 months ago
bk11 ★ 3.0k

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
ADD COMMENT
0
Entering edit mode

Thank you so much for your help, it was really helpful.

ADD REPLY
0
Entering edit mode
4 months ago
Nat.Nataren ▴ 90

Have you looked at the Seurat vignettes for guidance?

Edit: this vignette in particular goes through analysing Visium data

https://satijalab.org/seurat/articles/spatial_vignette

ADD COMMENT
0
Entering edit mode

Thanks you so much !

ADD REPLY
0
Entering edit mode

this vignette does not explain how to load data from files. does 10X have a tutorial for this?

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6