This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Seurat Sctransform integration errors: Error in scale.data[anchor.features, ] : # no 'dimnames' attribute for array

Hi, I need to integrate the 2 data set. Both have been filtered and SCTransform-ed. However, when I run PrepSCTIntegration, I keep getting the following error message:

# |                                                  | 0 % ~calculating  Warning: SCT model not present in assay
# Error in scale.data[anchor.features, ] : 
# no 'dimnames' attribute for array

I noticed that the SCT scale data of the merged object is removed after merging the dataset:

dim(merged[["SCT"]]@scale.data)
# [1] 0 0

Instead, by directly creating the list (without merging), I get another error:

merged.list2 <- list(SEO1, SEO2)
features <- SelectIntegrationFeatures(merged.list2, nfeatures = 3000)
merged.list2 <- PrepSCTIntegration(object.list = merged.list2, anchor.features = features)
# Error in `[<-.data.frame`(`*tmp*`, , "cells_step1", value = FALSE) : 
# replacement has 1 row, data has 0** 

Does anyone know how to solve this problem?

I googled similar cases and also looked at several Seurat issues but couldn't find a practical solution.

Any suggestions would be very much appreciated. Thank you very much.


The details are below (sample info is masked with XXX):

SEO1
# An object of class Seurat 
# XXXXX features across XXXX samples within 2 assays 
# Active assay: SCT (XXXXX features, 3000 variable features)
# 1 other assay present: RNA
# 2 dimensional reductions calculated: pca, umap

SEO2
# An object of class Seurat 
# XXXXX features across XXXX samples within 2 assays 
# Active assay: SCT (XXXXX features, 3000 variable features)
# 1 other assay present: RNA
# 2 dimensional reductions calculated: pca, umap

merged <- merge(x = SEO1, y = SEO2)
VariableFeatures(merged[["SCT"]]) <- rownames(merged[["SCT"]]@scale.data)

merged.list <- SplitObject(merged, split.by = "Sample")
features <- SelectIntegrationFeatures(merged.list, nfeatures = 3000)
merged.list <- PrepSCTIntegration(object.list = merged.list, anchor.features = features)
scrna-seq sctransform seurat integration r

0 answers

No answers yet.

Log in to answer this question.