Teichlab / bbknn

Batch balanced KNN
MIT License
149 stars 25 forks source link

Correcting for more than 1 covariate using BBKNN #18

Closed dnehar closed 5 years ago

dnehar commented 5 years ago

Hi,

Is there a way to correct for more than 2 covariates (e.g. 10X batches and donors) using BBKNN ? Also, thank you for this super helpfull tool ! Best,

ktpolanski commented 5 years ago

Just combine the two into a new adata.obs column. Assuming they're both strings, adata.obs['combined'] = adata.obs['key1'] + adata.obs['key2'].