Skip to content

Commit

Permalink
workflow updated: single grn benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
janursa committed Sep 10, 2024
1 parent e1e727a commit e1086a0
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 21 deletions.
1 change: 1 addition & 0 deletions scripts/run_grn_evaluation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ append_entry() {
- 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
Expand Down
5 changes: 0 additions & 5 deletions src/api/comp_control_method.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ functionality:
required: false
direction: input
default: resources/grn-benchmark/perturbation_data.h5ad
- name: --multiomics_rna
__merge__: file_multiomics_rna_h5ad.yaml
required: false
direction: input
default: resources/grn-benchmark/multiomics_rna.h5ad
- name: --layer
type: string
direction: input
Expand Down
3 changes: 3 additions & 0 deletions src/control_methods/baseline_corr/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ functionality:
summary: "Baseline based on Pearson corr"

arguments:
- name: --multiomics_rna
required: false
direction: input
- name: --causal
type: boolean
direction: input
Expand Down
2 changes: 1 addition & 1 deletion src/methods/single_omics/ennet/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ platforms:
- type: native
- type: nextflow
directives:
label: [threedaystime,midmem,midcpu]
label: [onedaytime,midmem,midcpu]
2 changes: 1 addition & 1 deletion src/methods/single_omics/pidc/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ platforms:
- type: native
- type: nextflow
directives:
label: [threedaystime, midmem,midcpu]
label: [onedaytime, midmem,midcpu]
2 changes: 1 addition & 1 deletion src/methods/single_omics/scsgl/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ platforms:
- type: native
- type: nextflow
directives:
label: [threedaystime, midmem,midcpu]
label: [onedaytime, midmem,midcpu]
2 changes: 1 addition & 1 deletion src/methods/single_omics/tigress/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ platforms:
- type: native
- type: nextflow
directives:
label: [threedaystime, midmem, highcpu]
label: [onedaytime, midmem, highcpu]
10 changes: 10 additions & 0 deletions src/workflows/run_benchmark_single_omics/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ functionality:
# required: true
# direction: output
# default: metric_configs.yaml
- name: Arguments
arguments:
- name: "--method_ids"
type: string
multiple: true
description: A list of method ids to run. If not specified, all methods will be run.
- name: "--metric_ids"
type: string
multiple: true
description: A list of metric ids to run. If not specified, all metric will be run.

resources:
- type: nextflow_script
Expand Down
25 changes: 16 additions & 9 deletions src/workflows/run_benchmark_single_omics/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ workflow run_wf {

// construct list of methods
methods = [
// portia,
// ennet,
// genie3,
// grnboost2,
// pidc,
// ppcor,
// scsgl,
// tigress
portia
ennet
genie3
grnboost2
pidc
ppcor
scsgl
tigress
scgpt
]


// construct list of metrics
metrics = [
regression_1
regression_1,
regression_2,
]

/****************************
Expand Down Expand Up @@ -57,6 +58,9 @@ workflow run_wf {
// run all methods
| runEach(
components: methods,
filter: { id, state, comp ->
!state.method_ids || state.method_ids.contains(comp.config.functionality.name)
},

// use the 'filter' argument to only run a defined method or all methods
// filter: { id, state, comp ->
Expand Down Expand Up @@ -91,6 +95,9 @@ workflow run_wf {
// run all metrics
| runEach(
components: metrics,
filter: { id, state, comp ->
!state.metric_ids || state.metric_ids.contains(comp.config.functionality.name)
},
id: { id, state, comp ->
id + "." + comp.config.functionality.name
},
Expand Down
6 changes: 3 additions & 3 deletions src/workflows/run_grn_evaluation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ workflow run_wf {
// run all metrics
| runEach(
components: metrics,
id: { id, state, comp ->
id + "." + comp.config.functionality.name
},
filter: { id, state, comp ->
!state.metric_ids || state.metric_ids.contains(comp.config.functionality.name)
},
id: { id, state, comp ->
id + "." + comp.config.functionality.name
},
// use 'fromState' to fetch the arguments the component requires from the overall state
fromState: [
perturbation_data: "perturbation_data",
Expand Down

0 comments on commit e1086a0

Please sign in to comment.