-
Notifications
You must be signed in to change notification settings - Fork 67
Table spec proposal #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
4559ce5
c9148a7
d3330a2
957555f
f8f2fd0
83c9491
8d2d64e
d715323
98be5fa
bc72166
f4a13c6
ffdd046
0d5636e
1d59ca4
d91da64
4ad6a90
fac5855
e3f779c
75fb5e1
00e85c1
5d0b5b4
fe2cfad
692464f
cc83a82
b2de201
283d21b
bf81797
4b46882
f3e960b
ad48296
55fb1a8
337971b
e9f707b
22844a4
ea8a622
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -154,6 +154,108 @@ multiple levels of resolutions and optionally associated labels. | |||||
| │ ... # are supported. | ||||||
| └── n | ||||||
| ``` | ||||||
| Tables {#table-layout} | ||||||
| ---------------------- | ||||||
| The following describes the expected layout for tabular data. OME-NGFF tables are a compatible subset of the [AnnData model](https://github.com/theislab/anndata). OME-NGFF tables implement the X (central dense matrix), the obs table (annotations on the rows of X) and the var table (annotations on the columns of X). | ||||||
|
|
||||||
| ``` | ||||||
| . # Root folder, potentially in S3, | ||||||
| │ # with a flat list of images by image ID. | ||||||
|
will-moore marked this conversation as resolved.
Outdated
|
||||||
| │ | ||||||
| └── 123.zarr | ||||||
| └── table # The table group is a container which holds a table that is compatible with a subset of AnnData. | ||||||
|
kevinyamauchi marked this conversation as resolved.
Outdated
|
||||||
| │ # The table group MAY be in the root of the zarr file. | ||||||
| ├── .zgroup # The table group MAY be in an image, labels, or points group. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is really cool to see, and it'd be really important to have this flexibility of having tables both in root and in image/labels group.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Points haven't been defined yet. Also, I'm not completley sure what this means given the bioformats2raw layout and the fact we can now put the tables group on its own. Maybe we should remove this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I removed the references to points and changed it to say that the tables group may be in root or another group. |
||||||
| ├── .zattrs | ||||||
| │ | ||||||
| ├── X # You MAY add an zarr array `X`. | ||||||
| │ │ # `X` MUST not be a complex type (i.e., MUST be a single type) | ||||||
| │ │ # `X` MAY be chunked as the user desires. | ||||||
| │ ├── .zarray | ||||||
| │ ├── 0.0 | ||||||
| │ │ ... | ||||||
| │ └── n.m | ||||||
| │ | ||||||
| ├── obs # You MAY add an obs group container. The obs group holds a table of annotations on the rows in X. | ||||||
| │ │ # The rows in obs MUST be index-matched to the rows in X. | ||||||
| │ ├── .zgroup | ||||||
| │ │ | ||||||
| │ ├── .zattrs # `.zattrs` MUST contain `"_index"`, which is the name of the column in obs to be used as the index. | ||||||
| │ │ # `.zattrs` MUST contain `"column-order"`, which is a list of the order of the non-_index columns. | ||||||
| │ │ # `.zattrs` MAY contain `"encoding-type"`, which is set to `"dataframe"` by AnnData. | ||||||
| │ │ # `.zattrs` MAY contain `"encoding-version"`, which is set to `"0.1.0"` by AnnData. | ||||||
| │ │ | ||||||
| │ └── col_0 # Each column in the obs table is a 1D zarr array. The rows can be chunked as the user desires. | ||||||
|
kevinyamauchi marked this conversation as resolved.
Outdated
|
||||||
| │ ├── .zarray # However, the obs columns SHOULD be chunked in the same way as the rows in X (if present). | ||||||
| │ │ | ||||||
| │ └─ 0 | ||||||
| └── var # You MAY add a var group container. The var group holds a table of annotations on the columns in X. | ||||||
| │ # The rows in var MUST be index-matched to the columns in X (if present). | ||||||
| | | ||||||
| ├── .zattrs # `.zattrs` MUST contain `"_index"`, which is the name of the column in obs to be used as the index. | ||||||
| │ # `.zattrs` MUST contain `"column-order"`, which is a list of the order of the non-_index columns. | ||||||
| │ # `.zattrs` MAY contain `"encoding-type"`, which is set to `"dataframe"` by AnnData. | ||||||
| │ # `.zattrs` MAY contain `"encoding-version"`, which is set to `"0.1.0"` by AnnData. | ||||||
| │ | ||||||
| └── col_0 # Each column in the var table is a 1D zarr array. The rows can be chunked as the user desires. | ||||||
| ├── .zarray # However, the var columns SHOULD be chunked in the same way as the columns in X. | ||||||
| │ | ||||||
| └─ 0 | ||||||
| ``` | ||||||
|
|
||||||
| Points {#points-layout} | ||||||
| ----------------------- | ||||||
| The following describes the expected layout for point annotations in OME-NGFF. Point annotations are tables with some specified columns and layout. | ||||||
|
|
||||||
| ``` | ||||||
| . # Root folder, potentially in S3, | ||||||
| │ # with a flat list of images by image ID. | ||||||
| │ | ||||||
| └── 123.zarr | ||||||
| └── points # The points group is a container which holds a table that is compatible with a subset of AnnData. | ||||||
| │ # The points group MAY be in the root of the zarr file. | ||||||
| ├── .zgroup # The table group MAY be in an image or labels group. | ||||||
| ├── .zattrs | ||||||
| │ | ||||||
| ├── X # You MUST add an zarr array `X`. | ||||||
| │ │ # `X` MUST contain the coordinates for the points. | ||||||
| │ │ # `X` MAY contain data in addition to the coordinates. | ||||||
| │ │ # `X` MAY be chunked as the user desires. | ||||||
| │ ├── .zarray | ||||||
| │ ├── 0.0 | ||||||
| │ │ ... | ||||||
| │ └── n.m | ||||||
| │ | ||||||
| ├── obs # You MAY add an obs group container. The obs group holds a table of annotations for the points in X. | ||||||
| │ │ # The rows in obs MUST be index-matched to the rows in X. | ||||||
| │ │ | ||||||
| │ ├── .zgroup | ||||||
| │ │ | ||||||
| │ ├── .zattrs # `.zattrs` MUST contain `"_index"`, which is the name of the column in obs to be used as the index. | ||||||
| │ │ # `.zattrs` MUST contain `"column-order"`, which is a list of the order of the non-_index columns. | ||||||
| │ │ # `.zattrs` MAY contain `"encoding-type"`, which is set to `"dataframe"` by AnnData. | ||||||
| │ │ # `.zattrs` MAY contain `"encoding-version"`, which is set to `"0.1.0"` by AnnData. | ||||||
| │ │ | ||||||
| │ └── col_0 # Each column in the obs table is a 1D zarr array. The rows can be chunked as the user desires. | ||||||
| │ ├── .zarray # However, the obs columns SHOULD be chunked in the same way as the rows in X. | ||||||
| │ │ | ||||||
| │ └─ 0 | ||||||
| └── var # You MUST add a var group container. The var group holds a table of annotations on the columns in X. | ||||||
| | # The var group MUST contain a column called `column_name` that annotates what each column in X contains. | ||||||
|
kevinyamauchi marked this conversation as resolved.
Outdated
|
||||||
| | # The `column_name` column must annotate the columns in X containing coordinates with 0_p, 1_p, ..., n_p. | ||||||
| │ # The rows in var MUST be index-matched to the columns in X. | ||||||
| | | ||||||
| ├── .zattrs # `.zattrs` MUST contain `"_index"`, which is the name of the column in obs to be used as the index. | ||||||
| │ # `.zattrs` MUST contain `"column-order"`, which is a list of the order of the non-_index columns. | ||||||
| │ # `.zattrs` MAY contain `"encoding-type"`, which is set to `"dataframe"` by AnnData. | ||||||
| │ # `.zattrs` MAY contain `"encoding-version"`, which is set to `"0.1.0"` by AnnData. | ||||||
| │ | ||||||
| └── col_0 # Each column in the var table is a 1D zarr array. The rows can be chunked as the user desires. | ||||||
| ├── .zarray # However, the var columns SHOULD be chunked in the same way as the columns in X. | ||||||
| │ | ||||||
| └─ 0 | ||||||
| ``` | ||||||
|
|
||||||
|
|
||||||
| High-content screening {#hcs-layout} | ||||||
| ------------------------------------ | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.