-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow reduced to no on the fly models
- Loading branch information
Showing
11 changed files
with
533 additions
and
410 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
#!/bin/bash | ||
|
||
# RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" | ||
# reg_type=${1} #GB, ridge | ||
viash ns build --parallel | ||
reg_type=ridge | ||
|
||
RUN_ID="grn_evaluation_all_${reg_type}" | ||
resources_dir="s3://openproblems-data/resources/grn" | ||
# resources_dir="./resources" | ||
publish_dir="${resources_dir}/results/${RUN_ID}" | ||
grn_models_folder="${resources_dir}/grn_models" | ||
|
||
subsample=-2 | ||
max_workers=10 | ||
layer=scgen_pearson | ||
metric_ids="[regression_1, regression_2]" | ||
|
||
param_file="./params/${RUN_ID}.yaml" | ||
|
||
grn_names=( | ||
"scglue" | ||
"scenicplus" | ||
"celloracle" | ||
"granie" | ||
"figr" | ||
"collectri" | ||
"genie3" | ||
"grnboost2" | ||
"ppcor" | ||
"portia" | ||
) | ||
# Start writing to the YAML file | ||
cat > $param_file << HERE | ||
param_list: | ||
HERE | ||
|
||
append_entry() { | ||
cat >> $param_file << HERE | ||
- id: ${reg_type}_${1} | ||
metric_ids: ${metric_ids} | ||
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad | ||
multiomics_rna: ${resources_dir}/grn-benchmark/multiomics_rna.h5ad | ||
reg_type: $reg_type | ||
method_id: $1 | ||
subsample: $subsample | ||
max_workers: $max_workers | ||
tf_all: ${resources_dir}/prior/tf_all.csv | ||
layer: ${layer} | ||
consensus: ${resources_dir}/prior/consensus-num-regulators.json | ||
prediction: ${grn_models_folder}/$1.csv | ||
HERE | ||
} | ||
|
||
append_entry_control() { | ||
cat >> $param_file << HERE | ||
- id: ${reg_type}_${1} | ||
metric_ids: ${metric_ids} | ||
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad | ||
multiomics_rna: ${resources_dir}/grn-benchmark/multiomics_rna.h5ad | ||
reg_type: $reg_type | ||
method_id: $1 | ||
subsample: $subsample | ||
max_workers: $max_workers | ||
tf_all: ${resources_dir}/prior/tf_all.csv | ||
layer: ${layer} | ||
consensus: ${resources_dir}/prior/consensus-num-regulators.json | ||
causal: ${2} | ||
corr_method: ${3} | ||
prediction: ${resources_dir}/grn_models/collectri.csv | ||
cell_type_specific: ${4} | ||
metacell: ${5} | ||
impute: ${6} | ||
HERE | ||
|
||
} | ||
|
||
Loop through grn_names and layers | ||
for grn_name in "${grn_names[@]}"; do | ||
append_entry "$grn_name" | ||
done | ||
|
||
## controls | ||
append_entry_control "negative_control" "" "" "false" "false" "false" | ||
append_entry_control "positive_control" "" "" "false" "false" "false" | ||
append_entry_control "baseline_pearson" "false" "pearson" "false" "false" "false" | ||
append_entry_control "baseline_dotproduct" "false" "dotproduct" "false" "false" "false" | ||
append_entry_control "baseline_dotproduct_causal" "true" "dotproduct" "false" "false" "false" | ||
append_entry_control "baseline_dotproduct_causal_cell_type" "true" "dotproduct" "true" "false" "false" | ||
append_entry_control "baseline_dotproduct_causal_metacell" "true" "dotproduct" "false" "true" "false" | ||
append_entry_control "baseline_dotproduct_causal_impute" "true" "dotproduct" "false" "false" "true" | ||
append_entry_control "baseline_corr_causal_spearman" "true" "spearman" | ||
|
||
|
||
# Append the remaining output_state and publish_dir to the YAML file | ||
cat >> $param_file << HERE | ||
output_state: "state.yaml" | ||
publish_dir: "$publish_dir" | ||
HERE | ||
|
||
# nextflow run . \ | ||
# -main-script target/nextflow/workflows/run_grn_evaluation/main.nf \ | ||
# -profile docker \ | ||
# -with-trace \ | ||
# -c src/common/nextflow_helpers/labels_ci.config \ | ||
# -params-file ${param_file} | ||
# subl resources/results/grn_evaluation_all_ridge/scores.yaml | ||
|
||
# ./tw-windows-x86_64.exe launch ` | ||
# https://github.com/openproblems-bio/task_grn_inference.git ` | ||
# --revision build/main ` | ||
# --pull-latest ` | ||
# --main-script target/nextflow/workflows/run_grn_evaluation/main.nf ` | ||
# --workspace 53907369739130 ` | ||
# --compute-env 6TeIFgV5OY4pJCk8I0bfOh ` | ||
# --params-file ./params/grn_evaluation_so_ridge.yaml ` | ||
# --config src/common/nextflow_helpers/labels_tw.config | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
echo "baseline pearson" | ||
viash run src/control_methods/baseline_corr/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--causal false \ | ||
--corr_method pearson \ | ||
--cell_type_specific false \ | ||
--metacell false \ | ||
--impute false \ | ||
--prediction resources/grn_models/baselines/baseline_pearson.csv | ||
|
||
echo "baseline dotproduct" | ||
viash run src/control_methods/baseline_corr/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--causal false \ | ||
--corr_method dotproduct \ | ||
--cell_type_specific false \ | ||
--metacell false \ | ||
--impute false \ | ||
--prediction resources/grn_models/baselines/baseline_dotproduct.csv | ||
|
||
echo "baseline dotproduct causal" | ||
viash run src/control_methods/baseline_corr/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--causal true \ | ||
--corr_method dotproduct \ | ||
--cell_type_specific false \ | ||
--metacell false \ | ||
--impute false \ | ||
--prediction resources/grn_models/baselines/baseline_dotproduct_causal.csv | ||
|
||
echo "baseline causal cell type" | ||
viash run src/control_methods/baseline_corr/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--causal true \ | ||
--corr_method dotproduct \ | ||
--cell_type_specific true \ | ||
--metacell false \ | ||
--impute false \ | ||
--prediction resources/grn_models/baselines/baseline_dotproduct_causal_celltype.csv | ||
|
||
echo "baseline dotproduct causal metacell" | ||
viash run src/control_methods/baseline_corr/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--causal true \ | ||
--corr_method dotproduct \ | ||
--cell_type_specific false \ | ||
--metacell true \ | ||
--impute false \ | ||
--prediction resources/grn_models/baselines/baseline_dotproduct_causal_metacell.csv | ||
|
||
echo "positive control" | ||
viash run src/control_methods/positive_control/config.vsh.yaml -- --multiomics_rna resources/grn-benchmark/multiomics_rna.h5ad \ | ||
--perturbation_data resources/grn-benchmark/perturbation_data.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--prediction resources/grn_models/baselines/positive_control.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
viash run src/exp_analysis/config.vsh.yaml -- \ | ||
--perturbation_data resources/grn-benchmark/perturbation_data.h5ad \ | ||
--prediction output/baseline_corr.csv \ | ||
--prediction resources/grn_models/genie3.csv \ | ||
|
Oops, something went wrong.