fractal-analytics-platform / fractal-faim-ipa

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

In plate .zattrs, only create the rows & columns that are present #6

Open jluethi opened 1 year ago

jluethi commented 1 year ago

e.g. when we only have well C01, we still get this plate .zarrs:

{
    "barcode": "example-barcode",
    "order_name": [
        "example-order"
    ],
    "plate": {
        "columns": [
            {
                "name": "1"
            },
            {
                "name": "2"
            },
            {
                "name": "3"
            },
            {
                "name": "4"
            },
            {
                "name": "5"
            },
            {
                "name": "6"
            },
            {
                "name": "7"
            },
            {
                "name": "8"
            },
            {
                "name": "9"
            },
            {
                "name": "10"
            },
            {
                "name": "11"
            },
            {
                "name": "12"
            }
        ],
        "field_count": 1,
        "name": "Test_ZMB_3D_new",
        "rows": [
            {
                "name": "A"
            },
            {
                "name": "B"
            },
            {
                "name": "C"
            },
            {
                "name": "D"
            },
            {
                "name": "E"
            },
            {
                "name": "F"
            },
            {
                "name": "G"
            },
            {
                "name": "H"
            }
        ],
        "version": "0.4",
        "wells": [
            {
                "columnIndex": 0,
                "path": "C/1",
                "rowIndex": 2
            }
        ]
    }
}
jluethi commented 1 year ago

Actually, according to the spec, this is correct:

The plate dictionary MUST contain a columns key whose value MUST be a list of JSON objects defining the columns of the plate. Each column object defines the properties of the column at the index of the object in the list. Each column in the physical plate MUST be defined, even if no wells in the column are defined. Each column object MUST contain a name key whose value is a string specifying the column name. The name MUST contain only alphanumeric characters, MUST be case-sensitive, and MUST NOT be a duplicate of any other name in the columns list. Care SHOULD be taken to avoid collisions on case-insensitive filesystems (e.g. avoid using both Aa and aA).

from: https://ngff.openmicroscopy.org/latest/index.html#plate-md

Unfortunately, the napari-ome-zarr plugin can be quite slow in plate mode when a plate with many wells that don't exist are loaded. Need to verify whether this is still an issue with the new async mode or just in the older installations