adex 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. adex-0.1.0.dist-info/METADATA +136 -0
  2. adex-0.1.0.dist-info/RECORD +71 -0
  3. adex-0.1.0.dist-info/WHEEL +5 -0
  4. adex-0.1.0.dist-info/entry_points.txt +3 -0
  5. adex-0.1.0.dist-info/top_level.txt +9 -0
  6. app.py +88 -0
  7. assets/__init__.py +0 -0
  8. assets/css/dbc.min.css +131 -0
  9. assets/css/layout.css +245 -0
  10. assets/css/markdown.css +113 -0
  11. assets/css/sidebar.css +59 -0
  12. assets/css/startup_modal.css +13 -0
  13. assets/images/AI_lens_black.svg +8 -0
  14. assets/images/AI_lens_white.svg +8 -0
  15. assets/images/AI_medium_white.svg +25 -0
  16. assets/images/aifi-white-logo.png +0 -0
  17. assets/images/aifi-white-text.png +0 -0
  18. assets/images/aifi_logo.png +0 -0
  19. assets/images/screenshot.png +0 -0
  20. assets/images/template.png +0 -0
  21. assets/markdown/covariate-help.md +7 -0
  22. assets/markdown/help_page.md +3 -0
  23. assets/markdown/startup_modal.md +3 -0
  24. assets/markdown/template_help_page.md +40 -0
  25. assets/markdown/template_startup_modal.md +7 -0
  26. callbacks/__init__.py +0 -0
  27. callbacks/create_deg_callbacks.py +1451 -0
  28. components/__init__.py +0 -0
  29. components/create_deg_components.py +499 -0
  30. config/__init__.py +0 -0
  31. config/gmt/c2.all.v2026.1.Hs.json.gz +0 -0
  32. config/gmt/h.all.v2026.1.Hs.json.gz +0 -0
  33. config/gmt/msigdb-all-pathways.json.gz +0 -0
  34. config/template.json +80 -0
  35. preprocess.py +54 -0
  36. preprocessors/__init__.py +0 -0
  37. preprocessors/deseq2.py +144 -0
  38. preprocessors/gsea.py +187 -0
  39. preprocessors/pseudobulk.py +84 -0
  40. src/__init__.py +0 -0
  41. src/app/__init__.py +5 -0
  42. src/app/components/ConfigSingleton.py +124 -0
  43. src/app/components/GenePanel.py +174 -0
  44. src/app/components/RadioButtons.py +35 -0
  45. src/app/components/StartupModal.py +58 -0
  46. src/app/components/__init__.py +10 -0
  47. src/app/components/app_header.py +304 -0
  48. src/app/components/app_help.py +96 -0
  49. src/app/components/app_settings.py +77 -0
  50. src/app/components/dropdown.py +39 -0
  51. src/app/plots/BoxPlot.py +210 -0
  52. src/app/plots/DegSummariesPlot.py +118 -0
  53. src/app/plots/HeatmapAIO.py +276 -0
  54. src/app/plots/MAPlot.py +133 -0
  55. src/app/plots/Volcano.py +152 -0
  56. src/app/plots/__init__.py +7 -0
  57. src/app/utils.py +381 -0
  58. src/app/version.py +11 -0
  59. src/cli.py +10 -0
  60. src/deploy.py +110 -0
  61. src/mediators/GeneSelectionMediator.py +54 -0
  62. src/mediators/PathwaySelectionMediator.py +101 -0
  63. src/mediators/__init__.py +0 -0
  64. src/readers/DegByCovariatesReader.py +171 -0
  65. src/readers/Deseq2Readers.py +175 -0
  66. src/readers/PseudoBulkLoader.py +166 -0
  67. src/readers/__init__.py +0 -0
  68. src/utils.py +616 -0
  69. src/version.py +5 -0
  70. ui/__init__.py +0 -0
  71. ui/create_deg_layout.py +436 -0
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: ADEX
3
+ Version: 0.1.0
4
+ Summary: Allen Differential results EXplorer
5
+ Requires-Python: >=3.13
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: dash[compress]==3.1.0
8
+ Requires-Dist: dash-ag-grid>=35.3.0
9
+ Requires-Dist: dash-bootstrap-components==2.0.4
10
+ Requires-Dist: dash-iconify==0.1.2
11
+ Requires-Dist: jsonschema>=4.26.0
12
+ Requires-Dist: mygene==3.2.2
13
+ Requires-Dist: numpy>=2.0.0
14
+ Requires-Dist: polars>=2.1.0
15
+
16
+ ### sc-deg-explorer
17
+
18
+ A [Plotly Dash](https://dash.plotly.com/) web application for interactively exploring **Differentially Expressed Genes (DEGs)** from single-cell RNA sequencing experiments. Its reusable Dash components and plots are included in the ADEX package, which provides a configurable, dataset-agnostic interface that can be pointed at new datasets simply by swapping a JSON configuration file — no code changes required.
19
+
20
+ ---
21
+
22
+ ### Table of Contents
23
+
24
+ 1. [Purpose](#purpose)
25
+ 2. [Expected inputs](#expected-inputs)
26
+ 3. [Example output](#example-output)
27
+ 3. [Usage](#usage)
28
+ 4. [Configuration](#configuration)
29
+
30
+ ---
31
+
32
+ ### Purpose
33
+ sc-deg-explorer is designed to make DEG results from single-cell pseudobulk analyses immediately accessible to wet-lab and computational scientists alike. After running a DESeq2-based differential expression pipeline, users can point this app at the output files and interactively:
34
+
35
+ - **Explore DEGs** through interactive volcano plots, MA plots, and per-covariate DEG views.
36
+ - **Investigate gene expression** for any selected gene using pseudo-bulk box plots stratified by donor, condition, or cell type.
37
+ - **Analyze pathway enrichment** results via GSEA volcano plots and pathway selection dropdowns.
38
+ - **Filter by cell type and experimental covariates** (e.g., day, treatment, cytokine) using sidebar dropdowns that dynamically update all plots.
39
+ - **Browse gene panels** to quickly navigate to genes of interest.
40
+
41
+ The app is designed to be deployed as an internal data portal, enabling research teams to rapidly iterate on hypotheses without writing additional analysis code.
42
+
43
+ ---
44
+
45
+ ### Expected inputs
46
+
47
+ The major inputs to the program are:
48
+
49
+ <details open>
50
+ <summary><strong>1. [Required]: Configuration file</strong></summary>
51
+ Manually fill the configuration file <strong>config/template.json</strong> with project-specific details.
52
+ </details>
53
+
54
+ <details open>
55
+ <summary><strong>2. [Required]: Differential results from tools like DESeq2</strong></summary>
56
+ An example dataset can be found in the file <strong>input-data-examples/deseq2.xlsx</strong>. Make sure to format the data in csv.gz.
57
+ </details>
58
+
59
+ <details>
60
+ <summary><strong>3. [Optional]: Enrichment results from GSEA</strong></summary>
61
+ An example dataset can be found in the file <strong>input-data-examples/fGSEA.xlsx</strong>. Make sure to format the data in tsv.gz.
62
+ </details>
63
+
64
+ > <u>Note on input data format</u>: The overall intention of the input data format is to use a set of columns to specify important combinations of independent variables, which will demarcate several DE tests into one file. These covariate columns **must** be present and match across every input data type.
65
+
66
+ > <u>Note on specifying covariates</u>: While there are instructions in the config file, this small piece of information is important to get right: **the order of covariates written in the config file matters**. The first covariate should reflect the group that appears on the right side of a volcano plot, and the second covariate is the left side of a volcano plot. Additional covariates can be specified without further constraints.
67
+
68
+ ---
69
+
70
+ ### Expected output files
71
+
72
+ The pipeline produces Parquet files that are scanned, selected, filtered, and collected to be served to the user's front-end.
73
+
74
+ ```
75
+ results/
76
+ ├── deg
77
+ │ ├── adjp.parquet
78
+ │ ├── deg.parquet
79
+ │ ├── log2fc.parquet
80
+ │ ├── means.parquet
81
+ │ ├── meta.parquet
82
+ │ ├── summaries.parquet
83
+ │ ├── t-adjp.parquet
84
+ │ └── t-log2fc.parquet
85
+ └── gsea
86
+ ├── results.parquet
87
+ ├── meta.parquet
88
+ ├── summaries.parquet
89
+ ...
90
+ ```
91
+
92
+ ---
93
+
94
+ ### Usage
95
+
96
+ Install ADEX with pip (Python 3.13 or newer), then run the commands from the
97
+ directory containing your project configuration and input data:
98
+
99
+ ```bash
100
+ # Install ADEX
101
+ python -m pip install git+https://github.com/aifimmunology/sc-deg-explorer.git
102
+
103
+ # Prepare config/template.json with project-specific settings and data paths.
104
+
105
+ # Preprocess differential results
106
+ adex-preprocess --config config/template.json
107
+
108
+ # Start the dashboard
109
+ adex-app --config config/template.json
110
+ ```
111
+
112
+ For development from a source checkout, install the Pixi environment with
113
+ `pixi install --frozen`, then run:
114
+
115
+ ```bash
116
+ pixi run python preprocess.py --config config/template.json
117
+ pixi run python app.py --config config/template.json
118
+ ```
119
+
120
+ ---
121
+
122
+ ### Example Output
123
+ The following screenshot is an example of a working app. After starting the app, it can be accessed via the following URL: `http://0.0.0.0:8050/`
124
+
125
+ ![MA Plot](assets/images/screenshot.png)
126
+
127
+ ---
128
+
129
+ ### Test build with Docker
130
+ Local builds with Docker can be helpful before deploying to a remote server for production.
131
+ ```bash
132
+ docker build --platform=linux/arm64/v8 -t rheumatoid-arthritis . # 'rheumatoid-arthritis' can be any string
133
+ docker run -p 8050:8050 rheumatoid-arthritis
134
+ ```
135
+
136
+ The app will be available at `http://localhost:8050`.
@@ -0,0 +1,71 @@
1
+ app.py,sha256=l6mVtLuyU1No29F9h6KDEM1Itm2c7ComCp1enUCPkAE,2832
2
+ preprocess.py,sha256=HbtdrRD1VC2005uybkJaqjv7RDxbqPVLZcpd55zVw_Y,1610
3
+ assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ assets/css/dbc.min.css,sha256=YpeMHO9EXMxdYS0Fgv2v_WsnO9MkOhz7q0PUltlZHfg,11434
5
+ assets/css/layout.css,sha256=EsPdqHeA3j29p0IDOa7ITdC6c8yORorhaE8ovj3DJ_g,5312
6
+ assets/css/markdown.css,sha256=EELI3iO3oTVLh7NPzlOCNtX5T70f8X8TAZGbhA13uoM,2799
7
+ assets/css/sidebar.css,sha256=OtZDD5WsL8sbZVYMoop7AqalXMBlrhTEybGG2ij4fZU,1418
8
+ assets/css/startup_modal.css,sha256=pdBXvxX-qN_Aj56xJrNyLOjShOo-cmDbbCBD4FYmW3w,154
9
+ assets/images/AI_lens_black.svg,sha256=v4RFWL8wCAwT5fqFvEiWrQAh2q0nhdfuv0YAIO6e-6Q,1059
10
+ assets/images/AI_lens_white.svg,sha256=feunKo5E0R1zBYzPL40Ei6r8V_ccYEGr7qnDhHa7Mkw,1071
11
+ assets/images/AI_medium_white.svg,sha256=02777hll8R9iQLiKckO2nynTs8qDbMZyB4yUKlaluwg,6662
12
+ assets/images/aifi-white-logo.png,sha256=wLmYRkso5hSyJPA5ttxQE84Ayb7pd0uNTvB3LzoXk-A,5541
13
+ assets/images/aifi-white-text.png,sha256=Hv91dwgKqHkG1RScIeQsr1Fl_ZB6Hc_OCJAPhwQsnkU,10494
14
+ assets/images/aifi_logo.png,sha256=cgjJGsEV55Y7Gqhfmdn6bbMBevQwCVXr2Bb9-fpf5VM,4332
15
+ assets/images/screenshot.png,sha256=2v3w4eVeN_4OGrRqKLDujHnSncj8iXnPx-IEpb8NYng,1012788
16
+ assets/images/template.png,sha256=DEvXS6K2Fklbckj5qJtY46ifY8jO-qOA3u4vguU4kOI,196746
17
+ assets/markdown/covariate-help.md,sha256=Q3E8cMVrY_Lh9VV1cn2y2irqiHdBomVpNvJxzzEp0sE,260
18
+ assets/markdown/help_page.md,sha256=-hW_EyscWUGj41lfEh4AXxh7lZ4WMTLkjILt4xxMCic,98
19
+ assets/markdown/startup_modal.md,sha256=EKtnJd-AqhJ6VftqzclC-Br7HXQsu2MJNQ7ISi63tgI,137
20
+ assets/markdown/template_help_page.md,sha256=9FkIcWhO467NHl11T6SaDO4yzIUJJISKJeJZ9FreHqQ,2155
21
+ assets/markdown/template_startup_modal.md,sha256=nqRTbV2Fo8BiupdM84aRud0XXT3kcms9urZMv-nFYNA,598
22
+ callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ callbacks/create_deg_callbacks.py,sha256=-aUbUYkXmsk6sQVkcO8B99BJbN3_lefLTwzDXjtSYZs,58428
24
+ components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ components/create_deg_components.py,sha256=wmOw0qnqyKVDsIbJtMFjnoJJcHMx4_qVhd3G-HNZFXY,20098
26
+ config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
+ config/template.json,sha256=KPpE6AZV0GgbPJBEk6ehjLEVZj02fvvbuqIO8HVKPq0,3249
28
+ config/gmt/c2.all.v2026.1.Hs.json.gz,sha256=q047R6T8axfMHEsfAqbshSrrI2IaZcr477vYsBGhxas,2014160
29
+ config/gmt/h.all.v2026.1.Hs.json.gz,sha256=ZSN09fGGDoFRA2NY7g6OTYf8O58yhSY7fuyTqxD15GI,23330
30
+ config/gmt/msigdb-all-pathways.json.gz,sha256=TMcN6fcCUMlo6dfpFpZXUWBZNLyfix8pBkbtr2iScSI,2123880
31
+ preprocessors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
+ preprocessors/deseq2.py,sha256=i0zJCj3cec_RGtendrNtOviBQexRCdClkOi5l_ynKxU,5652
33
+ preprocessors/gsea.py,sha256=jfjNuu9BKw0yPHzA_rzgDXgF-loOZNJtjrQTwJArIwY,8630
34
+ preprocessors/pseudobulk.py,sha256=8xAgQKc_-bTkTYaaIvj41XUGGgI05RwRCzXMWEFHiVc,3119
35
+ src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ src/cli.py,sha256=kf9ng3qVRUSQ12Utw07PhBa5d45WxLo5qIAEEkZn81c,347
37
+ src/deploy.py,sha256=Luyd60iewvS7RgWTtl0nVtbmmEt4LubkTt_M-jsFso8,3490
38
+ src/utils.py,sha256=D2Ax6e4FabbFnBySLTcSVo6opWpcCFnTSZj6RX4NCKw,20747
39
+ src/version.py,sha256=tANwesJXhP5tA_k-aHt2X4lyN52W6oi6IPVrrkC5Uhw,159
40
+ src/app/__init__.py,sha256=xIvXN4n9NDCxpEb3FnqFySP8KDtv2vTCqM7Dd7K6hYE,213
41
+ src/app/utils.py,sha256=FvysJxEvRTs0g01GLOTh1dFH7M-lrGzLMPbtsVX8pow,10786
42
+ src/app/version.py,sha256=Okh2ytt1bWxaQ6B7y6-Nj3-0pdknxxV_BtvP_z0lOug,407
43
+ src/app/components/ConfigSingleton.py,sha256=IwGZxq04SxaGr-gcEDicKaxFHH_ejHqLvOWOf2QCU_Y,4736
44
+ src/app/components/GenePanel.py,sha256=zhqq_GsA5BOw2AKSG8894dgVIT2WprxZRFfqqtjigFE,5859
45
+ src/app/components/RadioButtons.py,sha256=3lPThdfOoYP12uufvV_ewkYUL_Bjqmr7Mz7Qjf-E9Mo,922
46
+ src/app/components/StartupModal.py,sha256=oCTLhs6DBb9sMQku8PpXPMgLIK03v6jH4K8h1R8q9Ww,1729
47
+ src/app/components/__init__.py,sha256=zueQrESJqAkjjIcOcKWDSPXWt6zArznJ8skPnY7Tiwg,425
48
+ src/app/components/app_header.py,sha256=-twgjYKHLx2jzjxJjQyN5MeEXwrCPEMyYzJiRKakj-A,11817
49
+ src/app/components/app_help.py,sha256=YcWUDheI2gSk9jx3NC68xhATd71-zxOO-21z5syKpCU,2692
50
+ src/app/components/app_settings.py,sha256=eRQsLZGp1rDXjhJwFpLU-_6SUa6LQWPTPjJX2yfvOUY,2328
51
+ src/app/components/dropdown.py,sha256=3N88wY7EOklfJbl7jXnBfAQTui-NQ6uZdHyDW5RDGSE,1028
52
+ src/app/plots/BoxPlot.py,sha256=33Adviq2KX3Ok4LcwD1gjeVqaiVCZGLidl3NOLr88sY,8791
53
+ src/app/plots/DegSummariesPlot.py,sha256=HYKxjswc0Tb6851Aiw1CxXT_6SRGcDCwrlpYo4NvpKo,3323
54
+ src/app/plots/HeatmapAIO.py,sha256=L1jyNOh6zQPmEWjk_MrZCyNvyrgQlHIX245gxQ2v5QY,8423
55
+ src/app/plots/MAPlot.py,sha256=pk15ZzwuSqHHn9cahJJuWR86M19Hue_rumaHXDvRFww,3701
56
+ src/app/plots/Volcano.py,sha256=ru3Us2rjRb8qcuEzRNoY_T6CqzR5qRQOMZzXHkG2Gtc,4168
57
+ src/app/plots/__init__.py,sha256=gz7TXh3gf10a11H1UG1ujJekh8xNA_cHmi7SmPowFA0,253
58
+ src/mediators/GeneSelectionMediator.py,sha256=zSC13j-V1o9zb1aRflb-Y-QMV-sYNprGoOfHtVZ6lh4,2155
59
+ src/mediators/PathwaySelectionMediator.py,sha256=nLgsLr3TvHM_m20rLfoGNAVgn15kN-h4h-qWvlzTF2g,4476
60
+ src/mediators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
+ src/readers/DegByCovariatesReader.py,sha256=CvbbjG_Asx6sifI-7lCLE0q7cjyKbQ0Q2eFct2p15yE,7625
62
+ src/readers/Deseq2Readers.py,sha256=mifP9BCTL4DYKmFNSkXmhnktmAWU5MxB009btHt48W4,7868
63
+ src/readers/PseudoBulkLoader.py,sha256=lv6guXImogrQ5e1ci8jEzfTHlcUhdAV2aO3bFVRu_bY,11306
64
+ src/readers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
+ ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
+ ui/create_deg_layout.py,sha256=1YZNzl5xFHc-cmiZrHxYdVt0wNkSJqYN5RFl1kfAGAQ,16750
67
+ adex-0.1.0.dist-info/METADATA,sha256=LpXISFpMR2b8iiQftiZ6HqA52rkdGSmrXaWl8e4_dT8,5382
68
+ adex-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
69
+ adex-0.1.0.dist-info/entry_points.txt,sha256=78Pb4yKJG9N7YYDAISq2BI4315e3xoBfV31jHFs2Xf0,72
70
+ adex-0.1.0.dist-info/top_level.txt,sha256=0liEKzVdIkRFpb0rgA1mYmNgv-gQ6RR613f9_Hh30y4,71
71
+ adex-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ adex-app = app:main
3
+ adex-preprocess = preprocess:main
@@ -0,0 +1,9 @@
1
+ app
2
+ assets
3
+ callbacks
4
+ components
5
+ config
6
+ preprocess
7
+ preprocessors
8
+ src
9
+ ui
app.py ADDED
@@ -0,0 +1,88 @@
1
+ """
2
+ app.py is a template for Allen Institute members to quickly,
3
+ efficiently, and uniformly develop Dash apps
4
+ """
5
+
6
+ import argparse
7
+ from pathlib import Path
8
+
9
+ from dash import Dash
10
+ from preprocess import GLOBAL_DELIMITER
11
+
12
+ import assets
13
+ import src.app as adm
14
+
15
+ from components.create_deg_components import create_deg_components
16
+ from ui.create_deg_layout import create_deg_layout
17
+ from callbacks.create_deg_callbacks import create_deg_callbacks
18
+ from src.cli import default_config_path
19
+
20
+
21
+ STYLESHEETS = [
22
+ "https://storage.googleapis.com/aifi-static-assets/hise-style.css",
23
+ "https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css",
24
+ "/assets/css/dbc.min.css",
25
+ "/assets/css/sidebar.css",
26
+ "/assets/css/markdown.css",
27
+ "/assets/css/startup_modal.css",
28
+ "/assets/css/layout.css",
29
+ ]
30
+
31
+
32
+ def resolve_packaged_markdown_paths(modules: object, assets_dir: Path) -> None:
33
+ for markdown_key in ("help_page_content", "startup_modal_content", "covariate_help"):
34
+ markdown_file = getattr(modules, markdown_key, None)
35
+ if not isinstance(markdown_file, str) or not markdown_file:
36
+ continue
37
+
38
+ markdown_path = Path(markdown_file)
39
+ if not markdown_path.is_absolute() and not markdown_path.is_file():
40
+ packaged_path = assets_dir.parent / markdown_path
41
+ if packaged_path.is_file():
42
+ setattr(modules, markdown_key, str(packaged_path))
43
+
44
+
45
+ def main() -> None:
46
+ parser = argparse.ArgumentParser(
47
+ description=(
48
+ "Run the ADEX dashboard. By default, uses config/template.json "
49
+ "from the current directory, or the packaged template if absent."
50
+ )
51
+ )
52
+ parser.add_argument("-c", "--config", help="Path to an ADEX-compatible JSON configuration file.")
53
+ parser.add_argument("-s", "--schema", help="Path to a JSON schema to validate configuration against.")
54
+ args = parser.parse_args()
55
+
56
+ assets_dir = Path(assets.__file__).resolve().parent
57
+ config = adm.ConfigSingleton(
58
+ config_file=args.config or str(default_config_path()),
59
+ schema_file=args.schema,
60
+ )
61
+ resolve_packaged_markdown_paths(config.app.modules, assets_dir)
62
+
63
+ app = Dash(
64
+ name=config.app.app_title,
65
+ external_stylesheets=STYLESHEETS,
66
+ assets_folder=str(assets_dir),
67
+ update_title="",
68
+ compress=True,
69
+ )
70
+ app._favicon = "images/AI_lens_black.svg"
71
+
72
+ deg_components = create_deg_components(config, delimiter=GLOBAL_DELIMITER)
73
+ app.layout = create_deg_layout(
74
+ config,
75
+ components=deg_components,
76
+ delimiter=GLOBAL_DELIMITER,
77
+ )
78
+ create_deg_callbacks(
79
+ config,
80
+ components=deg_components,
81
+ delimiter=GLOBAL_DELIMITER,
82
+ )
83
+
84
+ app.run(host="0.0.0.0", port=8050, debug=False)
85
+
86
+
87
+ if __name__ == "__main__":
88
+ main()
assets/__init__.py ADDED
File without changes
assets/css/dbc.min.css ADDED
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Minified by jsDelivr using clean-css v5.3.3.
3
+ * Original file: /gh/AnnMarieW/dash-bootstrap-templates@master/dbc.css
4
+ *
5
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
+ */
7
+ .dbc-ag-grid .ag-theme-alpine{
8
+ --ag-alpine-active-color:var(--bs-primary);
9
+ --ag-selected-row-background-color:rgba(var(--bs-primary-rgb), 0.3);
10
+ --ag-row-hover-color:rgba(var(--bs-primary-rgb), 0.1);
11
+ --ag-column-hover-color:rgba(var(--bs-primary-rgb), 0.1);
12
+ --ag-input-focus-border-color:rgba(var(--bs-primary-rgb), 0.4);
13
+ --ag-range-selection-background-color:rgba(var(--bs-primary-rgb), 0.2);
14
+ --ag-range-selection-background-color-2:rgba(var(--bs-primary-rgb), 0.36);
15
+ --ag-range-selection-background-color-3:rgba(var(--bs-primary-rgb), 0.49);
16
+ --ag-range-selection-background-color-4:rgba(var(--bs-primary-rgb), 0.59);
17
+ --ag-background-color:var(--bs-body-bg);
18
+ --ag-foreground-color:var(--bs-body-color);
19
+ --ag-border-color:rgba(173,181,189, 0.40);
20
+ --ag-border-radius: 5px;
21
+ --ag-cell-horizontal-border:rgba(173,181,189, 0.20);
22
+ --ag-secondary-border-color:rgba(173,181,189, 0.20);
23
+ --ag-header-background-color:rgba(173,181,189, 0.20);
24
+ --ag-odd-row-background-color:rgba(173,181,189, 0.05);
25
+ --ag-control-panel-background-color:var(--bs-body-bg);
26
+ --ag-subheader-background-color:var(--bs-body-bg);
27
+ --ag-invalid-color:var(--bs-form-invalid-color);
28
+ --ag-font-family:var(--bs-font-family);
29
+ --ag-tooltip-background-color:var(--bs-body-bg)}.dbc .Select-control{background-color:var(--bs-body-bg)!important;
30
+ border:var(--bs-border-width) solid var(--bs-border-color)!important;
31
+ border-radius:var(--bs-border-radius)}.dbc .Select-value-label{color:var(--bs-body-color)!important}.dbc .Select input{color:var(--bs-body-color)}.dbc .Select-placeholder{color:var(--bs-secondary-color)!important;
32
+ background-color:var(--bs-body-bg)!important}.dbc .VirtualizedSelectOption{background-color:var(--bs-body-bg);
33
+ color:var(--bs-body-color)}.dbc .VirtualizedSelectFocusedOption{background-color:rgba(100,100,100,.2);
34
+ color:#000}.dbc .is-focused:not(.is-open)>.Select-control{border-color:var(--bs-primary)!important;
35
+ box-shadow:0 0 0 var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.dbc .Select--multi .Select-value{color:var(--bs-body-color);
36
+ background-color:rgba(var(--bs-primary-rgb),.2);
37
+ border-color:rgba(var(--bs-primary-rgb),.6)!important}.Select-menu-outer{border:var(--bs-border-width) solid var(--bs-border-color)}.dbc textarea{background-color:var(--bs-body-bg)!important;
38
+ color:var(--bs-body-color)!important;
39
+ border:var(--bs-border-width) solid var(--bs-border-color)!important}.dbc input:not([type=radio]):not([type=checkbox]){color:var(--bs-body-color)!important;
40
+ background-color:var(--bs-body-bg)!important}.dbc input::placeholder{color:var(--bs-secondary-color)!important;
41
+ background-color:var(--bs-body-bg)!important}.dbc .dash-table-container .row{display:block!important;
42
+ margin:0}.dbc .Select-menu-outer{display:block!important}.dash-table-container .dropdown{position:static}.dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table{--accent:var(--bs-primary)!important;
43
+ --hover:none!important;
44
+ font-family:var(--bs-font-sans-serif)}.dbc input.dash-filter--case--sensitive{border-color:var(--bs-primary)!important;
45
+ border-radius:3px;
46
+ border-style:solid;
47
+ border-width:2px;
48
+ color:var(--bs-primary)!important}.dbc .last-page:hover,.first-page:hover,.next-page:hover,.previous-page:hover{color:var(--bs-primary)!important}body .dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td{background-color:var(--bs-body-bg);
49
+ color:var(--bs-body-color);
50
+ border:var(--bs-border-width) solid var(--bs-border-color)!important}body .dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th{background-color:var(--bs-body-bg);
51
+ color:var(--bs-body-color);
52
+ border:var(--bs-border-width) solid var(--bs-border-color)!important}.dbc .dash-spreadsheet .dash-filter{font-family:var(--bs-font-family-sans-serif);
53
+ background-color:var(--bs-body-bg);
54
+ color:var(--bs-body-color);
55
+ --border:var(--bs-gray)}.dbc .dash-table-tooltip{background-color:var(--bs-gray-500)!important;
56
+ color:var(--bs-body-color);
57
+ width:fit-content;
58
+ max-width:300px;
59
+ min-width:unset}.dbc .dash-table-container .previous-next-container .page-number .current-page-container .current-page-shadow{background-color:transparent;
60
+ color:var(--bs-body-color)!important}.dbc .dash-table-container .previous-next-container .page-number .current-page-container input.current-page{background-color:transparent}.dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table{border-collapse:inherit;
61
+ border-spacing:unset}.dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td.focused{background-color:rgba(var(--bs-primary-rgb),.2)!important;
62
+ outline:1px solid var(--bs-primary)}.dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner input:not([type=radio]):not([type=checkbox]){background-color:transparent!important}.dbc .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td.cell--selected{background-color:rgba(var(--bs-primary-rgb),.2)!important}.dbc .dash-table-container .dash-spreadsheet .Select-menu-outer{background-color:var(--bs-gray-500);
63
+ border-color:rgba(100,100,100,.4)}.dbc .dash-table-container .dash-spreadsheet .Select-option:hover{background-color:rgba(var(--bs-gray-500),.4)}.dbc .dash-table-container .dash-spreadsheet .Select-option{background-color:rgba(var(--bs-gray-500),.4)}.dbc .rc-slider-track{background-color:var(--bs-primary-rgb)}.dbc .rc-slider-handle{border:solid 1px var(--bs-primary);
64
+ background-color:var(--bs-body-bg)}.dbc .rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging{border-color:var(--bs-primary);
65
+ box-shadow:0 0 0 var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.dbc .rc-slider-handle-click-focused:focus{border-color:var(--bs-primary);
66
+ box-shadow:unset}.dbc .rc-slider-handle:hover{border-color:rgba(var(--bs-primary-rgb),.25)}.dbc .rc-slider-handle:active{border-color:rgba(var(--bs-primary-rgb),.25);
67
+ box-shadow:0 0 0 var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.dbc .rc-slider-dot-active{border-color:var(--bs-primary)}.dbc .rc-slider-tooltip-inner{background-color:var(--bs-secondary);
68
+ border-radius:var(--bs-border-radius)}.dbc .SingleDatePickerInput__withBorder{border:var(--bs-border-width) solid var(--bs-border-color)!important;
69
+ background-color:transparent!important}.dbc .DateInput_input__focused{border-bottom:1px solid rgba(100,100,100,.4)!important}.dbc .DateRangePickerInput__withBorder{border:var(--bs-border-width) solid var(--bs-border-color)!important}.dbc .DateInput_fangStroke{stroke:rgba(100,100,100,0.4);
70
+ fill:transparent}.dbc .DateRangePickerInput{background-color:var(--bs-body-bg)}.dbc .DateRangePickerInput_arrow{background-color:var(--bs-body-bg)}.dbc .DateRangePickerInput_arrow svg{fill:var(--bs-body-color)!important}.dbc .DateInput_fangShape{fill:var(--bs-body-bg)}.dbc .DateInput_input{background-color:var(--bs-body-bg);
71
+ font-family:var(--bs-body-font-family);
72
+ line-height:34px!important;
73
+ padding:0 10px!important}.dbc .DayPicker{background-color:var(--bs-body-bg)}.dbc .DayPickerNavigation_button{border:var(--bs-border-width) solid var(--bs-border-color)!important;
74
+ background-color:transparent}.dbc .CalendarMonth_caption{color:var(--bs-body-color) font-weight: bold}.dbc date-picker-range{background-color:var(--bs-body-bg)}.dbc .CalendarMonthGrid{background-color:var(--bs-body-bg)}.dbc .CalendarMonth{background-color:var(--bs-body-bg)}.dbc .CalendarDay__default{color:var(--bs-body-color);
75
+ border:var(--bs-border-width) solid var(--bs-border-color)!important;
76
+ background-color:var(--bs-body-bg)}.dbc .CalendarDay__default:hover{background:rgba(var(--bs-primary-rgb),.3);
77
+ color:#fff}.dbc .CalendarDay__selected{background:var(--bs-primary);
78
+ border:1px var(--bs-primary);
79
+ color:#fff}.dbc .CalendarDay__selected:hover{background:var(--bs-primary);
80
+ border:1px var(--bs-primary);
81
+ color:#fff}.dbc .CalendarDay__blocked_out_of_range{opacity:.5}.dbc .CalendarDay__hovered_span{background:rgba(var(--bs-primary-rgb),.2);
82
+ color:#fff}.dbc .CalendarDay__hovered_span:hover{background:rgba(var(--bs-primary-rgb),.2);
83
+ color:#fff}.dbc .CalendarDay__selected_span{background:var(--bs-primary);
84
+ color:#fff}.dbc .DayPickerKeyboardShortcuts__show{display:none}.dbc .DayPickerKeyboardShortcuts_show__bottomRight{display:none}.dbc .form-control{color:var(--bs-body-color)}.dbc h1,.h1,.h2,.h3,.h4,.h5,.h6,h2,h3,h4,h5,h6{font-family:inherit}.offcanvas-header .btn-close{background-color:rgba(var(--bs-primary-rgb),.2)!important}.dbc pre code.hljs{display:block;
85
+ overflow-x:auto;
86
+ padding:1em}code.hljs{padding:3px 5px}/*!
87
+ Theme: GitHub Dark Dimmed
88
+ Description: Dark dimmed theme as seen on github.com
89
+ Author: github.com
90
+ Maintainer: @Hirse
91
+ Updated: 2021-05-15
92
+ Colors taken from GitHub's CSS
93
+ */
94
+ .dbc .hljs{color:#adbac7;
95
+ background:#22272e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#f47067}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#dcbdfb}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#6cb6ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#96d0ff}.hljs-built_in,.hljs-symbol{color:#f69d50}.hljs-code,.hljs-comment,.hljs-formula{color:#768390}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#8ddb8c}.hljs-subst{color:#adbac7}.hljs-section{color:#316dca;
96
+ font-weight:700}.hljs-bullet{color:#eac55f}.hljs-emphasis{color:#adbac7;
97
+ font-style:italic}.hljs-strong{color:#adbac7;
98
+ font-weight:700}.hljs-addition{color:#b4f1b4;
99
+ background-color:#1b4721}.hljs-deletion{color:#ffd8d3;
100
+ background-color:#78191b}.dbc .tab{border:var(--bs-border-width) solid var(--bs-border-color)!important;
101
+ background-color:var(--bs-body-bg)!important;
102
+ color:var(--bs-body-body)!important}.dbc .tab--selected{border-top:4px solid rgba(var(--bs-primary-rgb),.5)!important;
103
+ background-color:var(--bs-body-bg)!important;
104
+ color:var(--bs-body-body)!important}.dbc-row-selectable input[type=checkbox],.dbc-row-selectable input[type=radio]{border:var(--bs-border-width) solid var(--bs-border-color)!important;
105
+ color:var(--bs-body-color);
106
+ font-weight:700;
107
+ background-color:inherit;
108
+ width:1em;
109
+ height:1em;
110
+ outline:0;
111
+ padding:0;
112
+ float:left;
113
+ -webkit-appearance:none;
114
+ -moz-appearance:none;
115
+ margin-right:5px}.dbc-row-selectable input[type=radio]{border-radius:50%;
116
+ position:relative}.dbc-row-selectable input[type=radio]:checked:before{content:"";
117
+ background-color:var(--bs-primary);
118
+ float:left;
119
+ height:100%;
120
+ width:100%;
121
+ position:absolute;
122
+ transform:scale(.65);
123
+ border-radius:50%;
124
+ -webkit-border-radius:50%;
125
+ -moz-border-radius:50%}.dbc-row-selectable input[type=checkbox]:checked:before{content:"✓";
126
+ float:left;
127
+ width:1em;
128
+ height:1em;
129
+ line-height:1em;
130
+ text-align:center}
131
+ /*# sourceMappingURL=/sm/24eceaca56387bdb3f787b802bbf09fb57a750397aef3febb74979b162c8c486.map */