Add tests for scanpy engine

This commit is contained in:
Charlotte Weaver
2018-07-16 11:48:53 -07:00
parent b8f501a46c
commit 05b9a6833d
2 changed files with 52 additions and 3 deletions
+3 -3
View File
@@ -61,11 +61,11 @@ class ScanpyEngine(CXGDriver):
else:
min_ = value["query"]["min"]
max_ = value["query"]["max"]
if min_:
if min_ is not None:
key_idx = np.array((getattr(self.data.obs, key) >= min_).data)
cell_idx = np.logical_and(cell_idx, key_idx)
if max_:
key_idx = np.array((getattr(self.data.obs, key) <= min_).data)
if max_ is not None:
key_idx = np.array((getattr(self.data.obs, key) <= max_).data)
cell_idx = np.logical_and(cell_idx, key_idx)
return self.data[cell_idx, :]