Add layout and diffexp calculations to cli options

This commit is contained in:
Charlotte Weaver
2018-08-03 10:12:55 -07:00
parent 499b9551f1
commit c2b3f331cf
2 changed files with 6 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ def run_scanpy(args):
)
from .scanpy_engine.scanpy_engine import ScanpyEngine
app.data = ScanpyEngine(args.data_directory, schema="data_schema.json")
data = ScanpyEngine(args.data_directory, schema="data_schema.json", graph_method=args.layout, diffexp_method=args.diffexp)
app.run(host="127.0.0.1", debug=True, port=args.port)

View File

@@ -26,6 +26,11 @@ class ScanpyEngine(CXGDriver):
@classmethod
def add_to_parser(cls, subparsers, invocation_function):
scanpy_group = subparsers.add_parser("scanpy", help="run cellxgene using the scanpy engine")
# TODO these choices should be generated from the actual available methods
scanpy_group.add_argument("-l", "--layout", choices=["umap", "tsne"], default="umap",
help="Algorithm to use for graph layout")
scanpy_group.add_argument("-d", "--diffexp", choices=["ttest"], default="ttest",
help="Algorithm to use to calculate differential expression")
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