Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SCTransform #3811

Closed
pabloatria18 opened this issue Dec 10, 2020 · 1 comment
Closed

Use SCTransform #3811

pabloatria18 opened this issue Dec 10, 2020 · 1 comment

Comments

@pabloatria18
Copy link

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

@jaisonj708
Copy link
Collaborator

This will likely resolve after installing the development version of sctransform: remotes::install_github("ChristophH/sctransform@develop")

Also see the following related issue: satijalab/sctransform#71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants