SONGDONGYUAN1994/scDesign3

Question on setting batch effect strength

Opened this issue · 1 comments

Hi Dongyuan,

in case I have 3 batches in total and I call the mean of the normalisation distribution 'strength':

num_batch <- 3
batch_strength <- 1
BATCH_marginal_alter <- lapply (BATCH_marginal, function(x) {
     lh <- length(x$fit$coefficients)
    x$fit$coefficients [ lh ] <- rnorm(1, mean = batch_strength, sd = 2)
    x$fit$coefficients [ lh-1 ] <- rnorm(1, mean = batch_strength+1, sd = 2)
    Х
})

Then I can separate all the 3 batches.

I am thinking about one thing now: Why don't we sample one value for a batch, and apply this value for all the features(genes) in this batch?

i.e.

batch_strength <- 1
co_1 <- rnorm(1, mean = batch_strength, sd = 2)
co_2 <- rnorm(1, mean = batch_strength + 1, sd = 2)
BATCH_marginal_alter <- lapply (BATCH_marginal, function(x) {
     lh <- length(x$fit$coefficients)
    x$fit$coefficients [ lh ] <- co_1
    x$fit$coefficients [ lh-1 ] <- co_2
    Х
})

Looking forward to your reply!

Best,
Danyang

Hi Danyang,
Short answer: I think people tend to believe that the batch effects are gene-specific. For example, see Combat-seq. You can check more literature or real data and decide whether it is reasonable (keep me posted if you find a conclusion, thanks!)

Best,
Dongyuan