Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Histological Staining Area Quantification

## Overview
This workflow quantifies stained tissue areas in brightfield histological images
using colour deconvolution and automated thresholding. It is designed for
3-channel stainings compatible with the H-E-DAB (HED) colour space, such as
Masson's Trichrome (MT) and Immunohistochemistry (IHC).

## Inputs
- **Format:** TIFF
- **Type:** Brightfield microscopy images (whole slide or pre-cropped ROIs)
- **Structure:** Dataset collection (list) — one image per sample

## Outputs
A tabular file (TSV) with one row per sample:
- `sample_id` — sample identifier
- `label` — pixel label (1 = stained region)
- `area` — total number of stained pixels
- `mean_intensity` — mean pixel intensity within the stained region
- `percent_area` — staining area as percentage of total image area

## Compatible stainings
| Staining | Target channel |
|----------|---------------|
| Masson's Trichrome (MT) | Channel 2 |
| Immunohistochemistry (IHC) | Channel 2 (DAB) |
Comment on lines +23 to +26
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown table is malformed (uses || at line starts), which may render incorrectly. Use standard markdown table syntax with single leading/trailing | per row so the table renders reliably.

Copilot uses AI. Check for mistakes.

## Notes
- Images must be pre-cropped to the region of interest before use.
- Verify that Channel 2 corresponds to your stain of interest before running.

## Citation
If you use this workflow, please cite it via its WorkflowHub DOI.
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
- doc: Test outline for Histological-Staining-Area-Quantification
job:
ROI image for staining analysis:
class: Collection
collection_type: list
elements:
- class: File
identifier: control_1
path: test-data/ROI image for staining analysis_control_1.tiff
- class: File
identifier: control_2
path: test-data/ROI image for staining analysis_control_2.tiff
- class: File
identifier: control_3
path: test-data/ROI image for staining analysis_control_3.tiff
- class: File
identifier: treatment_1
path: test-data/ROI image for staining analysis_treatment_1.tiff
- class: File
identifier: treatment_2
path: test-data/ROI image for staining analysis_treatment_2.tiff
- class: File
identifier: treatment_3
path: test-data/ROI image for staining analysis_treatment_3.tiff
outputs:
'Tabular File: Staining Feature Results':
path: 'test-data/Tabular File: Staining Feature Results.tabular'
output:
element_tests:
control_1:
path: test-data/output_control_1.txt
control_2:
path: test-data/output_control_2.txt
control_3:
path: test-data/output_control_3.txt
treatment_1:
path: test-data/output_treatment_1.txt
treatment_2:
path: test-data/output_treatment_2.txt
treatment_3:
path: test-data/output_treatment_3.txt
Selected Stain Channel:
element_tests:
control_1:
path: test-data/Selected Stain Channel_control_1.tiff
control_2:
path: test-data/Selected Stain Channel_control_2.tiff
control_3:
path: test-data/Selected Stain Channel_control_3.tiff
treatment_1:
path: test-data/Selected Stain Channel_treatment_1.tiff
treatment_2:
path: test-data/Selected Stain Channel_treatment_2.tiff
treatment_3:
path: test-data/Selected Stain Channel_treatment_3.tiff
'Collection of Tabular: Staining Quantification Results':
element_tests:
control_1:
path: 'test-data/Collection of Tabular: Staining Quantification Results_control_1.tabular'
control_2:
path: 'test-data/Collection of Tabular: Staining Quantification Results_control_2.tabular'
control_3:
path: 'test-data/Collection of Tabular: Staining Quantification Results_control_3.tabular'
treatment_1:
path: 'test-data/Collection of Tabular: Staining Quantification Results_treatment_1.tabular'
treatment_2:
path: 'test-data/Collection of Tabular: Staining Quantification Results_treatment_2.tabular'
treatment_3:
path: 'test-data/Collection of Tabular: Staining Quantification Results_treatment_3.tabular'
'Collection: Individual Deconvolved Channels':
element_tests:
control_1:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
control_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
control_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_1:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
Comment on lines +75 to +119
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several element_tests reuse the same expected output files across different input samples (e.g., control_2 points to the same deconvolved-channel golden files as control_1). Unless the inputs are identical, this will either fail once real test data is added or will mask regressions if comparisons are unintentionally satisfied. Recommend providing per-sample golden outputs (or switching to more robust assertions for images/tabular outputs if exact matches are not feasible).

Suggested change
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
control_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
control_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_1:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
treatment_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_3.tiff.tiff'
path: 'test-data/Collection: Individual Deconvolved Channels_control_1_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_1_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_1_3.tiff.tiff'
control_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_2_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_2_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_2_3.tiff.tiff'
control_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_3_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_3_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_control_3_3.tiff.tiff'
treatment_1:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_1_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_1_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_1_3.tiff.tiff'
treatment_2:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_2_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_2_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_2_3.tiff.tiff'
treatment_3:
elements:
1.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_3_1.tiff.tiff'
2.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_3_2.tiff.tiff'
3.tiff:
path: 'test-data/Collection: Individual Deconvolved Channels_treatment_3_3.tiff.tiff'

Copilot uses AI. Check for mistakes.
Deconvolved Image:
element_tests:
control_1:
path: test-data/Deconvolved Image_control_1.tiff
control_2:
path: test-data/Deconvolved Image_control_2.tiff
control_3:
path: test-data/Deconvolved Image_control_3.tiff
treatment_1:
path: test-data/Deconvolved Image_treatment_1.tiff
treatment_2:
path: test-data/Deconvolved Image_treatment_2.tiff
treatment_3:
path: test-data/Deconvolved Image_treatment_3.tiff
Selected Stain Channel Thresholded:
element_tests:
control_1:
path: test-data/Selected Stain Channel Thresholded_control_1.tiff
control_2:
path: test-data/Selected Stain Channel Thresholded_control_2.tiff
control_3:
path: test-data/Selected Stain Channel Thresholded_control_3.tiff
treatment_1:
path: test-data/Selected Stain Channel Thresholded_treatment_1.tiff
treatment_2:
path: test-data/Selected Stain Channel Thresholded_treatment_2.tiff
treatment_3:
path: test-data/Selected Stain Channel Thresholded_treatment_3.tiff
Loading
Loading