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é
Dear Peter,
Thank you for your input. I have read the vignete and did as you suggested:
where merge_order is:
Once again, thank you