Skip to content

Commit

Permalink
J uranic/dirschema updates (#1384)
Browse files Browse the repository at this point in the history
* Create segmentation-mask-v2.2.yaml

Add top-level "extras" directory

* Create af-v2.1.yaml

raw\/channel_layout\.tsv  - make optional
raw\/images\/[^\/]+\.(?:xml|nd2|oir|lif|czi|tiff|qptiff)  - add qptiff

* Create codex-v2.1.yaml

Add .* to end of processed\/drv_[^\/]*\/ and raw\/src_[^\/]*\/

* Update CHANGELOG.md

* Docs: Update dir schemas for af, seg-mask, and codex

---------

Co-authored-by: Juan Puerto <=>
  • Loading branch information
j-uranic authored Nov 14, 2024
1 parent 1d91919 commit f2c40fd
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Changelog
## v0.0.29 (in progress)
## v0.0.30 (in progress)

## v0.0.29
- Add CosMX directory schema
- Update CosMX directory schema
- Update Segmentation masks directory schema
- Update Auto-fluorescence directory schema
- Update CODEX directory schema

## v0.0.28
- Update Xenium directory schema
Expand Down
27 changes: 26 additions & 1 deletion docs/af/current/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,32 @@ This schema is for autofluorescence (AF). For an example of an AF dataset & dire
<br>

## Directory schemas
<summary><b>Version 2.0 (use this one)</b></summary>
<summary><b>Version 2.1 (use this one)</b></summary>

| pattern | required? | description |
| --- | --- | --- |
| <code>extras\/.*</code> || Folder for general lab-specific files related to the dataset. [Exists in all assays] |
| <code>extras\/microscope_hardware\.json</code> || **[QA/QC]** A file generated by the micro-meta app that contains a description of the hardware components of the microscope. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document. |
| <code>extras\/microscope_settings\.json</code> | | **[QA/QC]** A file generated by the micro-meta app that contains a description of the settings that were used to acquire the image data. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document. |
| <code>raw\/.*</code> || Raw data files for the experiment. |
| <code>raw\/channel_layout\.tsv</code> | | Table that includes a dictionary for channel to moiety, which may be a protein given in an OMAP panel or captured in the ASCT+B table. |
| <code>raw\/images\/.*</code> || Raw image files. Using this subdirectory allows for harmonization with other imaging assays. [This directory must include at least one raw file.] |
| <code>raw\/images\/[^\/]+\.(?:xml&#124;nd2&#124;oir&#124;lif&#124;czi&#124;tiff&#124;qptiff)</code> || Raw microscope file for the experiment |
| <code>lab_processed\/.*</code> || Experiment files that were processed by the lab generating the data. |
| <code>lab_processed\/images\/.*</code> || Processed image files |
| <code>lab_processed\/images\/[^\/]+\.ome\.tiff</code> (example: <code>lab_processed/images/HBM892.MDXS.293.ome.tiff</code>) || OME-TIFF files (multichannel, multi-layered) produced by the microscopy experiment. If compressed, must use loss-less compression algorithm. See the following link for the set of fields that are required in the OME TIFF file XML header. <https://docs.google.com/spreadsheets/d/1YnmdTAA0Z9MKN3OjR3Sca8pz-LNQll91wdQoRPSP6Q4/edit#gid=0> |
| <code>lab_processed\/images\/[^\/]*ome-tiff\.channels\.csv</code> || This file provides essential documentation pertaining to each channel of the accommpanying OME TIFF. The file should contain one row per OME TIFF channel. The required fields are detailed <https://docs.google.com/spreadsheets/d/1xEJSb0xn5C5fB3k62pj1CyHNybpt4-YtvUs5SUMS44o/edit#gid=0> |
| <code>lab_processed\/transformations\/.*</code> | | This directory contains transformation matrices that capture how each modality is aligned with the other and can be used to visualize overlays of multimodal data. This is needed to overlay images from the exact same tissue section (e.g., MALDI imaging mass spec, autofluorescence microscopy, MxIF, histological stains). In these cases data type may have different pixel sizes and slightly different orientations (i.e., one may be rotated relative to another). |
| <code>lab_processed\/transformations\/[^\/]+\.txt</code> | | Transformation matrices used to overlay images from the exact same tissue section (e.g., MALDI imaging mass spec, autofluorescence microscopy, MxIF, histological stains). |
| <code>qa_qc\/.*</code> || Directory containing QA and/or QC information. |
| <code>qa_qc\/resolution_report\/.*</code> || Directory containing the results of resolution tests and/or vendor preventative maintenance reports. |
| <code>qa_qc\/resolution_report\/resolution\.txt</code> | | This file summarizes the results of resolution tests or vendor reports from preventative maintenance visits. |
| <code>qa_qc\/resolution_report\/[^\/]+\.pdf</code> | | This file is a pdf from a vendor preventative maintenance visit or resolution check tool demonstrating resolution. This file may include illumination test results. |
| <code>qa_qc\/illumination_report\/.*</code> || Directory containing the results of illumination tests and/or vendor preventative maintenance reports. |
| <code>qa_qc\/illumination_report\/illumination.txt</code> | | This file summarizes the results of illumination tests or vendor reports from preventative maintenance visits. |
| <code>qa_qc\/illumination_report\/[^\/]+\.pdf</code> | | This file is a pdf from a vendor preventative maintenance visit or illumination check tool demonstrating illumination intensity. |

<summary><b>Version 2.0</b></summary>

| pattern | required? | description |
| --- | --- | --- |
Expand Down
24 changes: 23 additions & 1 deletion docs/codex/current/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,29 @@ Related files:
<br>

## Directory schemas
<summary><b>Version 2.0 (use this one)</b></summary>
<summary><b>Version 2.1 (use this one)</b></summary>

| pattern | required? | description |
| --- | --- | --- |
| <code>extras\/.*</code> || Folder for general lab-specific files related to the dataset. [Exists in all assays] |
| <code>extras\/microscope_hardware\.json</code> || **[QA/QC]** A file generated by the micro-meta app that contains a description of the hardware components of the microscope. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document. |
| <code>extras\/microscope_settings\.json</code> | | **[QA/QC]** A file generated by the micro-meta app that contains a description of the settings that were used to acquire the image data. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document. |
| <code>raw\/.*</code> || This is a directory containing raw data. |
| <code>lab_processed\/images\/[^\/]+\.ome\.tiff</code> || OME-TIFF file (multichannel, multi-layered) produced by the experiment. If compressed, must use loss-less compression algorithm. See the following link for the set of fields that are required in the OME TIFF file XML header. <https://docs.google.com/spreadsheets/d/1YnmdTAA0Z9MKN3OjR3Sca8pz-LNQll91wdQoRPSP6Q4/edit#gid=0> |
| <code>lab_processed\/images\/[^\/]*ome-tiff\.channels\.csv</code> || This file should describe any processing that was done to generate the images in each channel of the accommpanying OME TIFF. The file should contain one row per OME TIFF channel. Two columns should be booleans "is this a channel to use for nuclei segmentation" and "is this a channel to use for cell segmentation". |
| <code>[^\/]*NAV[^\/]*\.tif</code> (example: <code>NAV.tif</code>) | | Navigational Image showing Region of Interest (Keyance Microscope only) |
| <code>[^\/]+\.pdf</code> (example: <code>summary.pdf</code>) | | **[QA/QC]** PDF export of Powerpoint slide deck containing the Image Analysis Report |
| <code>extras\/dir-schema-v2-with-dataset-json</code> || Empty file whose presence indicates the version of the directory schema in use |
| <code>processed\/drv_[^\/]*\/.*</code> || Processed files produced by the Akoya software or alternative software. |
| <code>raw\/cyc[^\/]*_reg[^\/]*\/.*</code> || Intermediary directory |
| <code>raw\/src_[^\/]*\/.*</code> || Intermediary directory |
| <code>raw\/cyc[^\/]*_reg[^\/]*\/[^\/]*_z[^\/]*_CH[^\/]*\.tif</code> || TIFF files produced by the experiment. General folder format: Cycle(n)_Region(n)_date; General file format: name_tileNumber(n)_zplaneNumber(n)_channelNumber(n) |
| <code>raw\/src_[^\/]*\/cyc[^\/]*_reg[^\/]*_[^\/]*\/[^\/]+\.gci</code> | | Group Capture Information File (Keyance Microscope only) |
| <code>raw\/dataset\.json</code> (example: <code>raw/dataset.json</code>) || Data processing parameters file. This will include additional CODEX specific metadata needed for the HIVE processing workflow. |
| <code>raw\/reg_[^\/]*\.png</code> (example: <code>raw/reg_00.png</code>) | | Region overviews |
| <code>raw\/experiment\.json</code> (example: <code>raw/experiment.json</code>) | | JSON file produced by the Akoya software which contains the metadata for the experiment, including the software version used, microscope parameters, channel names, pixel dimensions, etc. (required for HuBMAP pipeline) |

<summary><b>Version 2.0</b></summary>

| pattern | required? | description |
| --- | --- | --- |
Expand Down
17 changes: 16 additions & 1 deletion docs/segmentation-mask/current/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,22 @@ For additional documentation on Segmentation Masks, please visit [here](https://
<br>

## Directory schemas
<summary><b>Version 2.1 (use this one)</b></summary>
<summary><b>Version 2.2 (use this one)</b></summary>

| pattern | required? | description |
| --- | --- | --- |
| <code>extras\/.*</code> || Folder for general lab-specific files related to the dataset. |
| <code>derived\/.*</code> || The EPIC data is placed in TOP/derived/ so it does not conflict with any files if it is uploaded with a primary dataset. |
| <code>derived\/extras\/.*</code> || Folder for general lab-specific files related to the derived dataset. |
| <code>derived\/segmentation_masks\/.*</code> || Directory containing segmentation masks. |
| <code>derived\/segmentation_masks\/[^\/]+\.segmentations\.ome\.tiff</code> || The segmentation masks should be stored as multi-channel pyramidal OME TIFF bitmasks with one channel per mask, where a single mask contains all instances of a type of object (e.g., all cells, a class of FTUs, etc). The class of objects contained in the mask is documented in the segmentation-masks.csv file. Each individual object in a mask should be represented by a unique integer pixel value starting at 1, with 0 meaning background (e.g., all pixels belonging to the first instance of a T-cell have a value of 1, the pixels for the second instance of a T-cell have a value of 2, etc). The pixel values should be unique within a mask. FTUs and other structural elements should be captured the same way as cells with segmentation masks and the appropriate channel feature definitions. |
| <code>derived\/segmentation_masks\/[^\/]+-objects\.(?:tsv&#124;xlsx)</code> || This is a matrix where each row describes an individual object (e.g., one row per cell in the case where a mask contains all cells) and columns are features (i.e., object type, marker intensity, classification strategies, etc). One file should be created per mask with the name of the mask prepended to the file name. For example, if there is a cell segmentation map called "cells" then you would include a file called "cells-objects.csv" and that file would contain one row per cell in the "cells" mask and one column per feature, such as marker intensity and/or cell type. A minimum set of fields (required and optional) is included below. |
| <code>derived\/segmentation_masks\/[^\/]+-centroid-adjacency\.csv</code> | | Objects are required to be in the same mask. A separate centroid-adjacency file can be included per mask. |
| <code>derived\/segmentation_masks\/[^\/]+-linkage-adjacency\.csv</code> | | Objects are required to be in the same mask. A separate linkage-adjacency file can be included per mask. |
| <code>derived\/segmentation_masks\/[^\/]+-mesh\.glb</code> | | This is a file with 3D mesh images for a 3D map. |
| <code>derived\/segmentation_masks\/transformations\/.*</code> | | This directory should include any transformation files that pertain to a 3D reconstruction from serial sections. The mask protocol should explain the structure of these transformation files and how they can be used to reconstruct the 3D map from the 2D sections. |

<summary><b>Version 2.1</b></summary>

| pattern | required? | description |
| --- | --- | --- |
Expand Down
89 changes: 89 additions & 0 deletions src/ingest_validation_tools/directory-schemas/af-v2.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
files:
-
pattern: extras\/.*
required: True
description: Folder for general lab-specific files related to the dataset. [Exists in all assays]
-
pattern: extras\/microscope_hardware\.json
required: True
description: A file generated by the micro-meta app that contains a description of the hardware components of the microscope. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document.
is_qa_qc: True
-
pattern: extras\/microscope_settings\.json
required: False
description: A file generated by the micro-meta app that contains a description of the settings that were used to acquire the image data. Email HuBMAP Consortium Help Desk <[email protected]> if help is required in generating this document.
is_qa_qc: True
-
pattern: raw\/.*
required: True
description: Raw data files for the experiment.
-
pattern: raw\/channel_layout\.tsv
required: False
description: Table that includes a dictionary for channel to moiety, which may be a protein given in an OMAP panel or captured in the ASCT+B table.
is_qa_qc: False
-
pattern: raw\/images\/.*
required: True
description: Raw image files. Using this subdirectory allows for harmonization with other imaging assays. [This directory must include at least one raw file.]
-
pattern: raw\/images\/[^\/]+\.(?:xml|nd2|oir|lif|czi|tiff|qptiff)
required: True
description: Raw microscope file for the experiment
is_qa_qc: False
-
pattern: lab_processed\/.*
required: True
description: Experiment files that were processed by the lab generating the data.
-
pattern: lab_processed\/images\/.*
required: True
description: Processed image files
-
pattern: lab_processed\/images\/[^\/]+\.ome\.tiff
required: True
description: OME-TIFF files (multichannel, multi-layered) produced by the microscopy experiment. If compressed, must use loss-less compression algorithm. See the following link for the set of fields that are required in the OME TIFF file XML header. <https://docs.google.com/spreadsheets/d/1YnmdTAA0Z9MKN3OjR3Sca8pz-LNQll91wdQoRPSP6Q4/edit#gid=0>
is_qa_qc: False
example: lab_processed/images/HBM892.MDXS.293.ome.tiff
-
pattern: lab_processed\/images\/[^\/]*ome-tiff\.channels\.csv
required: True
description: This file provides essential documentation pertaining to each channel of the accommpanying OME TIFF. The file should contain one row per OME TIFF channel. The required fields are detailed <https://docs.google.com/spreadsheets/d/1xEJSb0xn5C5fB3k62pj1CyHNybpt4-YtvUs5SUMS44o/edit#gid=0>
is_qa_qc: False
-
pattern: lab_processed\/transformations\/.*
required: False
description: This directory contains transformation matrices that capture how each modality is aligned with the other and can be used to visualize overlays of multimodal data. This is needed to overlay images from the exact same tissue section (e.g., MALDI imaging mass spec, autofluorescence microscopy, MxIF, histological stains). In these cases data type may have different pixel sizes and slightly different orientations (i.e., one may be rotated relative to another).
-
pattern: lab_processed\/transformations\/[^\/]+\.txt
required: False
description: Transformation matrices used to overlay images from the exact same tissue section (e.g., MALDI imaging mass spec, autofluorescence microscopy, MxIF, histological stains).
is_qa_qc: False
-
pattern: qa_qc\/.*
required: True
description: Directory containing QA and/or QC information.
-
pattern: qa_qc\/resolution_report\/.*
required: True
description: Directory containing the results of resolution tests and/or vendor preventative maintenance reports.
-
pattern: qa_qc\/resolution_report\/resolution\.txt
required: False
description: This file summarizes the results of resolution tests or vendor reports from preventative maintenance visits.
-
pattern: qa_qc\/resolution_report\/[^\/]+\.pdf
required: False
description: This file is a pdf from a vendor preventative maintenance visit or resolution check tool demonstrating resolution. This file may include illumination test results.
-
pattern: qa_qc\/illumination_report\/.*
required: True
description: Directory containing the results of illumination tests and/or vendor preventative maintenance reports.
-
pattern: qa_qc\/illumination_report\/illumination.txt
required: False
description: This file summarizes the results of illumination tests or vendor reports from preventative maintenance visits.
-
pattern: qa_qc\/illumination_report\/[^\/]+\.pdf
required: False
description: This file is a pdf from a vendor preventative maintenance visit or illumination check tool demonstrating illumination intensity.
Loading

0 comments on commit f2c40fd

Please sign in to comment.