speckle
speckle copied to clipboard
Batch normalised proportions
Is it possible to obtain batch normalized proportions using the propeller package? I have multiple samples from 5 different studies which are integrated using scvi. I would like to perform de novo clustering based on the proportions of 50-60 cell types. Is it possible to retrieve transformed proportions by regressing out the batch effects from the studies?
Thank you!
Best wishes, Constantinos
Hi Constantinos
One way of doing this is to use the limma removeBatchEffect function. What I would do is get the transformed proportions by running the getTransformedProps function in speckle:
props <- getTransformedProps(sce$cluster, sce$sample, transform="logit")
and then passing the transformed proportions to removeBatchEffect
props.nobatch <- limma::removeBatchEffect(props$TransformedProps, batch=batch, design=design)
Have a read of the help for the removeBatchEffect function. The design matrix should include the covariates of interest, and exclude the batch variable.
?limma::removeBatchEffect
Then you could cluster props.nobatch.
Hope that helps.
Cheers, Belinda