This repository implements the winning solution for the single cell perturbation problems
Python
16
26 commits
updated Dec 22, 2023
This repository implements the 1st place solution for the single cell perturbations problem open-problems-single-cell-perturbations
models.py).helper_classes.py)Make sure Anaconda3 is installed and execute the following:
Clone this repository git clone https://github.com/Jean-KOUAGOU/1st-place-solution-single-cell-pbs.git
First create and activate a conda environement conda create -n single_cell_env python==3.9.0 --y && conda activate single_cell_env
Install all required packages in the environment pip install -r requirements.txt
Create a folder called data/ in the main directory
Add the training data in parquet format, e.g., de_train.parquet as in the competition and check that its path is correct in SETTINGS.json
Also add the test data and a sample submission file (both should be csv files) in the same directory data/ and check SETTINGS.json for path correctness
Run python prepare_data.py to complete all required preprocessing steps
Make sure to locate at the top level of this Github repository
python train.py to train models. This will automatically create a directory call trained_models and store the trained models.Check that there is a non-empty directory named trained_models and that its path is specified in SETTINGS.json under MODEL_DIR
python predict.py to predict on the test data whose path is specified in SETTINGS.json. This will automatically create an output directory sepcified in SETTINGS.jsonand store predictions in a file named submission.csvdata in this Github repositorytrained_models at the top level of this repository, make sure to create an empty directory with this namedata./build.sh to build a docker imagetrained_models at the top level of this Github repository./run.sh predict to run the container and directly predict using the trained models. The output will be a csv file named submission.csv in the main directory../run.sh train_and_predict to train new models and predict.config such as learning rate, epochs, etc, before building the container image.Note: ./run.sh should alway be run with an argument, and there are two possibilities ./run.sh predict or ./run.sh train_and_predict. If you encounter an error in 7. and 8., there is probably a conflicting container name, e.g., you have executed ./run.sh several times. The error might look like The container name "single_cell_container" is already in use by container container_id. In that case, delete container_id by using sudo docker rm <container_id>, and retry.
This repository implements the winning solution for the single cell perturbation problems
Python
16
26 commits
updated Dec 22, 2023
This repository implements the 1st place solution for the single cell perturbations problem open-problems-single-cell-perturbations
models.py).helper_classes.py)Make sure Anaconda3 is installed and execute the following:
Clone this repository git clone https://github.com/Jean-KOUAGOU/1st-place-solution-single-cell-pbs.git
First create and activate a conda environement conda create -n single_cell_env python==3.9.0 --y && conda activate single_cell_env
Install all required packages in the environment pip install -r requirements.txt
Create a folder called data/ in the main directory
Add the training data in parquet format, e.g., de_train.parquet as in the competition and check that its path is correct in SETTINGS.json
Also add the test data and a sample submission file (both should be csv files) in the same directory data/ and check SETTINGS.json for path correctness
Run python prepare_data.py to complete all required preprocessing steps
Make sure to locate at the top level of this Github repository
python train.py to train models. This will automatically create a directory call trained_models and store the trained models.Check that there is a non-empty directory named trained_models and that its path is specified in SETTINGS.json under MODEL_DIR
python predict.py to predict on the test data whose path is specified in SETTINGS.json. This will automatically create an output directory sepcified in SETTINGS.jsonand store predictions in a file named submission.csvdata in this Github repositorytrained_models at the top level of this repository, make sure to create an empty directory with this namedata./build.sh to build a docker imagetrained_models at the top level of this Github repository./run.sh predict to run the container and directly predict using the trained models. The output will be a csv file named submission.csv in the main directory../run.sh train_and_predict to train new models and predict.config such as learning rate, epochs, etc, before building the container image.Note: ./run.sh should alway be run with an argument, and there are two possibilities ./run.sh predict or ./run.sh train_and_predict. If you encounter an error in 7. and 8., there is probably a conflicting container name, e.g., you have executed ./run.sh several times. The error might look like The container name "single_cell_container" is already in use by container container_id. In that case, delete container_id by using sudo docker rm <container_id>, and retry.