zhangyuqing / ComBat-seq

Batch effect adjustment based on negative binomial regression for RNA sequencing count data
154 stars 39 forks source link

combat-seq produces very large values after batch adjustment for some genes #15

Open marykthompson opened 3 years ago

marykthompson commented 3 years ago

Hi,

I am trying out Combat-seq as a way to reduce batch effects in a dataset prior to use with downstream packages that do not support direct modeling of batch effects. I have found that for a few genes, it produces very strange results. For example:

Original counts: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 4., 0., 0., 0., 0., 0.])

Combat-seq adjusted counts: array([0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 5.82247031e+11, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00])

The value of 4 has been adjusted to 5.8e11! This is causing errors in my downstream analysis.

I am just running Combat-seq with the default parameters and a covariate matrix:

adjusted_all_cov <- ComBat_seq(all_m, batch = combo_batches4, group = NULL, covar_mod = cov_mat_all)

I was wondering if you could explain why this is happening and if there are any options in the Combat-seq package that might help me avoid it.

I'm using sva_3.36.0.

Thanks!

Ilarius commented 1 year ago

hello, did you solve this issue?