Seurat V5 integration
1
0
Entering edit mode
6 months ago

Hello. I have two seurat objects. One is the infected sample and the second is the uninfected. Here is the code:

merged_dat <- list(inf,uninf)
merged_dat[[1]] <- subset(merged_dat[[1]], subset = nFeature_RNA > 200 & nFeature_RNA < 8200 & percent.mt < 10)
merged_dat[[2]] <- subset(merged_dat[[2]], subset = nFeature_RNA > 200 & nFeature_RNA < 10000 & percent.mt < 10)

for (x in seq_along(merged_dat)) {  
  merged_dat[[x]] <- SCTransform(merged_dat[[x]],verbose = FALSE)
}

So I want to integrate them using Seurat V5 as explained in this link: https://satijalab.org/seurat/articles/seurat5_integration

But how do I combine the two seurat objects into one to run the integration code such as this one:

obj <- IntegrateLayers(
  object = obj, method = CCAIntegration,
  orig.reduction = "pca", new.reduction = "integrated.cca", verbose = FALSE
)
Seurat integration • 960 views
ADD COMMENT
1
Entering edit mode
6 months ago

It will depend on your context and question.

I guess you will want to compare gene expression between your conditions within cell types at some point. If you integrate your samples this covariate will be reduced.

Just merge the sample and look at your cell projection on UMAP or TSNE to see if it make sense in your biological question. For example if you expect a certain cell type to not be affected by your infection, cells from this cell type should cluster together (infected and uninfected cells) on the projection.

merged_dat <- list(inf,uninf)
merged_dat[[1]] <- subset(merged_dat[[1]], subset = nFeature_RNA > 200 & nFeature_RNA < 8200 & percent.mt < 10)
merged_dat[[2]] <- subset(merged_dat[[2]], subset = nFeature_RNA > 200 & nFeature_RNA < 10000 & percent.mt < 10)
data <- merge(merged_dat[[1]], y = merged_dat[[2]], add.cell.ids = c("inf", "uninf"), project = "name", merge.data = TRUE)

You can then scale the new data object via ScaleData or SCTransform and continue your analysis by reducing dimensionality and clustering.

ADD COMMENT

Login before adding your answer.

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