diff --git a/.gitignore b/.gitignore index d2143e4..68bc17f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ __pycache__/ *.py[cod] *$py.class -# Test data -data - # C extensions *.so diff --git a/app.py b/app.py index 6372e53..31dfa10 100644 --- a/app.py +++ b/app.py @@ -1,27 +1,21 @@ from shiny import App, reactive, ui import scanpy as sc -import os import pickle -import scHPL +import json from composition import composition_server, composition_ui from export import export_ui, export_server from dgea.dgea import dgea_server, dgea_ui from tree import tree_server, tree_ui -with open("data/input.txt") as f: - file_list = f.readlines() - filename = "data/" + file_list[0].strip() - treename = "data/" + file_list[1].strip() - name = file_list[2].strip() +with open("data/config.json") as f: + config = json.load(f) + adata = sc.read_h5ad("data/" + config["adata"]) + tree = pickle.load(open("data/" + config["tree"], "rb")) + name = config["name"] - -adata = sc.read_h5ad(filename) categorical_columns = adata.obs.select_dtypes(include="category").columns.to_list() -tree = pickle.load(open(treename, "rb")) - - app_ui = ui.page_navbar( ui.nav_panel("Composition analysis", composition_ui("composition") diff --git a/data/config.json b/data/config.json new file mode 100644 index 0000000..f5d0142 --- /dev/null +++ b/data/config.json @@ -0,0 +1,5 @@ +{ + "adata": "merged.h5ad", + "tree": "scarches.tree.pkl", + "name": "possible_atlas" +} \ No newline at end of file diff --git a/data/input.txt b/data/input.txt deleted file mode 100644 index badd1aa..0000000 --- a/data/input.txt +++ /dev/null @@ -1,3 +0,0 @@ -merged.h5ad -scarches.tree.pkl -possible_atlas \ No newline at end of file diff --git a/data/scarches.tree.pkl b/data/scarches.tree.pkl new file mode 100644 index 0000000..da201a8 Binary files /dev/null and b/data/scarches.tree.pkl differ