Skip to content

Commit

Permalink
consensus added to evluation
Browse files Browse the repository at this point in the history
  • Loading branch information
janursa committed Aug 14, 2024
1 parent f794370 commit 1f232ff
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 109 deletions.
186 changes: 112 additions & 74 deletions params/subsample_200_ridge.yaml

Large diffs are not rendered by default.

File renamed without changes.
48 changes: 16 additions & 32 deletions scripts/run_grn_evaluation_tw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,51 +29,35 @@ cat > $param_file << HERE
param_list:
HERE

# Nested loops to iterate over grn_names and layers
for grn_name in "${grn_names[@]}"; do
for layer in "${layers[@]}"; do
cat >> $param_file << HERE
- id: ${layer}_${grn_name}
append_entry() {
cat >> $param_file << HERE
- id: ${layer}_${1}
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad
layer: ${layer}
prediction: ${resources_dir}/grn_models/${grn_name}.csv
reg_type: $reg_type
method_id: $grn_name
method_id: $1
subsample: $subsample
max_workers: $max_workers
consensus: ${resources_dir}/prior/consensus.json
${2:+tf_all: ${resources_dir}/prior/tf_all.csv}
${3:+prediction: ${resources_dir}/grn_models/$1.csv}
HERE
}
# Loop through grn_names and layers
for grn_name in "${grn_names[@]}"; do
for layer in "${layers[@]}"; do
append_entry "$grn_name" "" "true"
done
done


# append negative control
# Append negative control
grn_name="negative_control"
cat >> $param_file << HERE
- id: ${layer}_${grn_name}
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad
layer: ${layer}
reg_type: $reg_type
method_id: $grn_name
subsample: $subsample
max_workers: $max_workers
HERE
append_entry "$grn_name"

# append the positive controls
# Append positive controls
grn_name="positive_control"
for layer in "${layers[@]}"; do
cat >> $param_file << HERE
- id: ${layer}_${grn_name}
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad
tf_all: ${resources_dir}/prior/tf_all.csv
layer: ${layer}
reg_type: $reg_type
method_id: $grn_name
subsample: $subsample
max_workers: $max_workers
HERE
append_entry "$grn_name" "true"
done

# Append the remaining output_state and publish_dir to the YAML file
Expand Down
5 changes: 4 additions & 1 deletion src/methods/multi_omics/celloracle/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def preprocess_rna(par) -> None:
log=False)

# Subset the genes
adata = adata[:, filter_result.gene_subset]
if False: #only hvgs
adata = adata[:, filter_result.gene_subset]
else:
pass

# Renormalize after filtering
sc.pp.normalize_per_cell(adata)
Expand Down
1 change: 1 addition & 0 deletions src/methods/multi_omics/scglue_ns/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ param_list:
output_state: "state.yaml"
publish_dir: "$publish_dir"
HERE

2 changes: 1 addition & 1 deletion src/metrics/regression_2/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ functionality:
type: file
direction: input
must_exist: true
default: 'resources/grn-benchmark/consensus-num-regulators.json'
default: 'resources/prior/consensus-num-regulators.json'
platforms:
- type: docker
image: ghcr.io/openproblems-bio/base_python:1.0.4
Expand Down
5 changes: 5 additions & 0 deletions src/workflows/run_grn_evaluation/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ functionality:
required: false
direction: input
default: resources/prior/tf_all.csv
- name: --consensus
type: file
required: false
direction: input
default: resources/prior/consensus.json

- name: Outputs
arguments:
Expand Down
3 changes: 2 additions & 1 deletion src/workflows/run_grn_evaluation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ workflow run_wf {
subsample: "subsample",
reg_type: "reg_type",
method_id: "method_id",
max_workers: "max_workers"
max_workers: "max_workers",
consensus: "consensus"
],
// use 'toState' to publish that component's outputs to the overall state
toState: { id, output, state, comp ->
Expand Down

0 comments on commit 1f232ff

Please sign in to comment.