Repository navigation
Expand file tree
/
Copy pathmodules.config
More file actions
75 lines (70 loc) · 2.71 KB
/
Copy pathmodules.config
File metadata and controls
75 lines (70 loc) · 2.71 KB
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
68
69
70
71
72
73
74
75
/*
* Per-step Fractal task arguments.
*
* `ext.args` is a Map that is merged into the JSON passed to the Fractal task
* via --args-json, so any argument of the task can be set here. Field names
* follow the task's Pydantic models in fractal-tasks-core 2.1.0.
*/
process {
// Every Fractal step writes the arguments it gave the task to
// <meta.id>.<step>.args.json; publish them per plate, so that the run's
// RO-Crate (-profile prov) lists them with the task that wrote them
withName: 'FRACTAL_.*' {
publishDir = [
path : { "${params.out_dir}/task_args/${meta.plate ?: meta.id}" },
mode : 'copy',
pattern: '*.args.json',
]
}
withName: 'FRACTAL_IMPORT_OME_ZARR' {
// merged into `advanced_options`
ext.args = [
add_image_roi_table : true,
update_omero_metadata: true,
table_backend : 'csv',
]
}
withName: 'FRACTAL_THRESHOLD_SEGMENTATION' {
ext.args = {
[
segmentation_method: params.threshold_method == 'Simple Threshold'
? [method: 'Simple Threshold', threshold: params.threshold as Double]
: [method: 'Otsu'],
pre_post_process: [
pre_process : params.sigma_xy != null
? [[type: 'Gaussian Blur Filter', sigma_xy: params.sigma_xy as Double]] : [],
post_process: params.min_size != null
? [[type: 'Size Filter', min_size: params.min_size as Integer]] : [],
],
// also write <label>_masking_ROI_table, usable by downstream Fractal tasks
create_masking_roi_table: [mode: 'Create Masking ROI Table', table_backend: 'csv'],
]
}
}
withName: 'FRACTAL_MEASURE_FEATURES' {
// default features = shape + intensity on all channels
ext.args = [:]
publishDir = [
// per-image feature tables as flat CSVs
[
path : { "${params.out_dir}/features" },
mode : 'copy',
pattern: '*.csv',
],
// replaces the FRACTAL_.* publishDir above, so repeat it here
[
path : { "${params.out_dir}/task_args/${meta.plate ?: meta.id}" },
mode : 'copy',
pattern: '*.args.json',
],
]
}
withName: 'PUBLISH_OME_ZARR' {
// every image of a plate writes into the same OME-Zarr, so the plate is
// published once, after all of its images are done
publishDir = [
path: { "${params.out_dir}/ome_zarr" },
mode: 'copy',
]
}
}