chanzuckerberg / single-cell-explorer

Hosted version of cellxgene
MIT License
11 stars 2 forks source link

User Story 1: Spatial Mode BE #733

Closed tihuan closed 6 months ago

tihuan commented 8 months ago

Context: User Story 1: As a data consumer, I want to view my gene expression data (scatterplot) overlaid with a microscopy image so that I can put my observations into biological context.

DoD:

  1. Process schema 4.2 conforming spatial dataset and work with FE on object shape
  2. Be aware that schema 4.2 will only have 1 new key for spatial, but in FE, we need to add 3 spatial embedding modes in the UI. So we'll likely need BE to help expand the embedding options from 1 in the schema to 3 in the API response, and grab the corresponding data from the schema for FE to consume
  3. UPDATE (2/21): Let's use JPEG instead of PNG this ticket comment has the JPEG code diff

NOTES:

  1. Note from BrianR Slack - From obsm['spatial']: For each available underlay image in uns['spatial'][library_id]['images'], CELLxGENE Explorer MUST add a corresponding item to its Embedding Choice selector and appropriately scale the embedding: CELLxGENE Explore MUST add a selector item named "spatial_HighRes_Map" and MUST scale the full resolution embedding by the value of uns['spatial'][library_id]['scalefactors']['tissue_hires_scalef']. If uns['spatial'][library_id]['images']['fullres'] is present, then CELLxGENE Explorer MUST add a selector item named "spatial_FullRes_Map" and MUST NOT scale the full resolution embedding. If "spatial" is set as the default_embedding, then Explorer MUST present "spatial_HighRes_Map" as the default.
tihuan commented 8 months ago

Hey team! Please add your planning poker estimate with Zenhub @kaloster @seve

tihuan commented 8 months ago

Hey @kaloster I added an extra DoD item to use JPEG instead of PNG 🙏 The JPEG code is in this ticket comment:

https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/gh/chanzuckerberg/single-cell-explorer/726

Hopefully it's easy to use in Explorer repo!

Thank you 😊

tihuan commented 6 months ago

e2e test in https://github.com/chanzuckerberg/single-cell-explorer/pull/854