Skip to content
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

cellxgene-schema CLI must update validation for uns['spatial'] #1107

Open
brianraymor opened this issue Nov 14, 2024 · 0 comments
Open

cellxgene-schema CLI must update validation for uns['spatial'] #1107

brianraymor opened this issue Nov 14, 2024 · 0 comments
Labels
5.3 Next minor CELLxGENE schema version after 5.2 curation software

Comments

@brianraymor
Copy link
Contributor

Changelog

  • uns (Dataset Metadata)
    • Updated the requirements for spatial to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial['is_single'] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id]['images'] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id]['images']['fullres'] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id]['images']['hires'] to include descendants of Visium Spatial Gene Expression. Added requirements for Visium CytAssist Spatial Gene Expression, 11mm.
    • Updated the requirements for spatial[library_id]['scalefactors'] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id]['scalefactors']['spot_diameter_fullres'] to include descendants of Visium Spatial Gene Expression.
    • Updated the requirements for spatial[library_id]['scalefactors']['tissue_hires_scalef'] to include descendants of Visium Spatial Gene Expression.

Design

spatial

Key spatial
Annotator Curator MUST annotate if assay_ontology_term_id is descendant of "EFO:0010961" for Visium Spatial Gene Expression or "EFO:0030062" for Slide-seqV2; otherwise, this key MUST NOT be present.
Value dict. The requirements for the key-value pairs are documented in the following sections:
  • spatial['is_single']
  • spatial[library_id]
  • spatial[library_id]['images']
  • spatial[library_id]['images']['fullres']
  • spatial[library_id]['images']['hires']
  • spatial[library_id]['scalefactors']
  • spatial[library_id]['scalefactors']['spot_diameter_fullres']
  • spatial[library_id]['scalefactors']['tissue_hires_scalef']

Additional key-value pairs MUST NOT be present.

is_single

Key is_single
Annotator Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression or "EFO:0030062" for Slide-seqV2; otherwise, this key MUST NOT be present.
Value bool. This MUST be True:
  • if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and the dataset represents one Space Ranger output for a single tissue section
  • if assay_ontology_term_id is "EFO:0030062" for Slide-seqV2 and the dataset represents the output for a single array on a puck
Otherwise, this MUST be False.

spatial[library_id]

Key Identifier for the Visium library
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value dict. There MUST be only one library_id.

spatial[library_id]['images']

Key images
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value dict

spatial[library_id]['images']['fullres']

Key fullres
Annotation Curator MAY annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value The full resolution image MUST be converted to anumpy.ndarray with the following requirements:

  • The length of numpy.ndarray.shape MUST be 3
  • The numpy.ndarray.dtype MUST be numpy.uint8
  • The numpy.ndarray.shape[2] MUST be either 3 (RGB color model for example) or 4 (RGBA color model for example)

spatial[library_id]['images']['hires']

Key hires
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value tissue_hires_image.png MUST be converted to anumpy.ndarray with the following requirements:

  • The length of numpy.ndarray.shape MUST be 3
  • The numpy.ndarray.dtype MUST be numpy.uint8
  • If assay_ontology_term_id is "EFO:0022860" for Visium CytAssist Spatial Gene Expression, 11mm, the largest dimension in numpy.ndarray.shape[:2] MUST be 4000pixels; otherwise, the largest dimension in numpy.ndarray.shape[:2] MUST be 2000pixels. See Space Ranger Spatial Outputs
  • The numpy.ndarray.shape[2] MUST be either 3 (RGB color model for example) for 4 (RGBA color model for example)

spatial[library_id]['scalefactors']

Key scalefactors
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value dict

spatial[library_id]['scalefactors']['spot_diameter_fullres']

Key spot_diameter_fullres
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value float. This must be the value of the spot_diameter_fullres field from scalefactors_json.json. See Space Ranger Spatial Outputs.

spatial[library_id]['scalefactors']['tissue_hires_scalef']

Key tissue_hires_scalef
Annotation Curator MUST annotate if assay_ontology_term_id is a descendant of "EFO:0010961" for Visium Spatial Gene Expression and uns['spatial']['is_single'] is True; otherwise, this key MUST NOT be present.
Value float. This must be the value of the tissue_hires_scalef field from scalefactors_json.json. See Space Ranger Spatial Outputs.

@brianraymor brianraymor added curation software 5.3 Next minor CELLxGENE schema version after 5.2 labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.3 Next minor CELLxGENE schema version after 5.2 curation software
Projects
None yet
Development

No branches or pull requests

1 participant