Skip to content

Commit e8119ce

Browse files
rcannoodlazappi
andauthored
Add results filtering (#935)
* introduce new component * implement component * format code * Update src/reporting/process_task_results/main.nf * Apply suggestions from code review Co-authored-by: Luke Zappia <[email protected]> * add back previously removed arguments --------- Co-authored-by: Luke Zappia <[email protected]>
1 parent 6ba4f49 commit e8119ce

File tree

4 files changed

+557
-0
lines changed

4 files changed

+557
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: filter_results
2+
namespace: reporting
3+
description: Filter dataset, method, metric info and results based on include/exclude criteria
4+
5+
argument_groups:
6+
- name: Inputs
7+
arguments:
8+
- name: --input_dataset_info
9+
type: file
10+
description: JSON file containing dataset information
11+
required: true
12+
example: resources_test/openproblems/task_results_v4/processed/dataset_info.json
13+
14+
- name: --input_method_info
15+
type: file
16+
description: JSON file containing method information
17+
required: true
18+
example: resources_test/openproblems/task_results_v4/processed/method_info.json
19+
20+
- name: --input_metric_info
21+
type: file
22+
description: JSON file containing metric information
23+
required: true
24+
example: resources_test/openproblems/task_results_v4/processed/metric_info.json
25+
26+
- name: --input_results
27+
type: file
28+
description: JSON file containing results
29+
required: true
30+
example: resources_test/openproblems/task_results_v4/processed/results.json
31+
32+
- name: Dataset filtering
33+
description: |
34+
Use these arguments to filter datasets by name. By default, all datasets are
35+
included. If `--datasets_include` is defined, only those datasets are included. If
36+
`--datasets_exclude` is defined, all datasets except those specified are included.
37+
These arguments are mutually exclusive, so only `--datasets_include` OR
38+
`--datasets_exclude` can be set but not both.
39+
arguments:
40+
- name: "--datasets_include"
41+
type: string
42+
multiple: true
43+
description: |
44+
A list of dataset ids to include. If specified, only these datasets will be included.
45+
- name: "--datasets_exclude"
46+
type: string
47+
multiple: true
48+
description: |
49+
A list of dataset ids to exclude. If specified, all datasets except the ones listed will be included.
50+
51+
- name: Method filtering
52+
description: |
53+
Use these arguments to filter methods by name. By default, all methods are
54+
included. If `--methods_include` is defined, only those methods are included. If
55+
`--methods_exclude` is defined, all methods except those specified are included.
56+
These arguments are mutually exclusive, so only `--methods_include` OR
57+
`--methods_exclude` can be set but not both.
58+
arguments:
59+
- name: "--methods_include"
60+
type: string
61+
multiple: true
62+
description: |
63+
A list of method ids to include. If specified, only these methods will be included.
64+
- name: "--methods_exclude"
65+
type: string
66+
multiple: true
67+
description: |
68+
A list of method ids to exclude. If specified, all methods except the ones listed will be included.
69+
70+
- name: Metric filtering
71+
description: |
72+
Use these arguments to filter metrics by name. By default, all metrics are
73+
included. If `--metrics_include` is defined, only those metrics are included. If
74+
`--metrics_exclude` is defined, all metrics except those specified are included.
75+
These arguments are mutually exclusive, so only `--metrics_include` OR
76+
`--metrics_exclude` can be set but not both.
77+
arguments:
78+
- name: "--metrics_include"
79+
type: string
80+
multiple: true
81+
description: |
82+
A list of metric ids to include. If specified, only these metrics will be included.
83+
- name: "--metrics_exclude"
84+
type: string
85+
multiple: true
86+
description: |
87+
A list of metric ids to exclude. If specified, all metrics except the ones listed will be included.
88+
89+
- name: Outputs
90+
arguments:
91+
- name: --output_dataset_info
92+
type: file
93+
direction: output
94+
default: filtered_dataset_info.json
95+
description: Filtered dataset info JSON file
96+
info:
97+
format:
98+
type: json
99+
schema: /common/schemas/results_v4/dataset_info.json
100+
example: resources_test/openproblems/task_results_v4/processed/filtered_dataset_info.json
101+
102+
- name: --output_method_info
103+
type: file
104+
direction: output
105+
default: filtered_method_info.json
106+
description: Filtered method info JSON file
107+
info:
108+
format:
109+
type: json
110+
schema: /common/schemas/results_v4/method_info.json
111+
example: resources_test/openproblems/task_results_v4/processed/filtered_method_info.json
112+
113+
- name: --output_metric_info
114+
type: file
115+
direction: output
116+
default: filtered_metric_info.json
117+
description: Filtered metric info JSON file
118+
info:
119+
format:
120+
type: json
121+
schema: /common/schemas/results_v4/metric_info.json
122+
example: resources_test/openproblems/task_results_v4/processed/filtered_metric_info.json
123+
124+
- name: --output_results
125+
type: file
126+
direction: output
127+
default: filtered_results.json
128+
description: Filtered results JSON file
129+
info:
130+
format:
131+
type: json
132+
schema: /common/schemas/results_v4/results.json
133+
example: resources_test/openproblems/task_results_v4/processed/filtered_results.json
134+
135+
resources:
136+
- type: python_script
137+
path: script.py
138+
- path: /common/schemas
139+
dest: schemas
140+
141+
test_resources:
142+
- type: python_script
143+
path: /common/component_tests/run_and_check_output.py
144+
- path: /resources_test/openproblems/task_results_v4
145+
dest: resources_test/openproblems/task_results_v4
146+
147+
engines:
148+
- type: docker
149+
image: openproblems/base_python:1
150+
setup:
151+
- type: apt
152+
packages:
153+
- nodejs
154+
- npm
155+
- type: docker
156+
run: npm install -g ajv-cli
157+
158+
runners:
159+
- type: executable
160+
- type: nextflow
161+
directives:
162+
label: [lowmem, lowtime, lowcpu]

0 commit comments

Comments
 (0)