DE analysis workflow in Seurat: splitting object by sample or by condition #8392
ruggerobelluomo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I have a simple question. I have 16 scnuclei RNA seq samples divided in 4 conditions (4 samples per condition), which I integrated together with this workflow:
alldata.list <- SplitObject(alldata, split.by = "orig.ident")
alldata.list <- lapply(X = alldata.list, FUN = function(x) {
x = NormalizeData(x)
x=FindVariableFeatures(x)
x=ScaleData(x, vars.to.regress=c("nFeature_RNA", "percent.mt"))
x <- RunPCA(x, verbose = T, npcs=50)
x <- RunUMAP(x, dims = 1:30, verbose = FALSE,reduction = "pca")
x <- FindNeighbors(x, dims = 1:30, verbose = FALSE)
x <- FindClusters(x, verbose = FALSE, res=0.55)
})
features <- SelectIntegrationFeatures(alldata.list)
alldata.anchors <- FindIntegrationAnchors(alldata.list, dims = 1:30,anchors.features=features)
alldata.integrated <- IntegrateData(alldata.anchors)
Then I performed DE analysis on the RNA assay. I was wondering, would this workflow give me the different result if instead of splitting the object by orig.ident. (which is per sample basically) I would split by condition? And if so, which of the two would be more correct? My aim is to find DE genes between the 4 conditions.
Thanks a lot for the help!
Beta Was this translation helpful? Give feedback.
All reactions