-
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.
- Loading branch information
Showing
15 changed files
with
251 additions
and
127 deletions.
There are no files selected for viewing
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,55 +1,85 @@ | ||
#!/bin/bash | ||
# viash ns build --parallel | ||
RUN_ID="robust_analy_causal" | ||
# resources_dir="resources" | ||
resources_dir="s3://openproblems-data/resources/grn" | ||
|
||
RUN_ID="robust_analy_causal_1" | ||
resources_dir="resources" | ||
# resources_dir="s3://openproblems-data/resources/grn" | ||
publish_dir="${resources_dir}/results/${RUN_ID}" | ||
|
||
|
||
|
||
reg_type=ridge | ||
subsample=-2 | ||
max_workers=10 | ||
|
||
params_list_file="params/list_${RUN_ID}.yaml" | ||
layer=(scgen_pearson) | ||
metric_ids="[regression_1]" | ||
|
||
param_file="./params/${RUN_ID}.yaml" | ||
cat >> $param_file << HERE | ||
param_list: | ||
HERE | ||
|
||
# add causal corr | ||
cat >> $param_file << HERE | ||
- id: corr-causal | ||
metric_ids: ${metric_ids} | ||
multiomics_rna: ${resources_dir}/grn-benchmark/multiomics_rna.h5ad | ||
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad | ||
reg_type: $reg_type | ||
method_id: baseline_corr_causal | ||
layer: ${layer} | ||
subsample: $subsample | ||
max_workers: $max_workers | ||
consensus: ${resources_dir}/prior/consensus-num-regulators.json | ||
tf_all: ${resources_dir}/prior/tf_all.csv | ||
causal: True | ||
HERE | ||
|
||
append_entry() { | ||
cat >> $params_list_file << HERE | ||
cat >> $param_file << HERE | ||
- id: corr-${1} | ||
metric_ids: ${metric_ids} | ||
multiomics_rna: ${resources_dir}/grn-benchmark/multiomics_rna.h5ad | ||
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad | ||
reg_type: $reg_type | ||
method_id: corr-${1} | ||
layer: ${2} | ||
method_id: baseline_corr-${1} | ||
layer: ${layer} | ||
subsample: $subsample | ||
max_workers: $max_workers | ||
consensus: ${resources_dir}/prior/consensus-num-regulators.json | ||
tf_all: ${resources_dir}/prior/tf_all.csv | ||
causal: False | ||
HERE | ||
} | ||
# Loop through grn_names and layers | ||
layers=("pearson") # Array containing the layer(s) | ||
|
||
for layer in "${layers[@]}"; do # Iterate over each layer in the array | ||
for iter in {1..10}; do # Loop from 1 to 100 iterations | ||
append_entry "$iter" "$layer" # Execute the append_entry command | ||
done | ||
|
||
for iter in {1..2}; do # Loop from 1 to 100 iterations | ||
append_entry "$iter" # Execute the append_entry command | ||
done | ||
|
||
aws s3 sync params/ s3://openproblems-data/resources/grn/params | ||
# Append the remaining output_state and publish_dir to the YAML file | ||
cat >> $param_file << HERE | ||
param_list: "${resources_dir}/${params_list_file}" | ||
output_state: "state.yaml" | ||
publish_dir: "$publish_dir" | ||
HERE | ||
|
||
# nextflow run . \ | ||
# -main-script target/nextflow/workflows/run_robustness_analysis_causal/main.nf \ | ||
# -profile docker \ | ||
# -with-trace \ | ||
# -c src/common/nextflow_helpers/labels_ci.config \ | ||
# -params-file ${param_file} | ||
# params_list_file="params/list_${RUN_ID}.yaml" | ||
|
||
# param_file="./params/${RUN_ID}.yaml" | ||
|
||
|
||
# # Loop through grn_names and layers | ||
# layers=("pearson") # Array containing the layer(s) | ||
|
||
|
||
|
||
# aws s3 sync params/ s3://openproblems-data/resources/grn/params | ||
# # Append the remaining output_state and publish_dir to the YAML file | ||
# cat >> $param_file << HERE | ||
# param_list: "${resources_dir}/${params_list_file}" | ||
# output_state: "state.yaml" | ||
# publish_dir: "$publish_dir" | ||
# HERE | ||
|
||
nextflow run . \ | ||
-main-script target/nextflow/workflows/run_robustness_analysis_causal/main.nf \ | ||
-profile docker \ | ||
-with-trace \ | ||
-c src/common/nextflow_helpers/labels_ci.config \ | ||
-params-file ${param_file} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
__merge__: ../../api/comp_control_method.yaml | ||
|
||
functionality: | ||
name: baseline_corr | ||
info: | ||
label: baseline_corr | ||
summary: "Baseline based on Pearson corr" | ||
|
||
arguments: | ||
- name: --causal | ||
type: boolean | ||
direction: input | ||
default: false | ||
- name: --seed | ||
type: integer | ||
direction: input | ||
|
||
|
||
resources: | ||
- type: python_script | ||
path: script.py | ||
|
||
platforms: | ||
- type: docker | ||
image: ghcr.io/openproblems-bio/base_python:1.0.4 | ||
setup: | ||
- type: python | ||
packages: [ ] | ||
- type: native | ||
- type: nextflow | ||
directives: | ||
label: [midtime, midmem, midcpu] |
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
Oops, something went wrong.