Skip to content

Commit 6390a78

Browse files
committed
✨ Add script to split README into sections and update config and index docs with generated md files
1 parent ec43047 commit 6390a78

File tree

12 files changed

+420
-8
lines changed

12 files changed

+420
-8
lines changed

docs/conf.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@
3838
"sphinx.ext.intersphinx",
3939
"sphinx_new_tab_link",
4040
"myst_nb",
41+
"sphinx_copybutton",
4142
]
4243

4344
# https://myst-nb.readthedocs.io/en/latest/computation/execute.html
4445
nb_execution_mode = "auto"
4546

46-
myst_enable_extensions = ["dollarmath", "amsmath"]
47+
myst_enable_extensions = ["dollarmath", "amsmath", "colon_fence"]
4748

4849
# Plolty support through require javascript library
4950
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
@@ -98,13 +99,13 @@
9899
# https://github.com/executablebooks/MyST-NB/blob/master/docs/conf.py
99100
# html_title = ""
100101
html_theme = "sphinx_book_theme"
101-
# html_logo = "_static/logo-wide.svg"
102-
# html_favicon = "_static/logo-square.svg"
102+
html_logo = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
103+
html_favicon = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
103104
html_theme_options = {
104105
"github_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
105106
"repository_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
106107
"repository_branch": "main",
107-
"home_page_in_toc": True,
108+
"home_page_in_toc": False,
108109
"path_to_docs": "docs",
109110
"show_navbar_depth": 1,
110111
"use_edit_page_button": True,

docs/index.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1-
# Overview
2-
31
<!-- https://myst-parser.readthedocs.io/en/latest/faq/index.html
42
#include-a-file-from-outside-the-docs-folder-like-readme-md -->
53

6-
```{include} ../README.md
7-
:start-line: 0
4+
```{include} ./sections_readme/home_page.md
5+
:caption: VueGen
86
:relative-docs: docs
97
:relative-images:
108
```
119

10+
```{toctree}
11+
:maxdepth: 1
12+
:caption: Overview
13+
14+
sections_readme/about
15+
sections_readme/installation
16+
sections_readme/execution
17+
sections_readme/gui
18+
sections_readme/case_studies
19+
sections_readme/web_app_deploy
20+
sections_readme/citation
21+
```
22+
1223
```{toctree}
1324
:maxdepth: 2
1425

docs/sections_readme/about.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## About the project
2+
3+
**VueGen** is a tool that automates the creation of **reports** from bioinformatics outputs, allowing researchers with minimal coding experience to communicate their results effectively. With VueGen, users can produce reports by simply specifying a directory containing output files, such as plots, tables, networks, Markdown text, HTML components, and API calls, along with the report format. Supported formats include **documents** (PDF, HTML, DOCX, ODT), **presentations** (PPTX, Reveal.js), **Jupyter notebooks**, and [Streamlit](https://streamlit.io/) **web applications**.
4+
5+
A YAML configuration file is generated from the directory to define the structure of the report. Users can customize the report by modifying the configuration file, or they can create their own configuration file instead of passing a directory as input. The configuration file specifies the structure of the report, including sections, subsections, and various components such as plots, dataframes, markdown, html, and API calls.
6+
7+
An overview of the VueGen workflow is shown in the figure below:
8+
9+
![VueGen Abstract](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png)
10+
11+
Also, the class diagram for the project is presented below to illustrate the architecture and relationships between classes:
12+
13+
![VueGen Class Diagram](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_noattmeth.png)
14+
15+
An extended version of the class diagram with attributes and methods is available [here](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_withattmeth.pdf).
16+
17+
The VueGen documentation is available at [vuegen.readthedocs.io](https://vuegen.readthedocs.io/), where you can find detailed information of the package’s classes and functions, installation and execution instructions, and case studies to demonstrate its functionality.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Case studies
2+
3+
VueGen’s functionality is demonstrated through two case studies:
4+
5+
**1. Predefined Directory**
6+
7+
This introductory case study uses a predefined directory with plots, dataframes, Markdown, and HTML components. Users can generate reports in different formats and modify the configuration file to customize the report structure.
8+
9+
🔗 [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_basic_case_study.ipynb)
10+
11+
:::{NOTE}
12+
The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml) is available in the `docs/example_config_files` folder, and the [directory](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Basic_example_vuegen_demo_notebook) with example data is in the `docs/example_data` folder.
13+
:::
14+
15+
16+
**2. Earth Microbiome Project Data**
17+
18+
This advanced case study demonstrates the application of VueGen in a real-world scenario using data from the [Earth Microbiome Project (EMP)](https://earthmicrobiome.org/). The EMP is an initiative to characterize global microbial taxonomic and functional diversity. The notebook process the EMP data, create plots, dataframes, and other components, and organize outputs within a directory to produce reports. Report content and structure can be adapted by modifying the configuration file. Each report consists of sections on exploratory data analysis, metagenomics, and network analysis.
19+
20+
🔗 [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_case_study_earth_microbiome.ipynb)
21+
22+
:::{NOTE}
23+
The EMP case study is available online as [HTML](https://multiomics-analytics-group.github.io/vuegen/) and [Streamlit](https://earth-microbiome-vuegen-demo.streamlit.app/) reports.
24+
The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config) is available in the `docs/example_config_files` folder, and the [directory](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook) with example data is in the `docs/example_data` folder.
25+
:::
26+
27+
28+
**3. ChatBot Component**
29+
30+
This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
31+
enabling interactive conversations inside the report.
32+
33+
Two API modes are supported:
34+
35+
- **Ollama-style streaming chat completion**
36+
If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint](https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion).
37+
Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience.
38+
This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`.
39+
40+
:::{TIP}
41+
See [Ollama’s website](https://ollama.com/) for more details.
42+
:::
43+
44+
45+
- **Standard prompt-response API**
46+
If no `model` is provided, VueGen uses a simpler prompt-response flow.
47+
A single prompt is sent to an endpoint, and a structured JSON object is expected in return.
48+
Currently, the response can include:
49+
- `text`: the main textual reply
50+
- `links`: a list of source URLs (optional)
51+
- `HTML content`: an HTML snippet with a Pyvis network visualization (optional)
52+
53+
This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed
54+
to support more flexible and general-purpose response formats in future releases.
55+
56+
:::{NOTE}
57+
You can see a [configuration file example](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Chatbot_example_config.yaml) for the chatbot component in the `docs/example_config_files` folder.
58+
:::

docs/sections_readme/citation.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Citation
2+
3+
If you use VueGen in your research or publications, please cite it as follows:
4+
5+
**APA:**
6+
7+
Ayala-Ruano, S., Webel, H., & Santos, A. (2025). _VueGen: Automating the generation of scientific reports_. bioRxiv. https://doi.org/10.1101/2025.03.05.641152
8+
9+
**BibTeX:**
10+
11+
```bibtex
12+
@article{Ayala-Ruano2025VueGen,
13+
author = {Ayala-Ruano, Sebastian and Webel, Henry and Santos, Alberto},
14+
title = {VueGen: Automating the generation of scientific reports},
15+
journal = {bioRxiv},
16+
year = {2025},
17+
doi = {10.1101/2025.03.05.641152},
18+
publisher = {Cold Spring Harbor Laboratory},
19+
url = {https://www.biorxiv.org/content/10.1101/2025.03.05.641152},
20+
eprint = {https://www.biorxiv.org/content/10.1101/2025.03.05.641152.full.pdf}
21+
}
22+
```

docs/sections_readme/credits.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Credits and acknowledgements
2+
3+
- VueGen was developed by the [Multiomics Network Analytics Group (MoNA)](https://multiomics-analytics-group.github.io/) at the [Novo Nordisk Foundation Center for Biosustainability (DTU Biosustain)](https://www.biosustain.dtu.dk/).
4+
- VueGen relies on the work of numerous open-source projects like [Streamlit](streamlit), [Quarto](https://quarto.org/), and others. A big thank you to their authors for making this possible!
5+
- The vuegen logo was designed based on an image created by [Scriberia](https://www.scriberia.co.uk/) for The [Turing Way Community](https://github.com/the-turing-way/the-turing-way), which is shared under a CC-BY licence. The original image can be found at [Zenodo](https://zenodo.org/records/3695300).

docs/sections_readme/execution.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Execution
2+
3+
4+
:::{IMPORTANT}
5+
Here we use the `Earth_microbiome_vuegen_demo_notebook` [directory](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook) and the `Earth_microbiome_vuegen_demo_notebook.yaml` [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config) as examples, which are available in the `docs/example_data` and `docs/example_config_files` folders, respectively. Make sure to clone this reposiotry to access these contents, or use your own directory and configuration file.
6+
:::
7+
8+
9+
Run VueGen using a directory with the following command:
10+
11+
```bash
12+
vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
13+
```
14+
15+
:::{NOTE}
16+
By default, the `streamlit_autorun` argument is set to False, but you can use it in case you want to automatically run the streamlit app.
17+
:::
18+
19+
20+
### Folder structure
21+
22+
Your input directory must follow a **nested folder structure**, where first-level folders are treated as **sections** and second-level folders as **subsections**, containing the components (plots, tables, networks, Markdown text, and HTML files).
23+
24+
Here is an example layout:
25+
```
26+
report_folder/
27+
├── section1/
28+
│ └── subsection1/
29+
│ ├── table.csv
30+
│ ├── image1.png
31+
│ └── chart.json
32+
├── section2/
33+
│ ├── subsection1/
34+
│ │ ├── summary_table.xls
35+
│ │ └── network_plot.graphml
36+
│ └── subsection2/
37+
│ ├── report.html
38+
│ └── summary.md
39+
```
40+
41+
:::{WARNING}
42+
VueGen currently requires each section to contain at least one subsection folder. Defining only sections (with no subsections) or using deeper nesting levels (i.e., sub-subsections) will result in errors. In upcoming releases, we plan to support more flexible directory structures.
43+
:::
44+
45+
46+
The titles for sections, subsections, and components are extracted from the corresponding folder and file names, and afterward, users can add descriptions, captions, and other details to the configuration file. Component types are inferred from the file extensions and names.
47+
The order of sections, subsections, and components can be defined using numerical suffixes in folder and file names.
48+
49+
It's also possible to provide a configuration file instead of a directory:
50+
51+
```bash
52+
vuegen --config docs/example_config_files/Earth_microbiome_vuegen_demo_notebook.yaml --report_type streamlit
53+
```
54+
55+
If a configuration file is given, users can specify titles and descriptions for sections and subsections, as well as component paths and required attributes, such as file format and delimiter for dataframes, plot types, and other details.
56+
57+
The current report types supported by VueGen are:
58+
59+
- Streamlit
60+
- HTML
61+
- PDF
62+
- DOCX
63+
- ODT
64+
- Reveal.js
65+
- PPTX
66+
- Jupyter
67+
68+
### Running VueGen with Docker
69+
70+
Instead of installing VueGen locally, you can run it directly from a Docker container with the following command:
71+
72+
```bash
73+
docker run --rm \
74+
-v "$(pwd)/docs/example_data/Earth_microbiome_vuegen_demo_notebook:/home/appuser/Earth_microbiome_vuegen_demo_notebook" \
75+
-v "$(pwd)/output_docker:/home/appuser/streamlit_report" \
76+
quay.io/dtu_biosustain_dsp/vuegen:v0.3.2-docker --directory /home/appuser/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
77+
```

docs/sections_readme/gui.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## GUI
2+
3+
### Local GUI
4+
5+
We have a simple GUI for VueGen that can be run locally or through a standalone executable.
6+
For now you will need to have a copy of this repository.
7+
8+
```bash
9+
pip install '.[gui]'
10+
cd gui
11+
python app.py
12+
```
13+
14+
### Bundled GUI
15+
16+
The **bundle GUI** with the VueGen package is available under the
17+
[latest releases](https://github.com/Multiomics-Analytics-Group/vuegen/releases/latest).
18+
You will need to unzip the file and run `vuegen_gui` in the unpacked main folder.
19+
Most dependencies are included into the bundle using PyInstaller.
20+
21+
Streamlit works out of the box as a purely Python based package. For `html` creation you will have to
22+
have a Python 3.12 installation with the `jupyter` package installed as `quarto` needs to start
23+
a kernel for execution. This is also true if you install `quarto` globally on your machine.
24+
25+
We recommend using miniforge to install Python and the conda package manager:
26+
27+
- [conda-forge.org/download/](https://conda-forge.org/download/)
28+
29+
We continous our example assuming you have installed the `miniforge` distribution for your
30+
machine (MacOS with arm64/ apple silicon or x86_64/ intel or Windows x86_64). Also download
31+
the [latest `vuegen_gui` bundle](https://github.com/Multiomics-Analytics-Group/vuegen/releases/latest)
32+
from the releases page according to your operating system.
33+
34+
```bash
35+
conda create -n vuegen_gui -c conda-forge python=3.12 jupyter
36+
conda info -e # find environment location
37+
```
38+
39+
Find the vuegen_gui path for your local `user`.
40+
41+
On **MacOS** you need to add a `bin` to the path:
42+
43+
```bash
44+
/Users/user/miniforge3/envs/vuegen_gui/bin
45+
```
46+
47+
On **Windows** you can use the path as displayed by `conda info -e`:
48+
49+
> Note: On Windows a base installation of miniforge with `jupyter` might work as well as
50+
> the app can see your entire Path which is not the case on MacOS.
51+
52+
```bash
53+
C:\Users\user\miniforge3\envs\vuegen_gui
54+
```
55+
56+
More information regarding the app and builds can be found in the
57+
[GUI README](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/gui/README.md).

docs/sections_readme/home_page.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## ![VueGen Logo](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg)
2+
3+
<p align="center">
4+
VueGen is a Python package that automates the creation of scientific reports.
5+
</p>
6+
7+
| Information | Links |
8+
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9+
| **Package** | [![PyPI Latest Release](https://img.shields.io/pypi/v/vuegen.svg)](https://pypi.org/project/vuegen/) [![Conda Latest Release](https://img.shields.io/conda/v/bioconda/vuegen.svg)](https://anaconda.org/bioconda/vuegen) [![Supported versions](https://img.shields.io/pypi/pyversions/vuegen.svg)](https://pypi.org/project/vuegen/) [![Docker Repository on Quay](https://quay.io/repository/dtu_biosustain_dsp/vuegen/status "Docker Repository on Quay")](https://quay.io/repository/dtu_biosustain_dsp/vuegen) [![License](https://img.shields.io/github/license/Multiomics-Analytics-Group/vuegen)](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/LICENSE) |
10+
| **Documentation** | [![made-with-sphinx-doc](https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/) ![Docs](https://readthedocs.org/projects/vuegen/badge/?style=flat) [![View - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=flat)](https://vuegen.readthedocs.io/) |
11+
| **Build** | [![CI](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml/badge.svg)](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml) [![Docs](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml/badge.svg)](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml) |
12+
| **Examples** | [![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)](https://multiomics-analytics-group.github.io/vuegen/) [![Streamlit](https://img.shields.io/badge/Streamlit-%23FE4B4B.svg?style=for-the-badge&logo=streamlit&logoColor=white)](https://earth-microbiome-vuegen-demo.streamlit.app/) |
13+
| **Discuss on GitHub** | [![GitHub issues](https://img.shields.io/github/issues/Multiomics-Analytics-Group/vuegen)](https://github.com/Multiomics-Analytics-Group/vuegen/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/Multiomics-Analytics-Group/vuegen)](https://github.com/Multiomics-Analytics-Group/vuegen/pulls) |
14+
| **Cite** | [![DOI:10.1101/2025.03.05.641152](https://img.shields.io/badge/DOI-10.1101/2025.03.05.641152-B31B1B.svg)](https://doi.org/10.1101/2025.03.05.641152) |

0 commit comments

Comments
 (0)