Adjust Combat for control cells
I wrote this adjustment for Combat for a recent publication (Boettcher et al, 2020): https://www.biorxiv.org/content/10.1101/2020.08.12.247585v1 It allows to compute a ComBat for control cells and apply this to a second set of cells.
Should the reference object where you learn the transformation (currently adata) always be a subset of the data you're going to apply the transformation to (adata2)? If so, instead of passing a separate object, could there be a mask of which samples to train on?
If not, what do you think about making this a separate function? Maybe combat_by_reference?
Should the reference object where you learn the transformation always be a subset of the data you're going to apply the transformation to? If so, instead of passing a separate object, could there be a mask of which samples to train on?
If not, what do you think about making this a separate function? Maybe
combat_by_reference?
Thank you for your great suggestions. I think it's easier to add a mask for train/evaluate instead of splitting into 2 objects.
I don't think it should be a separate combat_by_reference function, though, because the chance in the function is small and I preserved the original functionality.