I am running combat_met on a dataset with 43 samples and 2 conditions. The M-value matrix has 889341 probes and 43 samples. I try running combat_met
adj_bv_mat <- ComBat_met(mValues, dtype = "M-value", batch = batch, group = group, full_mod = TRUE,ncores = 4)
Found 2 batches and 43 samples. Using full model in ComBat-met.
Adjusting for 1 covariate(s) or covariate level(s). Found 6900026 missing data values Fitting the GLM model Found 19016 features with zero model variance;
these features won't be adjusted for batch effects. Errors encountered in 0 features with model fitting;
these features won't be adjusted for batch effects. Found 870325 features with zero model variance within at least one batch;
these features won't be adjusted for batch effects. Shrinkage off - using GLM estimates for parameters Error in
mu_hat_mat[, batches_ind[[jj]]] : subscript out of bounds
Any suggestions? (I have run combat_met successfully on a subset of 31 samples of this data)
0 answers
No answers yet.
Log in to answer this question.
Can you share the output of
str(mValues)?Dear Ramiro,
can you check whether all the batches are balanced across all biological groups? I have found Combat_met works only for balanced designs, e.g.: Group A B Batch1 3 3 Batch2 3 3 This has solved the issue for me, hope it helps. Best, Matej
Hi Ramiro - thank you for sharing your experience with ComBat-met.
Looking at your status messages, I noticed two main things: there are a high number of missing values, and several features show zero model variance within at least one batch. Could you double-check your input data? Specifically, I'd suggest looking into how NAs were handled. Perhaps try imputation if they haven't been addressed.
It would also be helpful to know what your methylation percentages (or M-values) look like. By default, the beta-value threshold is set to 1e-4 (that corresponds to an M-value threshold of -9.21); if many of your values fall below that (or above 1 - 1e-4), they are being capped, which might be impacting the results. If you suspect this is the case, you can try changing the
pseudo_betaargument to a smaller value.Let me know if that helps.
Junmin