Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
Removing old workflow mapping for PAS
Refactoring to make use of UBKG for assay name
  • Loading branch information
sunset666 committed Nov 22, 2023
1 parent cc000f6 commit 30b5e13
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
30 changes: 13 additions & 17 deletions src/ingest-pipeline/airflow/dags/pas_ftu_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@


with HMDAG(
"pas_ftu_segmentation",
schedule_interval=None,
is_paused_upon_creation=False,
default_args=default_args,
user_defined_macros={
"tmp_dir_path": get_tmp_dir_path,
'preserve_scratch': get_preserve_scratch_resource('pas_ftu_segmentation'),
},
"pas_ftu_segmentation",
schedule_interval=None,
is_paused_upon_creation=False,
default_args=default_args,
user_defined_macros={
"tmp_dir_path": get_tmp_dir_path,
"preserve_scratch": get_preserve_scratch_resource("pas_ftu_segmentation"),
},
) as dag:

pipeline_name = "pas-ftu-segmentation-pipeline"
cwl_workflows = get_named_absolute_workflows(
segmentation=Path(pipeline_name, "pipeline.cwl"),
Expand All @@ -84,13 +83,10 @@ def build_cwltool_cwl_segmentation(**kwargs):
meta_yml_path = workflow.parent / "meta.yaml"

# get organ type
ds_rslt = pythonop_get_dataset_state(
dataset_uuid_callable=get_dataset_uuid,
**kwargs
)
ds_rslt = pythonop_get_dataset_state(dataset_uuid_callable=get_dataset_uuid, **kwargs)

organ_list = list(set(ds_rslt['organs']))
organ_code = organ_list[0] if len(organ_list) == 1 else 'multi'
organ_list = list(set(ds_rslt["organs"]))
organ_code = organ_list[0] if len(organ_list) == 1 else "multi"

command = [
*get_cwltool_base_cmd(tmpdir),
Expand All @@ -99,7 +95,7 @@ def build_cwltool_cwl_segmentation(**kwargs):
"--data_directory",
data_dir,
"--tissue_type",
organ_code
organ_code,
]

return join_quote_command_str(command)
Expand Down Expand Up @@ -132,7 +128,6 @@ def build_cwltool_cwl_segmentation(**kwargs):
},
)


prepare_cwl_ome_tiff_pyramid = DummyOperator(task_id="prepare_cwl_ome_tiff_pyramid")

def build_cwltool_cwl_ome_tiff_pyramid(**kwargs):
Expand Down Expand Up @@ -278,6 +273,7 @@ def build_cwltool_cmd_ome_tiff_offsets(**kwargs):
],
cwl_workflows=list(cwl_workflows.values()),
)

t_send_status = PythonOperator(
task_id="send_status_msg", python_callable=send_status_msg, provide_context=True
)
Expand Down
6 changes: 3 additions & 3 deletions src/ingest-pipeline/airflow/dags/workflow_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ workflow_map:
- 'collection_type': '.*'
'assay_type': 'PAS'
'workflow': 'pas_ftu_segmentation'
- 'collection_type': '.*'
'assay_type': 'PAS'
'workflow': 'ometiff_pyramid'
# - 'collection_type': '.*'
# 'assay_type': 'PAS'
# 'workflow': 'ometiff_pyramid'
- 'collection_type': '.*'
'assay_type': 'AF'
'workflow': 'ometiff_pyramid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ HM_AF_CONN_UUID_API_CONNECTION=http://https%3a%2f%2fuuid-api.dev.hubmapconsortiu
HM_AF_CONN_FILES_API_CONNECTION=http://https%3a%2f%2ffiles-api.dev.hubmapconsortium.org/
HM_AF_CONN_SPATIAL_API_CONNECTION=http://https%3a%2f%2fspatial-api.dev.hubmapconsortium.org/
HM_AF_CONN_CELLS_API_CONNECTION=http://https%3a%2f%2fcells-api.dev.hubmapconsortium.org/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fsearch-api.dev.hubmapconsortium.org%2fv3/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fontoly-api.dev.hubmapconsortium.org%2fv3/
HM_AF_CONN_ENTITY_API_CONNECTION=http://https%3a%2f%2fentity-api.dev.hubmapconsortium.org/
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ HM_AF_CONN_UUID_API_CONNECTION=http://https%3a%2f%2fuuid.api.hubmapconsortium.or
HM_AF_CONN_FILES_API_CONNECTION=http://https%3a%2f%2ffiles.api.hubmapconsortium.org/
HM_AF_CONN_SPATIAL_API_CONNECTION=http://https%3a%2f%2fspatial.api.hubmapconsortium.org/
HM_AF_CONN_CELLS_API_CONNECTION=http://https%3a%2f%2fcells.api.hubmapconsortium.org/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fsearch.api.hubmapconsortium.org%2fv3/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fontology.api.hubmapconsortium.org%2fv3/
HM_AF_CONN_ENTITY_API_CONNECTION=http://https%3a%2f%2fentity.api.hubmapconsortium.org/
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ HM_AF_CONN_UUID_API_CONNECTION=http://https%3a%2f%2fuuid-api.stage.hubmapconsort
HM_AF_CONN_FILES_API_CONNECTION=http://https%3a%2f%2ffiles-api.stage.hubmapconsortium.org/
HM_AF_CONN_SPATIAL_API_CONNECTION=http://https%3a%2f%2fspatial-api.stage.hubmapconsortium.org/
HM_AF_CONN_CELLS_API_CONNECTION=http://https%3a%2f%2fcells-api.stage.hubmapconsortium.org/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fsearch-api.stage.hubmapconsortium.org%2fv3/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fontology-api.stage.hubmapconsortium.org%2fv3/
HM_AF_CONN_ENTITY_API_CONNECTION=http://https%3a%2f%2fentity-api.stage.hubmapconsortium.org/
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ HM_AF_CONN_UUID_API_CONNECTION=http://https%3a%2f%2fuuid-api.test.hubmapconsorti
HM_AF_CONN_FILES_API_CONNECTION=http://https%3a%2f%2ffiles-api.test.hubmapconsortium.org/
HM_AF_CONN_SPATIAL_API_CONNECTION=http://https%3a%2f%2fspatial-api.test.hubmapconsortium.org/
HM_AF_CONN_CELLS_API_CONNECTION=http://https%3a%2f%2fcells-api.test.hubmapconsortium.org/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fsearch-api.test.hubmapconsortium.org%2fv3/
HM_AF_CONN_SEARCH_API_CONNECTION=http://https%3a%2f%2fontology-api.test.hubmapconsortium.org%2fv3/
HM_AF_CONN_ENTITY_API_CONNECTION=http://https%3a%2f%2fentity-api.test.hubmapconsortium.org/

0 comments on commit 30b5e13

Please sign in to comment.