|
62 | 62 | ) as dag: |
63 | 63 | pipeline_name = "codex-pipeline" |
64 | 64 | workflow_version = "1.0.0" |
65 | | - workflow_description = "The CODEX pipeline performs illumination correction and other pre-processing steps, segments nuclei and cells using Cytokit, and performs spatial analysis of expression data using SPRM, which computes various measures of analyte intensity per cell, performs clustering based on expression and other data, and computes markers for each cluster" |
| 65 | + workflow_description = "The CODEX pipeline performs illumination correction and other pre-processing steps, segments nuclei and cells using Cytokit, and performs spatial analysis of expression data using SPRM, which computes various measures of analyte intensity per cell, performs clustering based on expression and other data, and computes markers for each cluster." |
66 | 66 | steps_dir = Path(pipeline_name) / "steps" |
67 | 67 |
|
68 | 68 | cwl_workflows = [ |
|
83 | 83 | "documentation_url": "", |
84 | 84 | }, |
85 | 85 | { |
86 | | - "workflow_path": str( |
87 | | - get_absolute_workflow(Path("ribca", "pipeline.cwl")) |
88 | | - ), |
| 86 | + "workflow_path": str(get_absolute_workflow(Path("ribca", "pipeline.cwl"))), |
89 | 87 | "documentation_url": "", |
90 | 88 | }, |
91 | 89 | { |
@@ -264,9 +262,14 @@ def build_cwltool_cwl_ometiff_second_stitching(**kwargs): |
264 | 262 | input_parameters = [ |
265 | 263 | {"parameter_name": "--cytokit_config", "value": str(data_dir / "experiment.yaml")}, |
266 | 264 | {"parameter_name": "--cytokit_output", "value": str(data_dir / "cytokit")}, |
267 | | - {"parameter_name": "--slicing_pipeline_config", |
268 | | - "value": str(data_dir / "pipelineConfig.json"), }, |
269 | | - {"parameter_name": "--num_concurrent_tasks", "value": get_threads_resource(dag.dag_id)}, |
| 265 | + { |
| 266 | + "parameter_name": "--slicing_pipeline_config", |
| 267 | + "value": str(data_dir / "pipelineConfig.json"), |
| 268 | + }, |
| 269 | + { |
| 270 | + "parameter_name": "--num_concurrent_tasks", |
| 271 | + "value": get_threads_resource(dag.dag_id), |
| 272 | + }, |
270 | 273 | {"parameter_name": "--data_dir", "value": str(get_parent_data_dir(**kwargs))}, |
271 | 274 | ] |
272 | 275 | command = get_cwl_cmd_from_workflows(workflows, 2, input_parameters, tmpdir, kwargs["ti"]) |
@@ -322,9 +325,7 @@ def build_cwltool_cwl_ribca(**kwargs): |
322 | 325 | key="cwl_workflows", task_ids="build_cwl_ometiff_second_stitching" |
323 | 326 | ) |
324 | 327 |
|
325 | | - input_parameters = [ |
326 | | - {"parameter_name": "--data_dir", "value": str(data_dir)} |
327 | | - ] |
| 328 | + input_parameters = [{"parameter_name": "--data_dir", "value": str(data_dir)}] |
328 | 329 | command = get_cwl_cmd_from_workflows(workflows, 3, input_parameters, tmpdir, kwargs["ti"]) |
329 | 330 |
|
330 | 331 | return join_quote_command_str(command) |
@@ -383,9 +384,7 @@ def build_cwltool_cmd_deepcelltypes(**kwargs): |
383 | 384 | data_dir = tmpdir / "cwl_out" |
384 | 385 | print("data_dir: ", data_dir) |
385 | 386 |
|
386 | | - workflows = kwargs["ti"].xcom_pull( |
387 | | - key="cwl_workflows", task_ids="build_cwl_ribca" |
388 | | - ) |
| 387 | + workflows = kwargs["ti"].xcom_pull(key="cwl_workflows", task_ids="build_cwl_ribca") |
389 | 388 |
|
390 | 389 | input_parameters = [ |
391 | 390 | {"parameter_name": "--data_dir", "value": str(data_dir)}, |
@@ -439,7 +438,10 @@ def build_cwltool_cmd_sprm(**kwargs): |
439 | 438 | {"parameter_name": "--processes", "value": get_threads_resource(dag.dag_id)}, |
440 | 439 | {"parameter_name": "--image_dir", "value": str(data_dir / "pipeline_output/expr")}, |
441 | 440 | {"parameter_name": "--mask_dir", "value": str(data_dir / "pipeline_output/mask")}, |
442 | | - {"parameter_name": "--cell_types_directory", "value": str(data_dir / "ribca_for_sprm")}, |
| 441 | + { |
| 442 | + "parameter_name": "--cell_types_directory", |
| 443 | + "value": str(data_dir / "ribca_for_sprm"), |
| 444 | + }, |
443 | 445 | {"parameter_name": "--cell_types_directory", "value": str(data_dir / "deepcelltypes")}, |
444 | 446 | ] |
445 | 447 |
|
@@ -798,64 +800,52 @@ def build_cwltool_cmd_sprm_to_anndata(**kwargs): |
798 | 800 | ( |
799 | 801 | t_log_info |
800 | 802 | >> t_create_tmpdir |
801 | | - |
802 | 803 | >> prepare_cwl_illumination_first_stitching |
803 | 804 | >> t_build_cwl_illumination_first_stitching |
804 | 805 | >> t_pipeline_exec_cwl_illumination_first_stitching |
805 | 806 | >> t_maybe_keep_cwl_illumination_first_stitching |
806 | | - |
807 | 807 | >> prepare_cwl_cytokit |
808 | 808 | >> t_build_cwl_cytokit |
809 | 809 | >> t_pipeline_exec_cwl_cytokit |
810 | 810 | >> t_maybe_keep_cwl_cytokit |
811 | | - |
812 | 811 | >> prepare_cwl_ometiff_second_stitching |
813 | 812 | >> t_build_cwl_ometiff_second_stitching |
814 | 813 | >> t_pipeline_exec_cwl_ometiff_second_stitching |
815 | 814 | >> t_delete_internal_pipeline_files |
816 | 815 | >> t_maybe_keep_cwl_ometiff_second_stitching |
817 | | - |
818 | 816 | >> prepare_cwl_ribca |
819 | 817 | >> t_build_cmd_ribca |
820 | 818 | >> t_pipeline_exec_cwl_ribca |
821 | 819 | >> t_maybe_keep_cwl_ribca |
822 | | - |
823 | 820 | >> prepare_cwl_deepcelltypes |
824 | 821 | >> t_build_cmd_deepcelltypes |
825 | 822 | >> t_pipeline_exec_cwl_deepcelltypes |
826 | 823 | >> t_maybe_keep_cwl_deepcelltypes |
827 | | - |
828 | 824 | >> prepare_cwl_sprm |
829 | 825 | >> t_build_cmd_sprm |
830 | 826 | >> t_pipeline_exec_cwl_sprm |
831 | 827 | >> t_maybe_keep_cwl_sprm |
832 | | - |
833 | 828 | >> prepare_cwl_create_vis_symlink_archive |
834 | 829 | >> t_build_cmd_create_vis_symlink_archive |
835 | 830 | >> t_pipeline_exec_cwl_create_vis_symlink_archive |
836 | 831 | >> t_maybe_keep_cwl_create_vis_symlink_archive |
837 | | - |
838 | 832 | >> prepare_cwl_ome_tiff_pyramid |
839 | 833 | >> t_build_cmd_ome_tiff_pyramid |
840 | 834 | >> t_pipeline_exec_cwl_ome_tiff_pyramid |
841 | 835 | >> t_maybe_keep_cwl_ome_tiff_pyramid |
842 | | - |
843 | 836 | >> prepare_cwl_ome_tiff_offsets |
844 | 837 | >> t_build_cmd_ome_tiff_offsets |
845 | 838 | >> t_pipeline_exec_cwl_ome_tiff_offsets |
846 | 839 | >> t_maybe_keep_cwl_ome_tiff_offsets |
847 | | - |
848 | 840 | >> prepare_cwl_sprm_to_json |
849 | 841 | >> t_build_cmd_sprm_to_json |
850 | 842 | >> t_pipeline_exec_cwl_sprm_to_json |
851 | 843 | >> t_maybe_keep_cwl_sprm_to_json |
852 | | - |
853 | 844 | >> prepare_cwl_sprm_to_anndata |
854 | 845 | >> t_build_cmd_sprm_to_anndata |
855 | 846 | >> t_pipeline_exec_cwl_sprm_to_anndata |
856 | 847 | >> t_maybe_keep_cwl_sprm_to_anndata |
857 | 848 | >> t_maybe_create_dataset |
858 | | - |
859 | 849 | >> t_send_create_dataset |
860 | 850 | >> t_move_data |
861 | 851 | >> t_expand_symlinks |
|
0 commit comments