Is there a way of forcing Seurat to include a certain set of genes during integration? I think I saw somewhere that this was possible but after looking through the documentation for the different functions used during integration, and also at various questions on this site, I haven't been able to find anything.
1 answer
You can pass the list of genes to FindIntegrationAnchors
# find common genes for the integration
features <- SelectIntegrationFeatures(your_list_of_seurat_objects)
# add your genes
genes2add <- c("CD8A","CD14",...)
features <- c(genes2add, features)
features <- unique(features)
# Integrate the datasets using the new anchors
anchors <- FindIntegrationAnchors(object.list = your_list_of_seurat_objects , anchor.features = features)
exp_Integrated <- IntegrateData(anchorset = anchors)
You can then DefaultAssay(exp_Integrated) <- "integrated", and continue with your analysis (PCA, UMAP, clustering,...)
Actually, I have never done it. I have removed some genes (e.g. genes associated to contamination), and modify the values of VariableFeatures for training/testing classification models, but I never touched them during integration. The effects of the alteration can vary greatly, mainly because there are many factors involved: the biological system, the number of genes added/removed, the experiment design, the questions you are trying to answer,...
Log in to answer this question.