Closed pabloatria18 closed 3 years ago
This will likely resolve after installing the development version of sctransform: remotes::install_github("ChristophH/sctransform@develop")
Also see the following related issue: https://github.com/ChristophH/sctransform/issues/71
Hello I want to run scTransform on my data. I have two different conditions, so I want to integrate them If I merge both of my seurat objects previous to any analysis gives me an error.
I am trying to do the following:
my.data.control <- Read10X(data.dir = "C:/Users/Pablo/Documents/RNA-seq/R/count-Control/10") my.data.loaded <- Read10X(data.dir = "C:/Users/Pablo/Documents/RNA-seq/R/count-Loaded/10") my.data <- CreateSeuratObject(counts = my.data.control, project = "CL", min.cells = 3, min.features = 200) my.data2 <- CreateSeuratObject(counts = my.data.loaded, project = "CL", min.cells = 3, min.features = 200)
pbmc <- my.data pbmc2 <- my.data2 group <- sample(c("control"), size = 5797, replace = TRUE) group2 <- sample(c("loaded"), size = 4705, replace = TRUE)
names(group) <- colnames(pbmc)
names(group2) <- colnames(pbmc2)
pbmc <- AddMetaData(object = pbmc, metadata = group, col.name = "group") pbmc2 <- AddMetaData(object = pbmc2, metadata = group2, col.name = "group") pbmc.combined <- merge(pbmc, pbmc2, add.cell.ids = c("Control", "Loaded"), project = "Test")
pancreas.list <- SplitObject(pbmc.combined, split.by = "group") pancreas.list <- pancreas.list[c("Control", "Loaded")] for (i in 1:length(pancreas.list)) { pancreas.list[[i]] <- SCTransform(pancreas.list[[i]], verbose = FALSE) }
But I am getting this message: Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 't': missing value where TRUE/FALSE needed In addition: There were 27 warnings (use warnings() to see them)
Thanks for the help