scType on Xenium Spatial Transcriptomics
1
1
Entering edit mode
22 days ago
Emma Jayne ▴ 10

Hi! I am trying to run scType to annotate a total of 18 clusters obtained following Xenium Spatial Transcriptomics (tissue type is pituitary). I am running the script however I keep encountering the following error (code included):

#Annotating via scType
#Step 1: Call packages via library function
library(dplyr)
library(Seurat)
library(HGNChelper)
library(openxlsx)

#Step 2: Install scType source files 
source("https://raw.githubusercontent.com/IanevskiAleksandr/sc-type/master/R/gene_sets_prepare.R")
source("https://raw.githubusercontent.com/IanevskiAleksandr/sc-type/master/R/sctype_score_.R")
source("https://raw.githubusercontent.com/IanevskiAleksandr/sc-type/master/R/sctype_wrapper.R")

#Loading in custom markers
# Read the marker file
markers <- read.xlsx("scTypeDB_short.xlsx")
head(markers)

#Step 3: Run scType on Seurat object
# Run scType with your Seurat object and custom markers
xen <- run_sctype(xen, 
                  assay = "Xenium", 
                  scaled = TRUE, 
                  known_tissue_type = "Pituitary", 
                  custom_marker_file = "scTypeDB_short.xlsx", 
                  name = "sctype_classification")

[1] "Using Seurat v5 object"
Error in (function (cond)  : 
  error in evaluating the argument 'x' in selecting a method for function 'rowSums': subscript out of bounds
In addition: There were 50 or more warnings (use warnings() to see the first 50)

I'm still new to this so would appreciate any help. Thanks!

Spatial Xenium scType • 404 views
ADD COMMENT
0
Entering edit mode
7 days ago
geno89 ▴ 10

First you have to make sure the xenium object is SCT normalised. Then try this

source("https://raw.githubusercontent.com/kris-nader/sp-type/main/sp-type.R")


 xen <- run_sctype(xen, known_tissue_type="Pituitary", slot="SCT")
ADD COMMENT

Login before adding your answer.

Traffic: 2378 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