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:
Bruce Martin
2018-10-16 15:49:40 -07:00
committed by GitHub
parent 6b0aafd27c
commit 76ec29734a
5 changed files with 142 additions and 11 deletions
+6 -2
View File
@@ -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):
+2 -2
View File
@@ -1,4 +1,4 @@
anndata==0.6.10
anndata==0.6.11
Flask==0.12.4
Flask-Caching==1.4.0
Flask-Compress==1.4.0
@@ -7,5 +7,5 @@ Flask-RESTful==0.3.6
flask-restful-swagger-2==0.35
numpy==1.14.5
pandas==0.23.1
scanpy==1.3.1
scanpy==1.3.2
scipy==1.1.0