mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-07 01:38:11 +08:00
layout change UI (#776)
* add layout to schema * add layout choice action and reducer * multi layout UI * update unit tests * add missing file * update test schema * fix duplicate test id * fix tabs * PR lint * fix pytest
This commit is contained in:
@@ -115,6 +115,7 @@ class ScanpyEngine(CXGDriver):
|
||||
"type": str(self.data.X.dtype),
|
||||
},
|
||||
"annotations": {"obs": [], "var": []},
|
||||
"layout": {"obs": []}
|
||||
}
|
||||
for ax in Axis:
|
||||
curr_axis = getattr(self.data, str(ax))
|
||||
@@ -140,6 +141,14 @@ class ScanpyEngine(CXGDriver):
|
||||
)
|
||||
self.schema["annotations"][ax].append(ann_schema)
|
||||
|
||||
for layout in self.config['layout']:
|
||||
layout_schema = {
|
||||
"name": layout,
|
||||
"type": "float32",
|
||||
"dims": [f"{layout}_0", f"{layout}_1"]
|
||||
}
|
||||
self.schema["layout"]["obs"].append(layout_schema)
|
||||
|
||||
def _load_data(self, data):
|
||||
# as of AnnData 0.6.19, backed mode performs initial load fast, but at the
|
||||
# cost of significantly slower access to X data.
|
||||
|
||||
Reference in New Issue
Block a user