CXG creator and dataset parameters (#1163)

* remove redundant call to make_response (lint)

* initial commit of H5AD to CXG converter

* lint

* PR review suggested comments

* cxg adaptor now understands group metadata

* lint
This commit is contained in:
Bruce Martin
2020-02-21 12:49:45 -07:00
committed by GitHub
parent 907cc634f5
commit d2bae0c4f6
6 changed files with 445 additions and 22 deletions
+2 -14
View File
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from server import __version__ as cellxgene_version
from os.path import basename, splitext
class AppFeature(object):
@@ -64,21 +63,10 @@ class AppConfig(object):
raise RuntimeError(f"unknown config parameter {k}.")
def get_title(self, data_adaptor):
if self.title:
return self.title
# TODO: find a place to stash the dataset title, such as a
# json file at the same location as the data matrix.
# for example, if the dataset is at abc.cxg then a file with
# the title and about info could be at abc.cxg.metadata.
# for now just return the basename
location = data_adaptor.get_location()
if location.endswith("/"):
location = location[:-1]
return splitext(basename(location))[0]
return self.title if self.title else data_adaptor.get_title()
def get_about(self, data_adaptor):
return self.about
return self.about if self.about else data_adaptor.get_about()
def get_config(self, data_adaptor, annotation=None):
+1 -1
View File
@@ -36,7 +36,7 @@ def schema_get(data_adaptor, annotations):
def config_get(app_config, data_adaptor, annotations):
config = app_config.get_config(data_adaptor, annotations)
return make_response(make_response(jsonify(config), HTTPStatus.OK))
return make_response(jsonify(config), HTTPStatus.OK)
def annotations_obs_get(request, data_adaptor, annotations):