Teichlab / bbknn

Batch balanced KNN
MIT License
149 stars 25 forks source link

Removing multiple covariates during integration #46

Closed connorhknight closed 3 years ago

connorhknight commented 3 years ago

Hi,

I was wondering if it is possible for bbknn to correct for more than one batch indicator. i.e. different projects and different donors.

Thanks!

Connor

ktpolanski commented 3 years ago

You could create a new .obs column which combines your multiple batch indicators and feed that in. Something along the lines of adata.obs['bbknn_batch'] = [str(i)+'-'+str(j) for i,j in zip(adata.obs['project'], adata.obs['donor'])] should do the trick.