Skip to content

Commit dae09f8

Browse files
authored
Merge pull request #1 from jluethi/drop_t_dimension
Drop t dimension Task
2 parents dce7a15 + 6aec6a5 commit dae09f8

File tree

11 files changed

+316
-111
lines changed

11 files changed

+316
-111
lines changed

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
.DS_Store
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# dotenv
86+
.env
87+
88+
# virtualenv
89+
.venv
90+
venv/
91+
ENV/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# ruff
107+
.ruff_cache/
108+
109+
# IDE settings
110+
.vscode/
111+
.idea/

examples/run_drop_t_dimension.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Dev script to test the Drop T dimension task."""
2+
from fractal_helper_tasks.drop_t_dimension import drop_t_dimension
3+
4+
input_paths = [
5+
"/Users/joel/Desktop/dyn_CHX_pos1_mmIntOrg_121z_0-2um_640-1000ms-200g_561-1000ms-200g__488-1000ms-200g_405-100ms-200g_11.zarr"
6+
]
7+
output_path = ""
8+
component = "0"
9+
10+
drop_t_dimension(
11+
input_paths=input_paths,
12+
output_path=output_path,
13+
component=component,
14+
metadata={},
15+
suffix="no_T",
16+
overwrite_input=False,
17+
)

src/.DS_Store

-6 KB
Binary file not shown.

src/fractal_helper_tasks.egg-info/PKG-INFO

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/fractal_helper_tasks.egg-info/SOURCES.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/fractal_helper_tasks.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/fractal_helper_tasks.egg-info/requires.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/fractal_helper_tasks.egg-info/top_level.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,60 @@
131131
"mem": 1000
132132
},
133133
"docs_info": "Workaround task to manually change the hard-coded metadata components\nA fractal workflow sets them to the mip.zarr components after running the\nmaximum intensity projection task. This resets them to the 3D components."
134+
},
135+
{
136+
"name": "Drop T dimension",
137+
"executable": "drop_t_dimension.py",
138+
"input_type": "zarr",
139+
"output_type": "zarr",
140+
"meta": {
141+
"parallelization_level": "image",
142+
"cpus_per_task": 2,
143+
"mem": 8000
144+
},
145+
"docs_info": "Drops singleton t dimension.",
146+
"args_schema": {
147+
"title": "DropTDimension",
148+
"type": "object",
149+
"properties": {
150+
"input_paths": {
151+
"title": "Input Paths",
152+
"type": "array",
153+
"items": {
154+
"type": "string"
155+
},
156+
"description": "This parameter is not used by this task. This task only supports a single input path. (standard argument for Fractal tasks, managed by Fractal server)."
157+
},
158+
"output_path": {
159+
"title": "Output Path",
160+
"type": "string",
161+
"description": "Path were the output of this task is stored. Example: `\"/some/path/\"` => puts the new OME-Zarr file in that folder. (standard argument for Fractal tasks, managed by Fractal server)."
162+
},
163+
"component": {
164+
"title": "Component",
165+
"type": "string",
166+
"description": "Path to the OME-Zarr image in the OME-Zarr plate that is processed. Component is typically changed by the `copy_ome_zarr` task before, to point to a new mip Zarr file. Example: `\"some_plate_mip.zarr/B/03/0\"`. (standard argument for Fractal tasks, managed by Fractal server)."
167+
},
168+
"metadata": {
169+
"title": "Metadata",
170+
"type": "object",
171+
"description": "Dictionary containing metadata about the OME-Zarr. This task requires the key `copy_ome_zarr` to be present in the metadata (as defined in `copy_ome_zarr` task). (standard argument for Fractal tasks, managed by Fractal server)."
172+
},
173+
"suffix": {
174+
"title": "Suffix",
175+
"default": "no_T",
176+
"type": "string",
177+
"description": "Suffix to be used for the new Zarr image. If overwrite_input is True, this file is only temporary."
178+
}
179+
},
180+
"required": [
181+
"input_paths",
182+
"output_path",
183+
"component",
184+
"metadata"
185+
],
186+
"additionalProperties": false
187+
}
134188
}
135189
],
136190
"has_args_schemas": true,

0 commit comments

Comments
 (0)