This is a test version of Biostars. For the public version, visit https://www.biostars.org.
single cell RNA seq integration(Error in UseMethod(generic = "as.sparse", object = x))

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

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).

thank you for your kind advice!

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

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

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

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!!

0 answers

No answers yet.

Log in to answer this question.