add --obs-names and --var-names CLI params (#371)

* add --obs-names and --var-names CLI params

* fix lint

* performance improvements in scanpy engine

* fix lint

* fix typo

* correctly handle sparse formats in diffexp

* fix diffexp and 1d slicing

* diffexp uses t-stat, not pval; clean up arg handling

* make _slice a static method

* revise scanpy tests to match new API
This commit is contained in:
Bruce Martin
2018-10-30 14:07:38 -07:00
committed by GitHub
parent 01369801fc
commit b181751493
7 changed files with 133 additions and 88 deletions
+3 -2
View File
@@ -104,6 +104,8 @@ cellxgene is a local web application for exploring single cell expression.
launch_group.add_argument("--debug", action="store_true", help=argparse.SUPPRESS)
launch_group.add_argument("--no-open", help="do not launch the webbrowser", action="store_false",
dest="open_browser")
launch_group.add_argument("--obs-names", help="Annotation name to use as unique, human-readable observation name")
launch_group.add_argument("--var-names", help="Annotation name to use as unique, human-readable variable name")
launch_group.add_argument(
"--max-category-items",
type=whole_number,
@@ -141,8 +143,7 @@ def run_scanpy(args):
log.setLevel(logging.ERROR)
from .scanpy_engine.scanpy_engine import ScanpyEngine
print(f"Loading data from {args.data} (this may take a while)")
app.data = ScanpyEngine(args.data, layout_method=args.layout, diffexp_method=args.diffexp,
max_category_items=args.max_category_items)
app.data = ScanpyEngine(args.data, args)
print(f"Launching cellxgene")
if args.open_browser:
webbrowser.open(cellxgene_url)