mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-30 22:08:12 +08:00
Performance work (#334)
* range encode filter range lists * speed up data load * add comment on scanpy read params * update to latest scanpy/anndata * performance improvments in data loading * fix typo * work around scanpy bug * remove debugging print statements
This commit is contained in:
@@ -30,7 +30,7 @@ class ScanpyEngine(CXGDriver):
|
||||
self.cell_count = self.data.shape[0]
|
||||
self.gene_count = self.data.shape[1]
|
||||
self._create_schema()
|
||||
self.layout(None)
|
||||
self.layout({})
|
||||
|
||||
def _create_schema(self):
|
||||
self.schema = {
|
||||
@@ -78,7 +78,11 @@ class ScanpyEngine(CXGDriver):
|
||||
|
||||
@staticmethod
|
||||
def _load_data(data):
|
||||
return sc.read(os.path.join(data, "data.h5ad"))
|
||||
# See https://scanpy.readthedocs.io/en/latest/api/scanpy.api.read.html
|
||||
# Based upon this advice, setting cache=True parameter
|
||||
# Note: as of current scanpy/anndata release, setting backed='r' will
|
||||
# result in an error.
|
||||
return sc.read(os.path.join(data, "data.h5ad"), cache=True)
|
||||
|
||||
@staticmethod
|
||||
def _top_sort(values, sort_order, top_n=None):
|
||||
|
||||
Reference in New Issue
Block a user