-
Notifications
You must be signed in to change notification settings - Fork 1
/
reformat_repurposing_data.conseq
68 lines (60 loc) · 3.64 KB
/
reformat_repurposing_data.conseq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
rule reformat_dose_level_repurposing_secondary:
inputs: script=fileref("scripts/compounds/repurposing/reformat_dose_level_repurposing_secondary.py"),
filter_script=fileref("scripts/compounds/repurposing/filter_repurposing_data.py"),
hdf5_utils=fileref('scripts/hdf5_utils.py', copy_to='hdf5_utils.py'),
data={'type': 'repurposing-dose'},
taiga_token={"type": "config-file", "name": "taiga-token"}
outputs: {
'type': 'dep-matrix',
"label": "Repurposing_secondary_dose", # matches with the enum
"orig_dataset_id": "{{inputs.data.dataset_id}}",
'filename': {'$filename': 'out.hdf5'}
}, {
'type': "dropped-repurposing-secondary-doses",
'filename': {'$filename': 'dropped.json'}
}
run "cp {{ inputs.taiga_token.filename }} ./.taiga-token"
run "python3 {{ inputs.filter_script.filename }} {{ inputs.data.dataset_id }} {{ inputs.data.treatment_info_dataset_id }} {{ inputs.data.cell_line_info_dataset_id }} --screens HTS002"
run "python3 {{inputs.script.filename}} filtered_data.csv filtered_treatment_info.csv"
rule reformat_dose_replicate_level_repurposing_secondary:
executor: dsub {"min_ram": "10"}
inputs: script=fileref("scripts/compounds/repurposing/reformat_dose_replicate_level_repurposing_secondary.py"),
filter_script=fileref("scripts/compounds/repurposing/filter_repurposing_data.py"),
data={'type': 'repurposing-dose-replicate'},
taiga_token={"type": "config-file", "name": "taiga-token"}
outputs: {
"type": 'dose-replicate-level',
"label": "{{ inputs.data.label }}",
"orig_dataset_id": "{{ inputs.data.dataset_id }}",
"filename": {"$filename": "reformatted_dose_replicate_level_secondary_screen_repurposing_data.csv"} }
run "cp {{ inputs.taiga_token.filename }} ./.taiga-token"
run "python3 {{ inputs.filter_script.filename }} {{ inputs.data.dataset_id }} {{ inputs.data.treatment_info_dataset_id }} {{ inputs.data.cell_line_info_dataset_id }} --screens HTS002"
run "python3 {{inputs.script.filename}} filtered_data.csv filtered_treatment_info.csv"
rule reformat_curve_params_secondary_repurposing_data:
executor: dsub {"min_ram": "20"}
inputs: script=filename("scripts/compounds/repurposing/reformat_dose_response_curve_params_repurposing_secondary.py"),
hdf5_utils=fileref('scripts/hdf5_utils.py', copy_to='hdf5_utils.py'),
data={'type': 'repurposing-curves'},
taiga_token={"type": "config-file", "name": "taiga-token"}
outputs: {
"type": 'dose-response-curve-params',
"orig_dataset_id": "{{ inputs.data.dataset_id }}",
"filename": {"$filename": "curves.csv"} },
{"type": 'dep-matrix',
"label": "{{ inputs.data.label }}",
"orig_dataset_id": "{{ inputs.data.dataset_id }}",
"filename": {"$filename": "auc.hdf5" } }
run "cp {{ inputs.taiga_token.filename }} ./.taiga-token"
run "python3 {{inputs.script.filename}} {{ inputs.data.dataset_id }}"
rule reformat_repurposing_single_pt_data:
inputs: script=fileref("scripts/compounds/repurposing/reformat_repurposing_single_pt.py"),
data={'type': 'repallsinglept-taiga-id'},
hdf5_utils=fileref('scripts/hdf5_utils.py', copy_to='hdf5_utils.py')
outputs: {
"type": 'dep-matrix',
"label": "{{ inputs.data.label }}",
"confounders_label": "repallsinglept-confounders",
"filename": {"$filename": "{{inputs.data.label}}.hdf5" },
"orig_dataset_id": "{{inputs.data.dataset_id}}"
}
run "python3 {{ inputs.script.filename }} {{ inputs.data.dataset_id }} {{inputs.data.label}}.hdf5"