This repository contains the source code to reproduce the results in the paper: "Evaluating batch correction methods for image-based cell profiling".
These scripts generate several embedding visualizations and .csv files for quantitative evaluation of batch correction methods.
We suggest Mamba for environment management. The following commands create the environment from scratch and install the required packages.
mamba env create --file environment.yaml
mamba activate batchcp
Run the following command to install R package kBET
:
R -e "remotes::install_github('theislab/kBET')"
The single-cell integration benchmark scib
package may fail because it
includes c/c++
code that should be compiled specifically for your
environment. An alternative is to install it from source:
DEST=$HOME/projects/scib
git clone https://github.com/theislab/scib.git $DEST
cd $DEST
git checkout v1.1.4
pip install -e .
More info in this issue
Similarly, mnnpy
may require manual installation. More info at
https://github.com/chriscainx/mnnpy#install
Download profiles and metadata:
source download_data.sh
Every scenario reported in the paper can be reproduced running snakemake with the associated config file. For example, to reproduce Scenario 1 using 3 cores:
snakemake -c3 --configfile inputs/conf/scenario_1.json
You can get the scores, corrected profiles and plots in the ./outputs
folder.