Skip to content

Commit

Permalink
fix scripts (#63)
Browse files Browse the repository at this point in the history
* fix scripts

* fix script

* don't run with the original kaggle dataset by default

* update

* override output filenames
  • Loading branch information
rcannood authored Jun 4, 2024
1 parent a161cfd commit 9313317
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
28 changes: 18 additions & 10 deletions scripts/run_benchmark_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@

export NXF_VER=23.04.2

cat > /tmp/params.yaml << EOF
id: neurips-2023-data
de_train_h5ad: resources/neurips-2023-data/de_train.h5ad
de_test_h5ad: resources/neurips-2023-data/de_test.h5ad
id_map: resources/neurips-2023-data/id_map.csv
method_ids: ['ground_truth', 'sample', 'mean_across_celltypes', 'mean_across_compounds']
layer: t # test a different layer
publish_dir: "output/test_run_benchmark"
output_state: state.yaml
EOF
resources_dir="resources"
publish_dir="output/test_run_benchmark"

cat > /tmp/params.yaml << HERE
param_list:
- id: neurips-2023-data
de_train_h5ad: "$resources_dir/neurips-2023-data/de_train.h5ad"
de_test_h5ad: "$resources_dir/neurips-2023-data/de_test.h5ad"
id_map: "$resources_dir/neurips-2023-data/id_map.csv"
layer: clipped_sign_log10_pval
- id: neurips-2023-kaggle
de_train_h5ad: "$resources_dir/neurips-2023-kaggle/de_train.h5ad"
de_test_h5ad: "$resources_dir/neurips-2023-kaggle/de_test.h5ad"
id_map: "$resources_dir/neurips-2023-kaggle/id_map.csv"
layer: sign_log10_pval
output_state: "state.yaml"
publish_dir: "$publish_dir"
HERE

nextflow run . \
-main-script target/nextflow/workflows/run_benchmark/main.nf \
Expand Down
20 changes: 10 additions & 10 deletions scripts/run_benchmark_tw.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#!/bin/bash

RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)"
resources_dir="s3://openproblems-bio/public/neurips-2023-competition/workflow-resources"
publish_dir="s3://openproblems-data/resources/dge_perturbation_prediction/results/${RUN_ID}"

cat > /tmp/params.yaml << HERE
param_list:
- id: neurips-2023-data
de_train_h5ad: resources/neurips-2023-data/de_train.h5ad
de_test_h5ad: resources/neurips-2023-data/de_test.h5ad
id_map: resources/neurips-2023-data/id_map.csv
de_train_h5ad: "$resources_dir/neurips-2023-data/de_train.h5ad"
de_test_h5ad: "$resources_dir/neurips-2023-data/de_test.h5ad"
id_map: "$resources_dir/neurips-2023-data/id_map.csv"
layer: clipped_sign_log10_pval
- id: neurips-2023-kaggle
de_train_h5ad: resources/neurips-2023-kaggle/de_train.h5ad
de_test_h5ad: resources/neurips-2023-kaggle/de_test.h5ad
id_map: resources/neurips-2023-kaggle/id_map.csv
layer: sign_log10_pval
# - id: neurips-2023-kaggle
# de_train_h5ad: "$resources_dir/neurips-2023-kaggle/de_train.h5ad"
# de_test_h5ad: "$resources_dir/neurips-2023-kaggle/de_test.h5ad"
# id_map: "$resources_dir/neurips-2023-kaggle/id_map.csv"
# layer: sign_log10_pval
output_state: "state.yaml"
publish_dir: "$publish_dir"
HERE

tw launch https://github.com/openproblems-bio/task-dge-perturbation-prediction.git \
--revision remove_clipped_build \
--revision main_build \
--pull-latest \
--main-script target/nextflow/workflows/run_benchmark/main.nf \
--workspace 53907369739130 \
--compute-env 6TeIFgV5OY4pJCk8I0bfOh \
--params-file /tmp/params.yaml \
--entry-name auto \
--config src/common/nextflow_helpers/labels_tw.config
4 changes: 3 additions & 1 deletion scripts/run_stability_tw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ publish_dir="s3://openproblems-data/resources/dge_perturbation_prediction/result
cat > /tmp/params.yaml << HERE
id: neurips-2023-data
sc_counts: s3://openproblems-bio/public/neurips-2023-competition/sc_counts_reannotated_with_counts.h5ad
scores: stability_uns.yaml
output_state: "state.yaml"
publish_dir: "$publish_dir"
HERE

tw launch https://github.com/openproblems-bio/task-dge-perturbation-prediction.git \
--revision remove_clipped_build \
--revision main_build \
--pull-latest \
--main-script target/nextflow/workflows/run_stability_analysis/main.nf \
--workspace 53907369739130 \
Expand Down
7 changes: 7 additions & 0 deletions scripts/sync_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ aws s3 sync \
output/benchmark_results/ \
--delete --dryrun

# sync back modified results
aws s3 sync \
output/benchmark_results/ \
s3://openproblems-data/resources/dge_perturbation_prediction/results/ \
--delete --dryrun

# sync one run
runid=run_2024-06-01_00-03-09; aws s3 sync \
output/benchmark_results/${runid}/ \
s3://openproblems-data/resources/dge_perturbation_prediction/results/${runid}/ \
--delete --dryrun
2 changes: 1 addition & 1 deletion src/task/workflows/run_stability_analysis/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ functionality:
required: true
direction: output
description: A yaml file containing the scores of each of the methods
default: score_uns.yaml
default: stability_uns.yaml
- name: Arguments
arguments:
- name: "--method_ids"
Expand Down

0 comments on commit 9313317

Please sign in to comment.