Skip to content

Revision #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,5 @@ slurm*

# smiles files
*.smi

bace
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://github.com/PaccMann/toxsmi/actions/workflows/build.yml/badge.svg)](https://github.com/PaccMann/toxsmi/actions/workflows/build.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# toxsmi

Expand Down
39 changes: 0 additions & 39 deletions data/cytotoxicity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,3 @@ Similar to what exists in the `data` folder, this subfolder should contain:
Moreover,

- `10_fold_stratified_cross_validation/`: A subfolder which contains the train / test split using 10-fold stratified cross-validation, of the form `cytotox_train0-10.csv` and `cytotox_test0-10.csv`.

### 10-fold CV
In order to run the 10-fold stratified cross-validation on the cluster of the Freie Universität Berlin, use the bash script below called `cytotox_10_fold_cross_validation.sh` (by adapting your email):

```bash
#!/bin/bash
#SBATCH --job-name=cytotox_model_10_fold
#SBATCH --mail-user=XXX
#SBATCH --mail-type=end
#SBATCH --partition=gpu
#SBATCH --gres=gpu:1
#SBATCH --mem=4G
#SBATCH --time=8:00:00
#SBATCH --qos=standard

declare -a combinations
index=0

K=10 # K-fold cross-validation

for fold in {0..9}
do
combinations[$index]="$fold"
index=$((index + 1))
done

parameters=(${combinations[${SLURM_ARRAY_TASK_ID}]})
fold=${parameters[0]}

python3 scripts/train_tox.py data/cytotoxicity/10_fold_stratified_cross_validation/cytotox_train${fold}-$K.csv \
data/cytotoxicity/10_fold_stratified_cross_validation/cytotox_test${fold}-$K.csv data/cytotoxicity/cytotox.smi data/smiles_language_tox21.pkl \
models${fold}-$K params/mca.json test --embedding_path data/smiles_vae_embeddings.pkl
```

And execute the bash script by running the following:

```console
sbatch --array=0-9 cytotox_10_fold_cross_validation.sh
```
Loading