-
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.
metrics all is added. readme updated
- Loading branch information
Showing
20 changed files
with
522 additions
and
306 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,15 @@ | ||
# bash src/metrics/all_metrics/run.sh resources/grn_models/norman/grnboost2.csv norman | ||
|
||
prediction=${1} | ||
dataset_id=${2} | ||
|
||
viash run src/metrics/all_metrics/config.novsh.yaml -- \ | ||
--prediction ${prediction} \ | ||
--dataset_id ${dataset_id} \ | ||
--score output/score.h5ad \ | ||
--tf_all resources/prior/tf_all.csv \ | ||
--regulators_consensus resources/prior/regulators_consensus_${dataset_id}.json \ | ||
--ws_consensus resources/prior/ws_consensus_${dataset_id}.csv \ | ||
--ws_distance_background resources/prior/ws_distance_background_${dataset_id}.csv \ | ||
--evaluation_data_sc resources/evaluation_datasets/${dataset_id}_sc_counts.h5ad \ | ||
--evaluation_data resources/evaluation_datasets/${dataset_id}_perturbation.h5ad |
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,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo ">> Downloading resources" | ||
|
||
viash run src/common/sync_test_resources/config.vsh.yaml -- \ | ||
--input "s3://openproblems-data/resources/grn/" \ | ||
--output "resources/" \ | ||
--delete | ||
|
||
|
||
|
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 was deleted.
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
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,42 @@ | ||
__merge__: comp_metric.yaml | ||
functionality: | ||
name: metrics_regression | ||
namespace: "metrics" | ||
info: | ||
label: metrics_regression | ||
summary: Calculates regression scores | ||
arguments: | ||
- name: --evaluation_data | ||
__merge__: file_evaluation_h5ad.yaml | ||
required: false | ||
direction: input | ||
- name: --tf_all | ||
type: file | ||
direction: input | ||
required: true | ||
example: resources_test/prior/tf_all.csv | ||
- name: --reg_type | ||
type: string | ||
direction: input | ||
default: ridge | ||
description: name of regretion to use | ||
multiple: false | ||
- name: --subsample | ||
type: integer | ||
direction: input | ||
default: -1 | ||
description: number of samples randomly drawn from perturbation data | ||
- name: --num_workers | ||
type: integer | ||
direction: input | ||
default: 4 | ||
- name: --apply_tf | ||
type: boolean | ||
required: false | ||
default: true | ||
- name: --apply_skeleton | ||
type: boolean | ||
required: false | ||
default: false | ||
|
||
|
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,26 @@ | ||
__merge__: comp_metric.yaml | ||
functionality: | ||
name: ws_distance | ||
namespace: "metrics" | ||
info: | ||
label: ws_distance | ||
summary: Calculates Wasserstein distance for a given GRN and dataset | ||
arguments: | ||
- name: --ws_consensus | ||
type: file | ||
direction: input | ||
must_exist: false | ||
required: true | ||
example: resources_test/prior/ws_consensus_norman.csv | ||
- name: --ws_distance_background | ||
type: file | ||
direction: input | ||
must_exist: false | ||
required: true | ||
example: resources_test/prior/ws_distance_background_norman.csv | ||
- name: --evaluation_data_sc | ||
type: file | ||
required: true | ||
direction: input | ||
example: 'resources_test/datasets_raw/adamson_sc_counts.h5ad' | ||
|
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,97 @@ | ||
|
||
__merge__: ../../api/comp_metric.yaml | ||
|
||
functionality: | ||
name: metrics_all | ||
info: | ||
label: metrics_all | ||
summary: Calculates all metrics for a given GRN and dataset | ||
arguments: | ||
- name: --evaluation_data | ||
type: file | ||
required: true | ||
direction: input | ||
- name: --tf_all | ||
type: file | ||
direction: input | ||
required: true | ||
example: resources_test/prior/tf_all.csv | ||
- name: --reg_type | ||
type: string | ||
direction: input | ||
default: ridge | ||
description: name of regretion to use | ||
multiple: false | ||
- name: --subsample | ||
type: integer | ||
direction: input | ||
default: -1 | ||
description: number of samples randomly drawn from perturbation data | ||
- name: --num_workers | ||
type: integer | ||
direction: input | ||
default: 4 | ||
- name: --apply_tf | ||
type: boolean | ||
required: false | ||
default: true | ||
- name: --apply_skeleton | ||
type: boolean | ||
required: false | ||
default: false | ||
- name: --regulators_consensus | ||
type: file | ||
direction: input | ||
must_exist: false | ||
required: true | ||
example: resources_test/prior/regulators_consensus_norman.json | ||
- name: --static_only | ||
direction: input | ||
type: boolean | ||
default: true | ||
- name: --binarize | ||
type: boolean | ||
direction: input | ||
description: whether to binarize the weight | ||
default: true | ||
- name: --ws_consensus | ||
type: file | ||
direction: input | ||
must_exist: false | ||
required: true | ||
example: resources_test/prior/ws_consensus_norman.csv | ||
- name: --ws_distance_background | ||
type: file | ||
direction: input | ||
must_exist: false | ||
required: true | ||
example: resources_test/prior/ws_distance_background_norman.csv | ||
- name: --evaluation_data_sc | ||
type: file | ||
required: true | ||
direction: input | ||
example: 'resources_test/datasets_raw/adamson_sc_counts.h5ad' | ||
|
||
|
||
resources: | ||
- type: python_script | ||
path: script.py | ||
- path: /src/utils/util.py | ||
dest: util.py | ||
- path: /src/metrics/regression_1/main.py | ||
dest: reg1_main.py | ||
- path: /src/metrics/regression_2/main.py | ||
dest: reg2_main.py | ||
- path: /src/metrics/wasserstein/main.py | ||
dest: ws_main.py | ||
|
||
|
||
platforms: | ||
- type: docker | ||
image: ghcr.io/openproblems-bio/base_python:1.0.4 | ||
setup: | ||
- type: python | ||
packages: [ lightgbm==4.3.0, numpy==1.26.4 ] | ||
- type: nextflow | ||
directives: | ||
label: [ midtime, midmem, midcpu ] |
Oops, something went wrong.