Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cdci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: CICD Python Package

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the sphinx-apidoc command here also needed considering it's also done on the sphinx conf.py?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action just tests that the execution works. As the index.md expects some file under references, it is needed here.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test documentation building, and publish report to GitHub Pages
name: Docs and Report Examples

on:
push:
Expand All @@ -10,7 +10,7 @@ on:

jobs:
test:
name: Test
name: Test docs and report examples
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| Information | Links |
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Package** | [![PyPI Latest Release](https://img.shields.io/pypi/v/vuegen.svg)][vuegen-pypi] [![Conda Latest Release](https://img.shields.io/conda/v/bioconda/vuegen.svg)][vuegen-conda] [![Supported versions](https://img.shields.io/pypi/pyversions/vuegen.svg)][vuegen-pypi] [![Docker Repository on Quay](https://quay.io/repository/dtu_biosustain_dsp/vuegen/status "Docker Repository on Quay")][vuegen-docker-quay] [![License](https://img.shields.io/github/license/Multiomics-Analytics-Group/vuegen)][vuegen-license] |
| **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)][vuegen-docs] |
| **Documentation** | [![View - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=flat)][vuegen-docs] [![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) |
| **Build** | [![CI](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/cdci.yml/badge.svg)][ci-gh-action] [![Docs](https://github.com/Multiomics-Analytics-Group/vuegen/actions/workflows/docs.yml/badge.svg)][ci-docs] |
| **Examples** | [![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)][emp-html-demo] [![Streamlit](https://img.shields.io/badge/Streamlit-%23FE4B4B.svg?style=for-the-badge&logo=streamlit&logoColor=white)][emp-st-demo] |
| **Discuss on GitHub** | [![GitHub issues](https://img.shields.io/github/issues/Multiomics-Analytics-Group/vuegen)][issues] [![GitHub pull requests](https://img.shields.io/github/issues-pr/Multiomics-Analytics-Group/vuegen)][pulls] |
Expand Down
19 changes: 15 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
"sphinx.ext.intersphinx",
"sphinx_new_tab_link",
"myst_nb",
"sphinx_copybutton",
]

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

myst_enable_extensions = ["dollarmath", "amsmath"]
myst_enable_extensions = ["dollarmath", "amsmath", "colon_fence"]

# Plolty support through require javascript library
# https://myst-nb.readthedocs.io/en/latest/render/interactive.html#plotly
Expand Down Expand Up @@ -98,13 +99,13 @@
# https://github.com/executablebooks/MyST-NB/blob/master/docs/conf.py
# html_title = ""
html_theme = "sphinx_book_theme"
# html_logo = "_static/logo-wide.svg"
# html_favicon = "_static/logo-square.svg"
html_logo = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
html_favicon = "https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg"
html_theme_options = {
"github_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
"repository_url": "https://github.com/Multiomics-Analytics-Group/vuegen",
"repository_branch": "main",
"home_page_in_toc": True,
"home_page_in_toc": False,
"path_to_docs": "docs",
"show_navbar_depth": 1,
"use_edit_page_button": True,
Expand Down Expand Up @@ -136,7 +137,16 @@
PROJECT_ROOT = Path(__file__).parent.parent
PACKAGE_ROOT = PROJECT_ROOT / "src" / "vuegen"

def run_split_readme(_):
print("[conf.py] Splitting README.md into sections...")
from split_readme import process_readme

readme_path = PROJECT_ROOT / "README.md"
output_dir = PROJECT_ROOT / "docs" / "sections_readme"
process_readme(readme_path, output_dir)

def run_apidoc(_):
print("[conf.py] Running sphinx-apidoc...")
from sphinx.ext import apidoc

apidoc.main(
Expand All @@ -154,4 +164,5 @@ def run_apidoc(_):
)

def setup(app):
app.connect("builder-inited", run_split_readme)
app.connect("builder-inited", run_apidoc)
7 changes: 2 additions & 5 deletions docs/example_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Vuegen Case Study - View HTML Report
# Earth Microbiome Project Case Study - HTML and Streamlit Example Reports

The stable version of the current `html` report generated in the example notebook
using `vuegen` can be viewed at

[multiomics-analytics-group.github.io/vuegen/](https://multiomics-analytics-group.github.io/vuegen/)
The Earth Microbiome Project case study generated in the example notebook using `vuegen` is available online as [HTML](https://multiomics-analytics-group.github.io/vuegen/) and [Streamlit](https://earth-microbiome-vuegen-demo.streamlit.app/) reports.
23 changes: 19 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# Overview

<!-- https://myst-parser.readthedocs.io/en/latest/faq/index.html
#include-a-file-from-outside-the-docs-folder-like-readme-md -->

```{include} ../README.md
:start-line: 0
```{include} ./sections_readme/home_page.md
:caption: VueGen
:relative-docs: docs
:relative-images:
```

```{toctree}
:maxdepth: 1
:caption: Overview

sections_readme/about
sections_readme/installation
sections_readme/execution
sections_readme/gui
sections_readme/case_studies
sections_readme/web_app_deploy
sections_readme/citation
```

```{toctree}
:maxdepth: 2

Expand All @@ -20,8 +31,12 @@ vuegen_demo
:caption: Building a report

vuegen_basic_case_study
vuegen_basic_case_study_configfile
vuegen_case_study_earth_microbiome
vuegen_case_study_earth_microbiome_configfile
example_report
vuegen_APICall_configfile
vuegen_Chatbot_configfile
```

```{toctree}
Expand Down
17 changes: 17 additions & 0 deletions docs/sections_readme/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## About the project

**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**.

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.

An overview of the VueGen workflow is shown in the figure below:

![VueGen Abstract](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png)

Also, the class diagram for the project is presented below to illustrate the architecture and relationships between classes:

![VueGen Class Diagram](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_classdiagram_noattmeth.png)

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).

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.
58 changes: 58 additions & 0 deletions docs/sections_readme/case_studies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Case studies
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be that sphinx will complain about the headlines. Check the logs, but if you split up the README, you could remove one hashtag per headline...

That said, the website looks good, so no big issue


VueGen’s functionality is demonstrated through two case studies:

**1. Predefined Directory**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you want to add headlines here?


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.

🔗 [![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)

:::{NOTE}
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.
:::


**2. Earth Microbiome Project Data**

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.

🔗 [![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)

:::{NOTE}
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.
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.
:::


**3. ChatBot Component**

This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
enabling interactive conversations inside the report.

Two API modes are supported:

- **Ollama-style streaming chat completion**
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).
Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience.
This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`.

:::{TIP}
See [Ollama’s website](https://ollama.com/) for more details.
:::


- **Standard prompt-response API**
If no `model` is provided, VueGen uses a simpler prompt-response flow.
A single prompt is sent to an endpoint, and a structured JSON object is expected in return.
Currently, the response can include:
- `text`: the main textual reply
- `links`: a list of source URLs (optional)
- `HTML content`: an HTML snippet with a Pyvis network visualization (optional)

This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed
to support more flexible and general-purpose response formats in future releases.

:::{NOTE}
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.
:::
22 changes: 22 additions & 0 deletions docs/sections_readme/citation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Citation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it's everywhere in your dumps


If you use VueGen in your research or publications, please cite it as follows:

**APA:**

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

**BibTeX:**

```bibtex
@article{Ayala-Ruano2025VueGen,
author = {Ayala-Ruano, Sebastian and Webel, Henry and Santos, Alberto},
title = {VueGen: Automating the generation of scientific reports},
journal = {bioRxiv},
year = {2025},
doi = {10.1101/2025.03.05.641152},
publisher = {Cold Spring Harbor Laboratory},
url = {https://www.biorxiv.org/content/10.1101/2025.03.05.641152},
eprint = {https://www.biorxiv.org/content/10.1101/2025.03.05.641152.full.pdf}
}
```
5 changes: 5 additions & 0 deletions docs/sections_readme/credits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Credits and acknowledgements

- 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/).
- 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!
- 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).
77 changes: 77 additions & 0 deletions docs/sections_readme/execution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## Execution


:::{IMPORTANT}
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.
:::


Run VueGen using a directory with the following command:

```bash
vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
```

:::{NOTE}
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.
:::


### Folder structure

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).

Here is an example layout:
```
report_folder/
├── section1/
│ └── subsection1/
│ ├── table.csv
│ ├── image1.png
│ └── chart.json
├── section2/
│ ├── subsection1/
│ │ ├── summary_table.xls
│ │ └── network_plot.graphml
│ └── subsection2/
│ ├── report.html
│ └── summary.md
```

:::{WARNING}
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.
:::


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.
The order of sections, subsections, and components can be defined using numerical suffixes in folder and file names.

It's also possible to provide a configuration file instead of a directory:

```bash
vuegen --config docs/example_config_files/Earth_microbiome_vuegen_demo_notebook.yaml --report_type streamlit
```

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.

The current report types supported by VueGen are:

- Streamlit
- HTML
- PDF
- DOCX
- ODT
- Reveal.js
- PPTX
- Jupyter

### Running VueGen with Docker

Instead of installing VueGen locally, you can run it directly from a Docker container with the following command:

```bash
docker run --rm \
-v "$(pwd)/docs/example_data/Earth_microbiome_vuegen_demo_notebook:/home/appuser/Earth_microbiome_vuegen_demo_notebook" \
-v "$(pwd)/output_docker:/home/appuser/streamlit_report" \
quay.io/dtu_biosustain_dsp/vuegen:v0.3.2-docker --directory /home/appuser/Earth_microbiome_vuegen_demo_notebook --report_type streamlit
```
Loading