Seurat integration of two datasets - GSE126783
2
1
Entering edit mode
4.8 years ago
vHelmholtz ▴ 40

Hello,

I am following the integrated analysis of the Seurat tutorial using two datasets (GSE126783: control vs retinal degeneration). Could you let me know how to make an 'object.list' for the 'FindIntegrationAnchors' function?

## SETUP THE SEURAT OBJECT
# Load the PBMC dataset
ctrl.data <- Read10X(data.dir = ".../GEO/GSE126783/GSE126783_RAW/ctrl")
LD.data <- Read10X(data.dir = ".../GEO/GSE126783/GSE126783_RAW/LD")

# Initialize the Seurat object with the raw 
ctrl <- CreateSeuratObject(counts = ctrl.data, project = "O'Koren", 
          min.cells = 3, min.features = 200)
LD <- CreateSeuratObject(counts = LD.data, project = "O'Koren", 
          min.cells = 3, min.features = 200)

## NORMALIZING THE DATA
ctrl <- NormalizeData(ctrl, normalization.method = "LogNormalize", scale.factor = 10000)
LD <- NormalizeData(LD, normalization.method = "LogNormalize", scale.factor = 10000)

## IDENTIFICATION OF HIGHLY VARIABLE FEATURES (FEATURE SELECTION)
ctrl <- FindVariableFeatures(ctrl, selection.method = "vst", nfeatures = 2000)
LD <- FindVariableFeatures(LD, selection.method = "vst", nfeatures = 2000)

## PERFORM INTEGRATION ???

Below is the code in the Seurat tutorial. I will very much appreciate it if you help me to revise the code for the analysis.

data("ifnb")
ifnb.list <- SplitObject(ifnb, split.by = "stim")

ifnb.list <- lapply(X = ifnb.list, FUN = function(x) {
    x <- NormalizeData(x)
    x <- FindVariableFeatures(x, selection.method = "vst", nfeatures = 2000)
})

immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, dims = 1:20)
immune.combined <- IntegrateData(anchorset = immune.anchors, dims = 1:20)
Seurat Integration • 9.9k views
ADD COMMENT
3
Entering edit mode
4.8 years ago
Haci ▴ 730

With your own code, you are already preparing two objects that are normalized and for those variable genes are calculated. In that sense you just need to put your ctrl and LD objects in a list with your_list <- list(ctrl, LD). This new list can now be used for the integration as stated in the Seurat integration tutorial.

ADD COMMENT
0
Entering edit mode

Thank you so much, Haci.

I have performed the integration analysis by adding your code. May I ask you another question? Could you let me know how to distinguish cells in each group (cntrl or LD) in a dimension reduction plot (UMAP plot) by using "group.by" function?

https://satijalab.org/seurat/v3.1/immune_alignment.html

# Visualization
p1 <- DimPlot(immune.combined, reduction = "umap", group.by = "stim")
p2 <- DimPlot(immune.combined, reduction = "umap", label = TRUE)
plot_grid(p1, p2)
ADD REPLY
1
Entering edit mode

group.by can be used the color data points according to the a column in the meta.data slot of a given Seurat object. label is tricky though, as far as I remember, the "labels" come from the "active identities" and this works fine if different identities are clustered separately, otherwise label positions do not quite make sense.

ADD REPLY
0
Entering edit mode

Hi, Haci. did you solve the problem? Thanks.

ADD REPLY
2
Entering edit mode
3.9 years ago
mc2548 ▴ 50

I was working on something similar to what you have been doing.

I'd recommend first of all to do the Normalisation and the downstream processes once you merge the two datasets.

You would want to add an extra column to your Seurat objects once you make them.

add column to object

ctrl <- AddMetaData(ctrl, metadata="Control", col.name="Condition")

LD <-AddMetaData(LD, metadata="LD", col.name="Condition")

Now you want to merge these two objects: https://satijalab.org/seurat/v3.1/merge_vignette.html

Then that will be similar to the "Ifnb" dataset.

Later on you can 'split.by="Condition"'.

Hope this helps.

ADD COMMENT
0
Entering edit mode

This helped me. Thanks!

ADD REPLY

Login before adding your answer.

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