When I apply sctransform with batch_var = "Batch" and latent_var as default, the model becomes y ~ (log_umi) : Batch + Batch + 0
However, the correct function currently only sets latent_var (i.e. log_umi) to its median value without touching Batch. In this way, the corrected UMI seems to still contain the batch effect inside.
I am wonder whether it makes sense to set Batch to the same level as well (e.g. for a Batch contains values of "A", "B" and "C", set all samples to "B") right before building regressor_data? Is this going to give me a corrected UMI matrix without Batch effect?
Hi,
When I apply
sctransform
withbatch_var = "Batch"
andlatent_var
as default, the model becomesy ~ (log_umi) : Batch + Batch + 0
However, thecorrect
function currently only setslatent_var
(i.e. log_umi) to its median value without touchingBatch
. In this way, the corrected UMI seems to still contain the batch effect inside. I am wonder whether it makes sense to setBatch
to the same level as well (e.g. for aBatch
contains values of "A", "B" and "C", set all samples to "B") right before buildingregressor_data
? Is this going to give me a corrected UMI matrix without Batch effect?Thanks a lot!