moved scanpy parser to scanpy class

This commit is contained in:
Charlotte Weaver
2018-08-07 16:37:02 -07:00
parent 0969854e9e
commit 499b9551f1
2 changed files with 13 additions and 3 deletions
@@ -23,6 +23,13 @@ class ScanpyEngine(CXGDriver):
def _set_cell_names(self):
self.data.obs["cell_name"] = list(self.data.obs.index)
@classmethod
def add_to_parser(cls, subparsers, invocation_function):
scanpy_group = subparsers.add_parser("scanpy", help="run cellxgene using the scanpy engine")
scanpy_group.add_argument("data_directory", metavar="dir", help="Directory containing data and schema file")
scanpy_group.set_defaults(func=invocation_function)
return scanpy_group
@staticmethod
def _load_data(data):
return sc.read(os.path.join(data, "data.h5ad"))