Skip to content

Commit

Permalink
ometiff_pyramid.py: add plumbing to pass downsample_type to pipeline
Browse files Browse the repository at this point in the history
Currently disabled via a hardcoded assignment of `is_ims = False`, but I
assume that flag can be implemented by examining the Airflow environment or
something similar.
  • Loading branch information
mruffalo committed Aug 31, 2020
1 parent 1419874 commit f39d25a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ingest-pipeline/airflow/dags/ometiff_pyramid.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
localized_assert_json_matches_schema as assert_json_matches_schema,
)

# Passed directly to the pipeline
DOWNSAMPLE_TYPE = 'LINEAR'

# after running this DAG you should have on disk
# 1. 1 OME.TIFF pyramid per OME.TIFF in the original dataset
# 2. 1 .N5 file per OME.TIFF in the original dataset
Expand Down Expand Up @@ -93,13 +96,19 @@ def build_cwltool_cmd1(**kwargs):
data_dir = ctx['parent_lz_path']
print('data_dir: ', data_dir)

# TODO: implement this check however is appropriate
is_ims = False

#this is the call to the CWL
command = [
*get_cwltool_base_cmd(tmpdir),
cwl_workflows[0],
'--ometiff_directory',
data_dir,
]
if is_ims:
command.append('--downsample_type')
command.append(DOWNSAMPLE_TYPE)

return join_quote_command_str(command)

Expand Down

0 comments on commit f39d25a

Please sign in to comment.