single cell RNA seq integration(Error in UseMethod(generic = "as.sparse", object = x))
0
0
Entering edit mode
8 months ago
kayah ▴ 20

enter image description here enter image description here

I don't know why this error came out. Because of this error i can't integrate my data.... I think one of the function i use trigger as.sparse issue but still i don't know how to handle this problem please help me

scRNA-seq • 774 views
ADD COMMENT
1
Entering edit mode

Please do not post screenshots for text data. Use copy and paste and then format the data with code option (101010 button in edit mode).

ADD REPLY
0
Entering edit mode

thank you for your kind advice!

ADD REPLY
1
Entering edit mode

Step1 would be to remove all pipes and find out which function chokes.

ADD REPLY
0
Entering edit mode

Which code is the Step 1 process...??

ADD REPLY
0
Entering edit mode

I rephrase: Execute every line of code step by step without pipes and report at which step the error comes up.

ADD REPLY
0
Entering edit mode
library(devtools)
library(dplyr)
library(ggplot2)
library(Seurat)
library(SeuratObject)
library(sp)
library(patchwork)
library(harmony)
library(Rcpp)
?library(SeuratWrappers)
library(clustree)
library(cowplot)
library(RColorBrewer)
library(pheatmap)
install.packages("FindvariableFeatures")

young_1 <- readRDS('~/Desktop/GSE137869/2ndtry/seurat_object_young1.rds')
young_2 <- readRDS('~/Desktop/GSE137869/2ndtry/seurat_object_young2.rds')
old_1 <- readRDS('~/Desktop/GSE137869/2ndtry/seurat_object_old1.rds')
old_2 <- readRDS('~/Desktop/GSE137869/2ndtry/seurat_object_old2.rds')

young_1 <- NormalizeData(young_1)
young_2 <- NormalizeData(young_2)
old_1 <- NormalizeData(old_1)
old_2 <- NormalizeData(old_2)

library(glmGamPoi)

WAT <- merge(young_1, y = c(young_2, old_1, old_2), 
             add.cell.ids = c("young1", "young2", "old1", "old2"),
             project = "WAT")
WAT <- NormalizeData(WAT) 
WAT <- FindVariableFeatures(WAT,selection.method = "vst", nfeatures = 2000)
all.genes <- rownames(WAT)
WAT <-ScaleData(WAT, features = all.genes)
View(WAT@meta.data)
WAT <- SCTransform(WAT, vars.to.regress = c("percent.mt"))

SCTransform spot is where error happens... I want to transform data to SCTform please help me!!

ADD REPLY

Login before adding your answer.

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