Integration of Single Cell Experiments with batchelor::fastMNN
1
0
Entering edit mode
José • 0
@2b4f03e8
Last seen 13 days ago
Austria

Dear All,

I have a list with 9 single cell experiment (SCE) objects which I want to integrate using batchelor::fastMNN. The experiment design is: 3 donors gave their blood in 3 different times and their blood was stimulated with a recombinant protein. I have done the data QC and scTransform:vst for normalization, transformation and feature selection. Now I would like to integrate the 9 SCE objects in a single SCE using batchelor::fastMNN. In the function vignette it states: "batch: A vector or factor specifying the batch of origin for all cells when only a single object is supplied in .... This is ignored if multiple objects are present.". This means that if I use as input the list with the 9 SCE, the batch will be ignored and each SCE within the list will be treated as a batch. Now my question: Since I have paired samples, wouldn`t make more sense to merge the 9 SCE before correction (merge_sce), and then within the batchelor::fastMNN do:

# MNN correction
set.seed(123)
mnn_out <- batchelor::fastMNN(merged_sce,
                              subset.row = hvgs_ens,
                              **batch = merged_sce$donor**,
                              assay.type = "vst",
                              auto.merge = T,
                              weights = T, 
                              get.variance = T, d = 50, k = 20, 
                              BSPARAM = BiocSingular::IrlbaParam(deferred = TRUE))

What would be the best way to merge my data?

Thank you for any help. José

fastMNN SingleCellData BatchEffect batchelor • 491 views
ADD COMMENT
0
Entering edit mode
Peter Hickey ▴ 740
@petehaitch
Last seen 8 weeks ago
WEHI, Melbourne, Australia

If I wanted to first merge paired samples, I would probably combine the 9 SCEs into a single SCE and then use the merge.order argument See ?batchelor::fastMNN for a description of merge.order, in particular how it can be specified as "a list of lists representing a tree structure specifying a hierarchical merge order".

ADD COMMENT
0
Entering edit mode

Dear Peter,

Thank you for your input. I have read the vignete and did as you suggested:

set.seed(123)
mnn_out <- batchelor::fastMNN(merged_sce,
                              subset.row = selected_features,
                              batch = merged_sce$sampleid,
                              assay.type = "vst",
                              merge.order = merge_order,
                              weights = TRUE, correct.all = TRUE,
                              get.variance = TRUE, d = 50, k = 20, 
                              BSPARAM = BiocSingular::IrlbaParam(deferred = TRUE))

where merge_order is:


[[1]]
[[1]][[1]]
[1] "DONORA_TIME3_Stim" "DONORA_TIME2_Stim" "DONORA_TIME1_Stim"


[[2]]
[[2]][[1]]
[1] "DONORB_TIME3_Stim" "DONORB_TIME2_Stim" "DONORB_TIME1_Stim"


[[3]]
[[3]][[1]]
[1] "DONORC_TIME3_Stim" "DONORBC_TIME2_Stim" "DONORBC_TIME1_Stim"

Once again, thank you

ADD REPLY

Login before adding your answer.

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