diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index f15e1c1..aa458b3 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -1,4 +1,4 @@ -name: Python package +name: CICD Python Package on: push: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c5ac1a2..5c4016b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Test documentation building, and publish report to GitHub Pages +name: Docs and Report Examples on: push: @@ -10,7 +10,7 @@ on: jobs: test: - name: Test + name: Test docs and report examples runs-on: ubuntu-latest strategy: matrix: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa9149e..9b99ab2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,16 +27,17 @@ you to share any suggestions or observations you have about this project. Here are the ways you can submit your suggestions and contribute to the project: -1. **Reporting Issues or Suggesting Improvements:** If you have a [GitHub][github] account - (or are willing to [open one][github-join]) but are unfamiliar with Git, you can report - bugs or suggest improvements by [creating an issue][new-issue]. This GitHub feature allows - for discussion threads on reported issues and proposed enhancements. +### 1. Reporting Issues or Suggesting Improvements -2. **Submitting Changes via Pull Requests:** If you are comfortable using Git and would like to - add or modify a functionality, you can submit a **pull request (PR)**. Instructions on how to contribute this way are provided in the next section. +If you have a [GitHub][github] account (or are willing to [open one][github-join]) but are unfamiliar with Git, you can report bugs or suggest improvements by [creating an issue][new-issue]. This GitHub feature allows for discussion threads on reported issues and proposed enhancements. -3. **Providing Feedback via Email:** If you don’t have a GitHub account and are - unfamiliar with Git, you can send feedback via email to [asaru@dtu.dk][contact]. However, using GitHub is preferred, as it allows us to respond more quickly and track discussions openly. +### 2. Submitting Changes via Pull Requests + +If you are comfortable using Git and would like to add or modify a functionality, you can submit a **pull request (PR)**. Instructions on how to contribute this way are provided in the next section. + +### 3. Providing Feedback via Email + +If you don’t have a GitHub account and are unfamiliar with Git, you can send feedback via email to [asaru@dtu.dk][contact]. However, using GitHub is preferred, as it allows us to respond more quickly and track discussions openly. > [!NOTE] > The documentation for [Git][git-docs] and [GitHub][github-docs] are easy to follow, and you can learn the basics using their official guides. diff --git a/README.md b/README.md index ced3b21..66f7f3a 100644 --- a/README.md +++ b/README.md @@ -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] | @@ -98,7 +98,7 @@ If you prefer not to install VueGen on your system, a pre-configured Docker cont ### Nextflow and nf-core -VueGen is also available as a [nf-core][nfcore] module, customised for compatibility with the [Nextflow][nextflow] environment. This module is designed to automate report generation from outputs produced by other modules, subworkflows, or pipelines. The code and documentation for the nf-core module are available in the [nf-VueGen repository][nf-vuegen]. +VueGen is also available as a [nf-core][nfcore] module, customised for compatibility with the [Nextflow][nextflow] environment. This module is designed to automate report generation from outputs produced by other modules, subworkflows, or pipelines. You can read the offical documentation for the nf-core module [here](nf-vuegen-nf-core). Also, the source code and detailed documentation are available in the [nf-VueGen repository][nf-vuegen]. ## Execution @@ -238,7 +238,7 @@ More information regarding the app and builds can be found in the VueGen’s functionality is demonstrated through two case studies: -**1. Predefined Directory** +### 1. Predefined Directory 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. @@ -247,7 +247,7 @@ This introductory case study uses a predefined directory with plots, dataframes, > [!NOTE] > The [configuration file][predef-dir-config] is available in the `docs/example_config_files` folder, and the [directory][predef-dir] with example data is in the `docs/example_data` folder. -**2. Earth Microbiome Project Data** +### 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)][emp]. 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. @@ -257,10 +257,12 @@ This advanced case study demonstrates the application of VueGen in a real-world > The EMP case study is available online as [HTML][emp-html-demo] and [Streamlit][emp-st-demo] reports. > The [configuration file][emp-config] is available in the `docs/example_config_files` folder, and the [directory][emp-dir] with example data is in the `docs/example_data` folder. -**3. ChatBot Component** +### 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. This component is streamlit-specific and is not +available for other report types. -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: @@ -290,9 +292,17 @@ to support more flexible and general-purpose response formats in future releases Once a Streamlit report is generated, it can be deployed as a web application to make it accessible online. There are multiple ways to achieve this: -- **Streamlit Community Cloud**: Deploy your report easily using [Streamlit Cloud][st-cloud], as demonstrated in the [EMP VueGen Demo][emp-st-demo]. The process involves moving the necessary scripts, data, and a requirements.txt file into a GitHub repository. Then, the app can be deployed via the Streamlit Cloud interface. The deployment example is available in the `streamlit-report-example` branch. -- **Standalone Executables**: Convert your Streamlit application into a desktop app by packaging it as an executable file for different operating systems. A detailed explanation of this process can be found in this [Streamlit forum post][st-forum-exe]. -- **Stlite**: Run Streamlit apps directly in the browser with [stlite][stlite], a WebAssembly port of Streamlit powered by Pyodide, eliminating the need for a server. It also allows packaging apps as standalone desktop executables using stlite desktop. +### Streamlit Community Cloud + +Deploy your report easily using [Streamlit Cloud][st-cloud], as demonstrated in the [EMP VueGen Demo][emp-st-demo]. The process involves moving the necessary scripts, data, and a requirements.txt file into a GitHub repository. Then, the app can be deployed via the Streamlit Cloud interface. The deployment example is available in the `streamlit-report-example` branch. + +### Standalone Executables + +Convert your Streamlit application into a desktop app by packaging it as an executable file for different operating systems. A detailed explanation of this process can be found in this [Streamlit forum post][st-forum-exe]. + +### Stlite + +Run Streamlit apps directly in the browser with [stlite][stlite_repo], a WebAssembly port of Streamlit powered by Pyodide, eliminating the need for a server. It also allows packaging apps as standalone desktop executables using stlite desktop. These options provide flexibility depending on whether the goal is online accessibility, lightweight execution, or local application distribution. @@ -357,6 +367,7 @@ We appreciate your feedback! If you have any comments, suggestions, or run into [nfcore]: https://nf-co.re/ [nextflow]: https://www.nextflow.io/ [nf-vuegen]: https://github.com/Multiomics-Analytics-Group/nf-vuegen/ +[nf-vuegen-nf-core]: https://nf-co.re/modules/vuegen/ [colab_badge]: https://colab.research.google.com/assets/colab-badge.svg [colab_link_intro_demo]: https://colab.research.google.com/github/Multiomics-Analytics-Group/vuegen/blob/main/docs/vuegen_basic_case_study.ipynb [predef-dir-config]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml @@ -366,7 +377,7 @@ We appreciate your feedback! If you have any comments, suggestions, or run into [emp-config]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config [emp-dir]: https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook [st-cloud]: https://streamlit.io/cloud -[stlite]: https://github.com/whitphx/stlite +[stlite_repo]: https://github.com/whitphx/stlite [st-forum-exe]: https://discuss.streamlit.io/t/streamlit-deployment-as-an-executable-file-exe-for-windows-macos-and-android/6812 [Mona]: https://multiomics-analytics-group.github.io/ [Biosustain]: https://www.biosustain.dtu.dk/ diff --git a/docs/README.md b/docs/README.md index eb898f6..8e11f08 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,9 +2,9 @@ In order to build the docs you need to - 1. install sphinx and additional support packages - 2. build the package reference files - 3. run sphinx to create a local html version + 1. Install sphinx and additional support packages + 2. Build the package reference files + 3. Run sphinx to create a local html version The documentation is build using readthedocs automatically. @@ -31,7 +31,9 @@ sphinx-apidoc --force --implicit-namespaces --module-first -o reference ../src/v sphinx-build -n -W --keep-going -b html ./ ./_build/ ``` -## Include repo README.md into docs +## Include repo README into docs + +The README is included in the `Overview` section of the docs. We created a [Python script](https://github.com/Multiomics-Analytics-Group/vuegen/blob/split-readme-docs/docs/split_readme.py) to split the README sections into separate md files, stored in `docs/sections_readme`. The `index.md` file contains the structure of the docs with the generated sections and additional information. Relative links are used in the main README, which need to be resolved when building. It's possible to include the a `relative-docs` option if one uses `index.md` ([see docs](https://myst-parser.readthedocs.io/en/latest/faq/index.html#include-a-file-from-outside-the-docs-folder-like-readme-md)). This does not work diff --git a/docs/conf.py b/docs/conf.py index f0d12b8..a0e5370 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 @@ -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, @@ -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( @@ -154,4 +164,5 @@ def run_apidoc(_): ) def setup(app): + app.connect("builder-inited", run_split_readme) app.connect("builder-inited", run_apidoc) diff --git a/docs/example_report.md b/docs/example_report.md index 20e33d7..af7c2a1 100644 --- a/docs/example_report.md +++ b/docs/example_report.md @@ -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. diff --git a/docs/images/vuegen_graph_abstract.png b/docs/images/vuegen_graph_abstract.png index acfe990..600bbf3 100644 Binary files a/docs/images/vuegen_graph_abstract.png and b/docs/images/vuegen_graph_abstract.png differ diff --git a/docs/index.md b/docs/index.md index 50220d8..827a096 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,14 +1,28 @@ -# Overview - -```{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/contributing +sections_readme/citation +sections_readme/credits +sections_readme/contact +``` + ```{toctree} :maxdepth: 2 @@ -20,8 +34,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} diff --git a/docs/split_readme.py b/docs/split_readme.py new file mode 100644 index 0000000..22a7870 --- /dev/null +++ b/docs/split_readme.py @@ -0,0 +1,131 @@ +import re +from pathlib import Path + +# Mapping section titles to their corresponding filenames +SECTION_MAPPING = { + "![VueGen Logo](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg)": "home_page.md", + "About the project": "about.md", + "Installation": "installation.md", + "Execution": "execution.md", + "GUI": "gui.md", + "Case studies": "case_studies.md", + "Web application deployment": "web_app_deploy.md", + "Citation": "citation.md", + "Credits and acknowledgements": "credits.md", + "Contact and feedback": "contact.md", +} + + +def extract_section(readme, section_title): + """Extracts content between current section and next ## heading""" + pattern = rf"## {re.escape(section_title)}(.*?)(?=\n## |\Z)" + match = re.search(pattern, readme, flags=re.DOTALL) + return match.group(1).strip() if match else "" + + +def extract_links_from_readme(readme): + """Extract link references from README.md into a dictionary""" + link_pattern = r"\[([^\]]+)\]: (\S+)" + links = {} + + matches = re.findall(link_pattern, readme) + for ref, url in matches: + links[ref] = url + + return links + + +def convert_gfm_to_sphinx(content, links): + """Convert GitHub Flavored Markdown to Sphinx-style syntax.""" + # Convert GFM admonitions (like > [!IMPORTANT] and > [!NOTE]) + content = re.sub( + r"(^|\n)> \[!(\w+)\]([^\n]*)((?:\n> [^\n]*)*)", + lambda m: f"\n:::{{{m.group(2)}}}\n" # Note the curly braces here + + re.sub(r"^> ", "", m.group(4), flags=re.MULTILINE).strip() + + "\n:::\n", + content, + ) + + # Replace link references dynamically using the links dictionary + for ref, url in links.items(): + content = re.sub(rf"\[{re.escape(ref)}\]", f"({url})", content) + + return content + + +def decrease_header_levels(content): + """Decrease each Markdown header by one level.""" + lines = content.splitlines() + new_lines = [] + for line in lines: + if re.match(r"^(#{2,6})\s", line): + num_hashes = len(line.split()[0]) + new_line = "#" * (num_hashes - 1) + line[num_hashes:] + new_lines.append(new_line) + else: + new_lines.append(line) + return "\n".join(new_lines) + + +def clean_trailing_links(content): + """Remove trailing links and clean up extra empty lines.""" + # Remove [label]: link style + content = re.sub(r"^\[.+?\]:\s+\S+$", "", content, flags=re.MULTILINE) + # Remove (url): url style + content = re.sub( + r"^\(https?://[^\s)]+\):\s*https?://[^\s)]+$", "", content, flags=re.MULTILINE + ) + content = re.sub( + r"^\(mailto:[^\s)]+\):\s*mailto:[^\s)]+$", "", content, flags=re.MULTILINE + ) + # Remove empty lines + content = re.sub(r"\n{2,}", "\n\n", content).strip() + return content + + +def process_readme(readme_path, output_dir): + readme = Path(readme_path).read_text() + + # Extract links from README + links = extract_links_from_readme(readme) + + # Create output directory + output_dir.mkdir(exist_ok=True, parents=True) + + for section_title, filename in SECTION_MAPPING.items(): + content = extract_section(readme, section_title) + if content: + myst_content = ( + f"## {section_title}\n\n{convert_gfm_to_sphinx(content, links)}" + ) + if filename.lower() == "contact.md": + myst_content = clean_trailing_links(myst_content) + myst_content = decrease_header_levels(myst_content) + (output_dir / filename).write_text(myst_content) + print(f"Generated {filename}") + else: + print(f"Warning: Section '{section_title}' not found in README") + + # Include CONTRIBUTING.md with its own link references + contrib_path = readme_path.parent / "CONTRIBUTING.md" + if contrib_path.exists(): + raw_contrib = contrib_path.read_text() + contrib_links = extract_links_from_readme(raw_contrib) + + # Convert content + contrib_converted = convert_gfm_to_sphinx(raw_contrib, contrib_links) + + # Remove trailing link definitions + contrib_converted = clean_trailing_links(contrib_converted) + + # Write output + (output_dir / "contributing.md").write_text(contrib_converted) + print("Generated contributing.md") + else: + print("Warning: CONTRIBUTING.md not found") + + +if __name__ == "__main__": + default_readme = Path(__file__).resolve().parent.parent / "README.md" + output_sections_readme = Path("./sections_readme") + process_readme(default_readme, output_sections_readme) diff --git a/docs/vuegen_APICall_configfile.md b/docs/vuegen_APICall_configfile.md new file mode 100644 index 0000000..bb55b61 --- /dev/null +++ b/docs/vuegen_APICall_configfile.md @@ -0,0 +1,50 @@ +# APICall Component Configuration File + +A [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/APIcall_example_config.yaml) for the API call component is provided below: + +```yaml +report: + title: APICall example + description: An APICall example. +sections: + - title: APICall test + subsections: + - title: JSONPlaceholder test + components: + - title: GET request + component_type: apicall + api_url: https://jsonplaceholder.typicode.com/todos/1 + method: GET + - title: POST request + component_type: apicall + api_url: https://jsonplaceholder.typicode.com/todos + method: POST + request_body: | + { + "userId": 1, + "title": "Go running", + "completed": false + } + - title: PUT request + component_type: apicall + api_url: https://jsonplaceholder.typicode.com/todos/10 + method: PUT + request_body: | + { + "userId": 1, + "title": "Play the guitar", + "completed": true + } + - title: PATCH request + component_type: apicall + api_url: https://jsonplaceholder.typicode.com/todos/10 + method: PATCH + request_body: | + { + "title": "Go for a hike" + } + - title: DELETE request + component_type: apicall + api_url: https://jsonplaceholder.typicode.com/todos/10 + method: DELETE +``` \ No newline at end of file diff --git a/docs/vuegen_Chatbot_configfile.md b/docs/vuegen_Chatbot_configfile.md new file mode 100644 index 0000000..d5c7bbb --- /dev/null +++ b/docs/vuegen_Chatbot_configfile.md @@ -0,0 +1,19 @@ +# Chatbot Component Configuration File + +A [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Chatbot_example_config.yaml) for the Chatbot component is provided below: + +```yaml +report: + title: Chatbot example + description: > + A chatbot exaple. +sections: + - title: ChatBot test + subsections: + - title: Simple test + components: + - title: ChatBot test + component_type: chatbot + api_url: http://localhost:11434/api/chat + model: llama3.2 +``` diff --git a/docs/vuegen_basic_case_study.ipynb b/docs/vuegen_basic_case_study.ipynb index 834b29f..3c17cdd 100644 --- a/docs/vuegen_basic_case_study.ipynb +++ b/docs/vuegen_basic_case_study.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Vuegen Basic Case Study - Predefined Directory\n", + "# Predefined Directory Case Study - Notebook\n", "\n", "[![Open In Colab][colab_badge]][colab_link]\n", "\n", @@ -74,7 +74,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "import os\n", @@ -85,7 +89,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Set working directory\n", @@ -101,7 +109,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Optional library to launch a streamlit app from colab\n", @@ -119,7 +131,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Imports\n", @@ -160,7 +176,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Generate the report\n", @@ -175,7 +195,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "run_streamlit = False\n", @@ -210,7 +234,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Generate the report\n", @@ -239,7 +267,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "vuegen_logo_path = \"https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg\"\n", @@ -266,7 +298,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Update the description for the EDA section\n", @@ -294,7 +330,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Define new plot with a URL as the file path\n", @@ -331,7 +371,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Test the changes by generarating the report from the modified YAML file\n", @@ -344,7 +388,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "run_streamlit = False\n", @@ -379,7 +427,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Test the changes by generarating the report from the modified YAML file\n", diff --git a/docs/vuegen_basic_case_study_configfile.md b/docs/vuegen_basic_case_study_configfile.md new file mode 100644 index 0000000..2336459 --- /dev/null +++ b/docs/vuegen_basic_case_study_configfile.md @@ -0,0 +1,176 @@ +# Predefined Directory Case Study - Configuration File + +The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml) of the basic case study using a predefined directory is presented below: + +```yaml +report: + title: Basic Example Vuegen Demo Notebook + description: A general description of the report. + graphical_abstract: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg + logo: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg +sections: +- title: Plots + description: This section contains example plots. + subsections: + - title: Interactive Plots + description: Optional description for section. + components: + - title: Top Species Plot By Biome Plotly + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json + description: '' + caption: '' + component_type: plot + plot_type: plotly + - title: Multiline Plot Altair + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json + description: '' + caption: '' + component_type: plot + plot_type: altair + - title: Pie Plot Countries Plotly + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json + description: '' + caption: '' + component_type: plot + plot_type: plotly + - title: Pie Plots Biomes Plotly + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json + description: '' + caption: '' + component_type: plot + plot_type: plotly + - title: Saline Metagenomics Samples Map Altair + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json + description: '' + caption: '' + component_type: plot + plot_type: altair + - title: Description + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/description.md + description: '' + caption: '' + component_type: markdown + - title: Static Plots + description: '' + components: + - title: Number Samples Per Study + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png + description: '' + caption: '' + component_type: plot + plot_type: static + - title: Animal Metagenomics Samples Map + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png + description: '' + caption: '' + component_type: plot + plot_type: static + - title: Alpha Diversity Host Associated Samples + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png + description: '' + caption: '' + component_type: plot + plot_type: static + - title: "Graphical overview of VueGen workflow and components" + file_path: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png + description: '' + caption: The diagram illustrates the processing pipeline of VueGen, starting + from either a directory or a YAML configuration file. Reports consist of hierarchical + sections and subsections, each containing various components such as plots, + dataframes, Markdown, HTML, and data retrieved via API calls. + component_type: plot + plot_type: static +- title: Dataframes + description: '' + subsections: + - title: All Formats + description: This subsection contains example dataframes. + components: + - title: Phyla Correlation Network Csv + file_path: example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv + description: '' + caption: '' + component_type: dataframe + file_format: csv + delimiter: ',' + - title: Abundance Table Example Xls + file_path: example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls + description: '' + caption: '' + component_type: dataframe + file_format: xls + - title: Sample Info Example Txt + file_path: example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt + description: '' + caption: '' + component_type: dataframe + file_format: txt + delimiter: \t + - title: Sample Info Example Parquet + file_path: example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet + description: '' + caption: '' + component_type: dataframe + file_format: parquet +- title: Networks + description: '' + subsections: + - title: Interactive Networks + description: Optional description for subsection + components: + - title: Man Example + file_path: example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/1_man_example.graphml + description: '' + caption: '' + component_type: plot + plot_type: interactive_network + - title: Description + file_path: example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/description.md + description: '' + caption: '' + component_type: markdown + - title: Static Networks + description: '' + components: + - title: Phyla Correlation Network + file_path: example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png + description: '' + caption: '' + component_type: plot + plot_type: static +- title: Html + description: '' + subsections: + - title: All Html + description: '' + components: + - title: Plot + file_path: example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/1_plot.html + description: '' + caption: '' + component_type: html + - title: Ckg Network + file_path: example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/2_ckg_network.html + description: '' + caption: '' + component_type: plot + plot_type: interactive_network + - title: Multiqc Report + file_path: example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/3_multiqc_report.html + description: '' + caption: '' + component_type: html +- title: Markdown + description: '' + subsections: + - title: All Markdown + description: '' + components: + - title: Readme + file_path: example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md + description: '' + caption: '' + component_type: markdown +``` + +The directory with he example data is available in the [GitHub repository](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Basic_example_vuegen_demo_notebook). diff --git a/docs/vuegen_case_study_earth_microbiome.ipynb b/docs/vuegen_case_study_earth_microbiome.ipynb index 70d81b2..abcddba 100644 --- a/docs/vuegen_case_study_earth_microbiome.ipynb +++ b/docs/vuegen_case_study_earth_microbiome.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Vuegen Case Study - Earth Microbiome Project\n", + "# Earth Microbiome Project Case Study - Notebook\n", "\n", "[![Open In Colab][colab_badge]][colab_link]\n", "\n", @@ -67,7 +67,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Vuegen library\n", @@ -77,7 +81,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Libraries for the notebook\n", @@ -87,7 +95,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "import os\n", @@ -98,7 +110,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Optional library to launch a streamlit app from colab\n", @@ -109,7 +125,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Output directory\n", @@ -126,7 +146,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Imports\n", @@ -164,7 +188,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "os.makedirs(base_output_dir, exist_ok=True)" @@ -181,7 +209,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create project description\n", @@ -209,7 +241,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "def get_empo_cat_color(empocat=None, returndict=False):\n", @@ -284,7 +320,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create the output directory for the EDA section and sample provenance subsection\n", @@ -309,7 +349,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Obtain a random sample of the metadata df with a random seed\n", @@ -331,7 +375,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Extract Animal dataset\n", @@ -388,7 +436,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Extract Plant dataset\n", @@ -469,7 +521,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Extract Saline dataset\n", @@ -569,7 +625,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create the output directory for the metagenomics section and alpha diversity subsection\n", @@ -586,7 +646,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Define colors of host associated and free living categories\n", @@ -624,7 +688,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Ensure y variable is numeric to avoid aggregation errors\n", @@ -712,7 +780,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Ensure y variable is numeric to avoid aggregation errors\n", @@ -808,7 +880,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create the output directory for the metagenomics section and average copy number subsection\n", @@ -831,7 +907,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create a new df by copying mapping_qc_filt_df\n", @@ -858,7 +938,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "plt.figure(figsize=(10, 6))\n", @@ -905,7 +989,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Create a list to store histogram traces\n", @@ -987,7 +1075,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create the output directory for the metagenomics section and nestedness subsection\n", @@ -1015,7 +1107,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Obtain a randome sample of the nestedness df for all samples\n", @@ -1039,7 +1135,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Determine axis limits\n", @@ -1090,7 +1190,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Determine axis limits\n", @@ -1156,7 +1260,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Determine axis limits\n", @@ -1224,7 +1332,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Determine axis limits\n", @@ -1315,7 +1427,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create the output directory for the network analysis section and microbial networks subsection\n", @@ -1344,7 +1460,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Collapse the table to the phylum level\n", @@ -1366,7 +1486,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Clean the index (which contains Phylum names) by removing unnecessary parts\n", @@ -1392,7 +1516,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Obtain a randome sample of the columns of the phyla counts df\n", @@ -1412,7 +1540,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Compute correlation matrix with absolute values\n", @@ -1429,7 +1561,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Create a graph from the binary matrix\n", @@ -1469,7 +1605,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "# Draw the network\n", @@ -1521,7 +1661,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Generate the report\n", @@ -1534,7 +1678,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "run_streamlit = False\n", @@ -1569,7 +1717,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Generate the report\n", @@ -1597,7 +1749,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "empo_logo_path = (\n", @@ -1621,7 +1777,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Update the description for the EDA section\n", @@ -1651,7 +1811,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Define new plot with a URL as the file path\n", @@ -1682,7 +1846,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Define new plot with a URL as the file path\n", @@ -1724,7 +1892,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Test the changes by generarating the report from the modified YAML file\n", @@ -1737,7 +1909,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "run_streamlit = False\n", @@ -1772,7 +1948,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [], "source": [ "# Test the changes by generarating the report from the modified YAML file\n", diff --git a/docs/vuegen_case_study_earth_microbiome_configfile.md b/docs/vuegen_case_study_earth_microbiome_configfile.md new file mode 100644 index 0000000..8f01857 --- /dev/null +++ b/docs/vuegen_case_study_earth_microbiome_configfile.md @@ -0,0 +1,169 @@ +# Earth Microbiome Project Case Study - Configuration File + +The [configuration file](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml) of the Earth Microbiome Project case study is shown below: + +```yaml +report: + title: Earth Microbiome Vuegen Demo Notebook + description: "The Earth Microbiome Project (EMP) is a systematic attempt to characterize\ + \ global microbial taxonomic and functional diversity for the benefit of the planet\ + \ and humankind. \n It aimed to sample the Earth\u2019s microbial communities\ + \ at an unprecedented scale in order to advance our understanding of the organizing\ + \ biogeographic principles that govern microbial community structure. \n The\ + \ EMP dataset is generated from samples that individual researchers have compiled\ + \ and contributed to the EMP. \n The result is both a reference database giving\ + \ global context to DNA sequence data and a framework for incorporating data from\ + \ future studies, fostering increasingly complete characterization of Earth\u2019\ + s microbial diversity.\n \n You can find more information about the Earth Microbiome\ + \ Project at https://earthmicrobiome.org/ and in the [original article](https://www.nature.com/articles/nature24621).\n" + graphical_abstract: https://raw.githubusercontent.com/ElDeveloper/cogs220/master/emp-logo.svg + logo: https://raw.githubusercontent.com/ElDeveloper/cogs220/master/emp-logo.svg +sections: +- title: Exploratory Data Analysis + description: This section contains the exploratory data analysis of the Earth Microbiome + Project (EMP) dataset. + subsections: + - title: Sample Exploration + description: '' + components: + - title: Metadata Random Subset + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/1_metadata_random_subset.csv + description: '' + caption: '' + component_type: DATAFRAME + file_format: CSV + delimiter: ',' + - title: Animal Samples Map + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/2_animal_samples_map.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC + - title: Plant Samples Map + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/3_plant_samples_map.json + description: '' + caption: '' + component_type: PLOT + plot_type: PLOTLY + - title: Saline Samples Map + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/4_saline_samples_map.json + description: '' + caption: '' + component_type: PLOT + plot_type: ALTAIR + - title: Physicochemical properties of the EMP samples + file_path: https://raw.githubusercontent.com/biocore/emp/master/methods/images/figureED1_physicochemical.png + description: '' + caption: Pairwise scatter plots of available physicochemical metadat are shown + for temperature, salinity, oxygen, and pH, and for phosphate, nitrate, and + ammonium + component_type: PLOT + plot_type: STATIC +- title: Metagenomics + description: '' + subsections: + - title: Alpha Diversity + description: This subsection contains the alpha diversity analysis of the EMP + dataset. + components: + - title: Alpha Diversity Host Associated Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/1_alpha_diversity/1_alpha_diversity_host_associated_samples.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC + - title: Alpha Diversity Free Living Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/1_alpha_diversity/2_alpha_diversity_free_living_samples.json + description: '' + caption: '' + component_type: PLOT + plot_type: PLOTLY + - title: Average Copy Number + description: '' + components: + - title: Average Copy Number Emp Ontology Level2 + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/2_average_copy_number/1_average_copy_number_emp_ontology_level2.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC + - title: Average Copy Number Emp Ontology Level3 + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/2_average_copy_number/2_average_copy_number_emp_ontology_level3.json + description: '' + caption: '' + component_type: PLOT + plot_type: PLOTLY + - title: Nestedness + description: '' + components: + - title: Nestedness Random Subset + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/1_nestedness_random_subset.csv + description: '' + caption: '' + component_type: DATAFRAME + file_format: CSV + delimiter: ',' + - title: All Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/2_all_samples.json + description: '' + caption: '' + component_type: PLOT + plot_type: PLOTLY + - title: Plant Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/3_plant_samples.json + description: '' + caption: '' + component_type: PLOT + plot_type: PLOTLY + - title: Animal Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/4_animal_samples.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC + - title: Non Saline Samples + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/5_non_saline_samples.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC + - title: Shanon entropy analysis + description: This subsection contains the Shannon entropy analysis of the EMP + dataset. + components: + - title: Specificity of sequences and higher taxonomic groups for environment + file_path: https://raw.githubusercontent.com/biocore/emp/master/methods/images/figure4_entropy.png + description: '' + caption: a) Environment distribution in all genera and 400 randomly chosen tag + sequence. b) and c) Shannon entropy within each taxonomic group. + component_type: PLOT + plot_type: STATIC +- title: Network Analysis + description: '' + subsections: + - title: Phyla Association Networks + description: '' + components: + - title: Phyla Counts Subset + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/1_phyla_counts_subset.csv + description: '' + caption: '' + component_type: DATAFRAME + file_format: CSV + delimiter: ',' + - title: Phyla Correlation Network With 0.5 Threshold Edgelist + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/2_phyla_correlation_network_with_0.5_threshold_edgelist.csv + description: '' + caption: '' + component_type: PLOT + plot_type: INTERACTIVE_NETWORK + csv_network_format: EDGELIST + - title: Phyla Correlation Network With 0.5 Threshold + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/3_phyla_correlation_network_with_0.5_threshold.png + description: '' + caption: '' + component_type: PLOT + plot_type: STATIC +``` + +The directory with he example data is available in the [GitHub repository](https://github.com/Multiomics-Analytics-Group/vuegen/blob/main/docs/example_data/Earth_microbiome_vuegen_demo_notebook). diff --git a/pyproject.toml b/pyproject.toml index ee1284a..7a886d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ ipywidgets = { version = "*", optional = true } sphinx-new-tab-link = { version = "!=0.2.2", optional = true } jupytext = { version = "*", optional = true } customtkinter = { version = "*", optional = true } +sphinx-copybutton = { version = "*", optional = true } [tool.poetry.group.dev.dependencies] ipykernel = { version = "^6.29.5", optional = true } @@ -63,6 +64,7 @@ docs = [ "ipywidgets", "sphinx-new-tab-link", "jupytext", + "sphinx-copybutton", ] gui = ["customtkinter"]