Skip to content

Latest commit

 

History

History
89 lines (75 loc) · 4.2 KB

README.md

File metadata and controls

89 lines (75 loc) · 4.2 KB

Common Workflow Language (CWL) Nuclear Segmentation worflow

CWL feature extraction workflow for imaging dataset

Workflow Steps:

create a Conda environment using python = ">=3.9,<3.12"

1. Install polus-plugins.

  • clone a image-tools repository git clone https://github.com/camilovelezr/image-tools.git ../
  • cd image-tools
  • create a new branch git checkout -b hd2 remotes/origin/hd2
  • pip install .

2. Install workflow-inference-compiler.

  • clone a workflow-inference-compiler repository git clone https://github.com/camilovelezr/workflow-inference-compiler.git ../
  • cd workflow-inference-compiler
  • create a new branch git checkout -b hd2 remotes/origin/hd2
  • pip install -e ".[all]"

Note:

Ensure that the docker-desktop is running in the background. To verify that it's operational, you can use the following command: docker run -d -p 80:80 docker/getting-started This command will launch the docker/getting-started container in detached mode (-d flag), exposing port 80 on your local machine (-p 80:80). It's a simple way to test if Docker Desktop is functioning correctly.

Details

This workflow integrates seven distinct plugins, starting from data retrieval from Broad Bioimage Benchmark Collection, renaming files, correcting uneven illumination, segmenting nuclear objects.

Below are the specifics of the plugins employed in the workflow

  1. bbbc-download-plugin
  2. file-renaming-tool
  3. ome-converter-tool
  4. basic-flatfield-estimation-tool
  5. apply-flatfield-tool
  6. kaggle-nuclei-segmentation
  7. polus-ftl-label-plugin

Execute CWL Segmentation workflow

The parameters for each imaging dataset are pre-defined and stored in JSON format. A Pydantic model in a utils Python file can be utilized to store parameters for any new dataset

python cwl_workflows/__main__.py --name="BBBC039" --workflow=segmentation

A directory named workflow is generated, encompassing CLTs for each plugin, YAML files, and all outputs are stored within the outdir directory.

workflows
├── experiment
│   └── cwl_adapters
|   experiment.cwl
|   experiment.yml
|
└── outdir
    └── experiment
        ├── step 1 BbbcDownload
        │   └── outDir
        │       └── bbbc.outDir
        │           └── BBBC
        │               └── BBBC039
        │                   └── raw
        │                       ├── Ground_Truth
        │                       │   ├── masks
        │                       │   └── metadata
        │                       └── Images
        │                           └── images
        ├── step 2 FileRenaming
        │   └── outDir
        │       └── rename.outDir
        ├── step 3 OmeConverter
        │   └── outDir
        │       └── ome_converter.outDir
        ├── step 4 BasicFlatfieldEstimation
        │   └── outDir
        │       └── estimate_flatfield.outDir
        ├── step 5 ApplyFlatfield
        │   └── outDir
        │       └── apply_flatfield.outDir
        ├── step 6 KaggleNucleiSegmentation
        │   └── outDir
        │       └── kaggle_nuclei_segmentation.outDir
        ├── step 7 FtlLabel
        │   └── outDir
        │       └── ftl_plugin.outDir