From d28af1d5ce1b48aa57f63f9d4b89409e026a0ffa Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Mon, 16 Jun 2025 15:52:58 +0200 Subject: [PATCH 01/18] :construction: start to explore adding subsections to homesection --- src/vuegen/streamlit_reportview.py | 42 ++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py index 8ed3a8e..3c260b8 100644 --- a/src/vuegen/streamlit_reportview.py +++ b/src/vuegen/streamlit_reportview.py @@ -145,10 +145,38 @@ def generate_report(self, output_dir: str = SECTIONS_DIR) -> None: # Generate the home page and update the report manager content # ! top level files (compontents) are added to the home page + home_section = self.report.sections[0] self._generate_home_section( output_dir=output_dir, report_manag_content=report_manag_content, - home_section=self.report.sections[0], + home_section=home_section, + ) + # ! move this into the _generate_home_section method + subsection_page_vars = [] + + for subsection in home_section.subsections: + # ! could add a non-integer to ensure it's a valid identifier + subsection_name_var = make_valid_identifier(subsection.title) + if not subsection_name_var.isidentifier(): + self.report.logger.warning( + f"Subsection name '{subsection_name_var}' is not a valid identifier." + ) + raise ValueError( + f"Subsection name is not a valid Python identifier: {subsection_name_var}" + ) + subsection_file_path = ( + Path("Home") / f"{subsection_name_var}.py" + ).as_posix() # Make sure it's Posix Paths + subsection.file_path = subsection_file_path + # Create a Page object for each subsection and add it to the home page content + report_manag_content.append( + f"{subsection_name_var} = st.Page('{subsection_file_path}', title='{subsection.title}')" + ) + subsection_page_vars.append(subsection_name_var) + + # Add all subsection Page objects to the corresponding section + report_manag_content.append( + f"sections_pages['Home'] = [homepage,{', '.join(subsection_page_vars)}]\n" ) for section in self.report.sections[1:]: # skip home section components @@ -427,14 +455,13 @@ def _generate_sections(self, output_dir: str) -> None: The folder where section files will be saved. """ self.report.logger.info("Starting to generate sections for the report.") - try: - for section in self.report.sections[1:]: + for section_no, section in enumerate(self.report.sections): self.report.logger.debug( f"Processing section '{section.id}': '{section.title}' - {len(section.subsections)} subsection(s)" ) - - if section.components: + # ! skip first section components as it's predefined as homepage + if section_no and section.components: # add an section overview page section_content, section_imports, _ = self._combine_components( section.components @@ -449,9 +476,8 @@ def _generate_sections(self, output_dir: str) -> None: ) if not section.subsections: - self.report.logger.warning( - f"No subsections found in section: '{section.title}'. " - "To show content in the report, add subsections to the section." + self.report.logger.debug( + f"No subsections found in section: '{section.title}'." ) continue From 5f98172142c567dd4f3b7942dcf14dc9b742de48 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 17 Jun 2025 12:36:40 +0200 Subject: [PATCH 02/18] :sparkles: revert to homepage layout as before, add new section - use the homepage layout as it was before: title, descrpiton, logo and graphical abstract - if there are components in the main folder, trigger to add section with main folder name if the configuration is built using the directory based method. - a new section with the components is added - if configs are created manually, the first section is treated as every other section --- src/vuegen/config_manager.py | 6 ++-- src/vuegen/streamlit_reportview.py | 48 +++--------------------------- 2 files changed, 8 insertions(+), 46 deletions(-) diff --git a/src/vuegen/config_manager.py b/src/vuegen/config_manager.py index d139544..7927d9b 100644 --- a/src/vuegen/config_manager.py +++ b/src/vuegen/config_manager.py @@ -316,6 +316,7 @@ def create_yamlconfig_fromdir( # Generate the YAML config yaml_config = { "report": { + # This will be used for the home section of a report "title": self._create_title_fromdir(base_dir_path.name), "description": self._read_description_file(base_dir_path), "graphical_abstract": "", @@ -328,10 +329,11 @@ def create_yamlconfig_fromdir( sorted_sections = self._sort_paths_by_numprefix(list(base_dir_path.iterdir())) main_section_config = { - "title": "", - "description": "Components added to homepage.", + "title": self._create_title_fromdir(base_dir_path.name), + "description": "Components added to main report folder.", "components": [], } + # treat it as any other section. yaml_config["sections"].append(main_section_config) # Generate sections and subsections config diff --git a/src/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py index 3c260b8..6794ced 100644 --- a/src/vuegen/streamlit_reportview.py +++ b/src/vuegen/streamlit_reportview.py @@ -145,41 +145,14 @@ def generate_report(self, output_dir: str = SECTIONS_DIR) -> None: # Generate the home page and update the report manager content # ! top level files (compontents) are added to the home page - home_section = self.report.sections[0] self._generate_home_section( output_dir=output_dir, report_manag_content=report_manag_content, - home_section=home_section, ) # ! move this into the _generate_home_section method subsection_page_vars = [] - for subsection in home_section.subsections: - # ! could add a non-integer to ensure it's a valid identifier - subsection_name_var = make_valid_identifier(subsection.title) - if not subsection_name_var.isidentifier(): - self.report.logger.warning( - f"Subsection name '{subsection_name_var}' is not a valid identifier." - ) - raise ValueError( - f"Subsection name is not a valid Python identifier: {subsection_name_var}" - ) - subsection_file_path = ( - Path("Home") / f"{subsection_name_var}.py" - ).as_posix() # Make sure it's Posix Paths - subsection.file_path = subsection_file_path - # Create a Page object for each subsection and add it to the home page content - report_manag_content.append( - f"{subsection_name_var} = st.Page('{subsection_file_path}', title='{subsection.title}')" - ) - subsection_page_vars.append(subsection_name_var) - - # Add all subsection Page objects to the corresponding section - report_manag_content.append( - f"sections_pages['Home'] = [homepage,{', '.join(subsection_page_vars)}]\n" - ) - - for section in self.report.sections[1:]: # skip home section components + for section in self.report.sections: # skip home section components # Create a folder for each section subsection_page_vars = [] section_name_var = make_valid_identifier( @@ -376,7 +349,6 @@ def _generate_home_section( self, output_dir: str, report_manag_content: list, - home_section: r.Section, ) -> None: """ Generates the homepage for the report and updates the report manager content. @@ -388,14 +360,7 @@ def _generate_home_section( report_manag_content : list A list to store the content that will be written to the report manager file. """ - self.report.logger.debug("Processing home section.") - all_components = [] - subsection_imports = [] - if home_section.components: - # some assert on title? - all_components, subsection_imports, _ = self._combine_components( - home_section.components - ) + self.report.logger.debug("Processing home section.")) try: # Create folder for the home page @@ -410,8 +375,6 @@ def _generate_home_section( # Create the home page content home_content = [] home_content.append("import streamlit as st") - if subsection_imports: - home_content.extend(subsection_imports) if self.report.description: home_content.append( self._format_text(text=self.report.description, type="paragraph") @@ -422,8 +385,6 @@ def _generate_home_section( ) # add components content to page (if any) - if all_components: - home_content.extend(all_components) # Define the footer variable and add it to the home page content home_content.append("footer = '''" + generate_footer() + "'''\n") @@ -456,12 +417,11 @@ def _generate_sections(self, output_dir: str) -> None: """ self.report.logger.info("Starting to generate sections for the report.") try: - for section_no, section in enumerate(self.report.sections): + for section in self.report.sections: self.report.logger.debug( f"Processing section '{section.id}': '{section.title}' - {len(section.subsections)} subsection(s)" ) - # ! skip first section components as it's predefined as homepage - if section_no and section.components: + if section.components: # add an section overview page section_content, section_imports, _ = self._combine_components( section.components From d0d480bee62950c559af79fcbc23091c6abdab7d Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 17 Jun 2025 12:41:46 +0200 Subject: [PATCH 03/18] :bug: fix syntax error (two closing parantheses) --- src/vuegen/streamlit_reportview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py index 6794ced..cc12bc1 100644 --- a/src/vuegen/streamlit_reportview.py +++ b/src/vuegen/streamlit_reportview.py @@ -360,7 +360,7 @@ def _generate_home_section( report_manag_content : list A list to store the content that will be written to the report manager file. """ - self.report.logger.debug("Processing home section.")) + self.report.logger.debug("Processing home section.") try: # Create folder for the home page From 74554f3973bddaafae9336b6042c9ea93d142296 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Fri, 20 Jun 2025 16:36:07 +0200 Subject: [PATCH 04/18] =?UTF-8?q?=F0=9F=90=9B=20Make=20excel=20df=20paths?= =?UTF-8?q?=20relative=20insetad=20of=20absolute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vuegen/streamlit_reportview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py index 8ed3a8e..55eac5a 100644 --- a/src/vuegen/streamlit_reportview.py +++ b/src/vuegen/streamlit_reportview.py @@ -746,14 +746,14 @@ def _generate_dataframe_content(self, dataframe) -> List[str]: r.DataFrameFormat.XLSX.value_with_dot, ]: dataframe_content.append("selected_sheet = 0") - sheet_names = table_utils.get_sheet_names(dataframe.file_path) + sheet_names = table_utils.get_sheet_names(df_file_path.as_posix()) if len(sheet_names) > 1: # If there are multiple sheets, ask the user to select one dataframe_content.append( textwrap.dedent( f"""\ - sheet_names = table_utils.get_sheet_names("{dataframe.file_path}") + sheet_names = table_utils.get_sheet_names("{df_file_path.as_posix()}") selected_sheet = st.selectbox("Select a sheet to display", options=sheet_names) """ ) @@ -766,7 +766,7 @@ def _generate_dataframe_content(self, dataframe) -> List[str]: r.DataFrameFormat.XLSX.value_with_dot, ]: dataframe_content.append( - f"""df = pd.{read_function.__name__}('{dataframe.file_path}', sheet_name=selected_sheet)\n""" + f"""df = pd.{read_function.__name__}('{df_file_path.as_posix()}', sheet_name=selected_sheet)\n""" ) else: dataframe_content.append( From 7db4664a4f4e61030b9bfc17d920e8c8c298ed07 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 13:13:24 +0200 Subject: [PATCH 05/18] =?UTF-8?q?=F0=9F=9A=A7=20add=20current=20state=20of?= =?UTF-8?q?=20qmd=20notebooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - move html report file to correct place: update rel. paths - add others as of now --- .../docx/quarto_report/quarto_report.qmd | 299 +++++++++++++++ .../{ => quarto_report}/quarto_report.qmd | 40 +- .../jupyter/quarto_report/quarto_report.qmd | 318 ++++++++++++++++ .../odt/quarto_report/quarto_report.qmd | 299 +++++++++++++++ .../pdf/quarto_report/quarto_report.qmd | 309 ++++++++++++++++ .../pptx/quarto_report/quarto_report.qmd | 300 +++++++++++++++ .../revealjs/quarto_report/quarto_report.qmd | 347 ++++++++++++++++++ 7 files changed, 1892 insertions(+), 20 deletions(-) create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd rename tests/report_examples/Basic_example_vuegen_demo_notebook/html/{ => quarto_report}/quarto_report.qmd (66%) create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd create mode 100644 tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..031e6c8 --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd @@ -0,0 +1,299 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + docx: + toc: false +--- + +```{python} +#| label: 'Imports' +from pathlib import Path +import IPython.display as display +import altair as alt +import dataframe_image as dfi +import json +import pandas as pd +import plotly.io as pio +import requests + + +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Top_Species_Plot_By_Biome_Plotly.png") +``` + +![](static/Top_Species_Plot_By_Biome_Plotly.png){fig-alt= width=90%} + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/static/Multiline_Plot_Altair.png") +``` + +![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plot_Countries_Plotly.png") +``` + +![](static/Pie_Plot_Countries_Plotly.png){fig-alt= width=90%} + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plots_Biomes_Plotly.png") +``` + +![](static/Pie_Plots_Biomes_Plotly.png){fig-alt= width=90%} + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +``` + +![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Plotly_Plot_R.png") +``` + +![](static/Plotly_Plot_R.png){fig-alt= width=90%} + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +# Dataframes +## All Formats +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Example_Xlsx.png){fig-alt= width=90%} + +# Networks +## Interactive Networks +Optional description for subsection. + + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + +![](static/Man_Example.png){fig-alt= width=90%} + +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + +![](static/Ckg_Network.png){fig-alt= width=90%} + +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd similarity index 66% rename from tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report.qmd rename to tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd index 8db95f5..f068104 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd @@ -62,7 +62,7 @@ Optional description for section. #| label: 'Top Species Plot By Biome Plotly 1' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: plot_json = json.load(plot_file) # Keep only 'data' and 'layout' sections @@ -86,7 +86,7 @@ fig_plotly.show() #| label: 'Multiline Plot Altair 2' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: plot_json = json.load(plot_file) # Convert JSON to string @@ -103,7 +103,7 @@ fig_altair #| label: 'Pie Plot Countries Plotly 3' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: plot_json = json.load(plot_file) # Keep only 'data' and 'layout' sections @@ -127,7 +127,7 @@ fig_plotly.show() #| label: 'Pie Plots Biomes Plotly 4' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: plot_json = json.load(plot_file) # Keep only 'data' and 'layout' sections @@ -151,7 +151,7 @@ fig_plotly.show() #| label: 'Saline Metagenomics Samples Map Altair 5' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: plot_json = json.load(plot_file) # Convert JSON to string @@ -168,7 +168,7 @@ fig_altair #| label: 'Plotly Plot R 6' #| fig-cap: "" -with open(report_dir /'../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: plot_json = json.load(plot_file) # Keep only 'data' and 'layout' sections @@ -189,13 +189,13 @@ fig_plotly.show() ## Static Plots ### Number Samples Per Study -![](../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} ### Animal Metagenomics Samples Map -![](../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} ### Alpha Diversity Host Associated Samples -![](../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} # Dataframes ## All Formats @@ -204,7 +204,7 @@ fig_plotly.show() #| label: 'Phyla Correlation Network Csv 1' #| fig-cap: "" -df = pd.read_csv(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -214,7 +214,7 @@ show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) #| label: 'Abundance Table Example Xls 2' #| fig-cap: "" -df = pd.read_excel(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -224,7 +224,7 @@ show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) #| label: 'Abundance Table Example Xls 2 infos' #| fig-cap: "" -df = pd.read_excel(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -234,7 +234,7 @@ show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) #| label: 'Sample Info Example Txt 3' #| fig-cap: "" -df = pd.read_table(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -244,7 +244,7 @@ show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) #| label: 'Sample Info Example Parquet 4' #| fig-cap: "" -df = pd.read_parquet(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -254,7 +254,7 @@ show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) #| label: 'Example Xlsx 5' #| fig-cap: "" -df = pd.read_excel(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) ``` @@ -276,14 +276,14 @@ Optional description for subsection. ## Static Networks ### Phyla Correlation Network -![](../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} # Html ## All Html ### Plot
- +
### Ckg Network @@ -293,13 +293,13 @@ Optional description for subsection.
- +
### Multiqc Report
- +
# Markdown @@ -311,7 +311,7 @@ Optional description for subsection. #| fig-cap: "" -with open(report_dir / '../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: markdown_content = markdown_file.read() display.Markdown(markdown_content) diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..742981a --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd @@ -0,0 +1,318 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + html: + toc: true + toc-location: left + toc-depth: 3 + page-layout: full + self-contained: true +include-in-header: + text: | + +include-after-body: + text: | + +--- + +```{python} +#| label: 'Imports' +from itables import show, init_notebook_mode +from pathlib import Path +import IPython.display as display +import altair as alt +import json +import pandas as pd +import plotly.io as pio +import requests + + +init_notebook_mode(all_interactive=True) +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +# Dataframes +## All Formats +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +# Networks +## Interactive Networks +Optional description for subsection. + + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + + +
+ +
+ +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Plot + +
+ +
+ +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + + +
+ +
+ +### Multiqc Report + +
+ +
+ +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..ed11200 --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd @@ -0,0 +1,299 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + odt: + toc: false +--- + +```{python} +#| label: 'Imports' +from pathlib import Path +import IPython.display as display +import altair as alt +import dataframe_image as dfi +import json +import pandas as pd +import plotly.io as pio +import requests + + +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Top_Species_Plot_By_Biome_Plotly.png") +``` + +![](static/Top_Species_Plot_By_Biome_Plotly.png){fig-alt= width=90%} + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/static/Multiline_Plot_Altair.png") +``` + +![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plot_Countries_Plotly.png") +``` + +![](static/Pie_Plot_Countries_Plotly.png){fig-alt= width=90%} + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plots_Biomes_Plotly.png") +``` + +![](static/Pie_Plots_Biomes_Plotly.png){fig-alt= width=90%} + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +``` + +![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Plotly_Plot_R.png") +``` + +![](static/Plotly_Plot_R.png){fig-alt= width=90%} + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +# Dataframes +## All Formats +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Example_Xlsx.png){fig-alt= width=90%} + +# Networks +## Interactive Networks +Optional description for subsection. + + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + +![](static/Man_Example.png){fig-alt= width=90%} + +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + +![](static/Ckg_Network.png){fig-alt= width=90%} + +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..c61e77f --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd @@ -0,0 +1,309 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + pdf: + toc: false + fig-align: center + margin: + - bottom=40mm + include-in-header: + text: | + \usepackage{scrlayer-scrpage} + \usepackage{hyperref} + \clearpairofpagestyles + \lofoot{This report was generated with \href{https://github.com/Multiomics-Analytics-Group/vuegen}{VueGen} | \copyright{} 2025 \href{https://github.com/Multiomics-Analytics-Group}{Multiomics Network Analytics Group}} + \rofoot{\pagemark} +--- + +```{python} +#| label: 'Imports' +from pathlib import Path +import IPython.display as display +import altair as alt +import dataframe_image as dfi +import json +import pandas as pd +import plotly.io as pio +import requests + + +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Top_Species_Plot_By_Biome_Plotly.png") +``` + +![](static/Top_Species_Plot_By_Biome_Plotly.png){fig-alt= width=90%} + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/static/Multiline_Plot_Altair.png") +``` + +![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plot_Countries_Plotly.png") +``` + +![](static/Pie_Plot_Countries_Plotly.png){fig-alt= width=90%} + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plots_Biomes_Plotly.png") +``` + +![](static/Pie_Plots_Biomes_Plotly.png){fig-alt= width=90%} + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +``` + +![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Plotly_Plot_R.png") +``` + +![](static/Plotly_Plot_R.png){fig-alt= width=90%} + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +# Dataframes +## All Formats +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +df.dfi.export('static/Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +df.dfi.export('static/Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +df.dfi.export('static/Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +df.dfi.export('static/Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +df.dfi.export('static/Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +df.dfi.export('static/Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Example_Xlsx.png){fig-alt= width=90%} + +# Networks +## Interactive Networks +Optional description for subsection. + + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + +![](static/Man_Example.png){fig-alt= width=90%} + +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + +![](static/Ckg_Network.png){fig-alt= width=90%} + +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..bfd42e8 --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd @@ -0,0 +1,300 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + pptx: + toc: false + output: true +--- + +```{python} +#| label: 'Imports' +from pathlib import Path +import IPython.display as display +import altair as alt +import dataframe_image as dfi +import json +import pandas as pd +import plotly.io as pio +import requests + + +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Top_Species_Plot_By_Biome_Plotly.png") +``` + +![](static/Top_Species_Plot_By_Biome_Plotly.png){fig-alt= width=90%} + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/static/Multiline_Plot_Altair.png") +``` + +![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plot_Countries_Plotly.png") +``` + +![](static/Pie_Plot_Countries_Plotly.png){fig-alt= width=90%} + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Pie_Plots_Biomes_Plotly.png") +``` + +![](static/Pie_Plots_Biomes_Plotly.png){fig-alt= width=90%} + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +``` + +![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.write_image("static/Plotly_Plot_R.png") +``` + +![](static/Plotly_Plot_R.png){fig-alt= width=90%} + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +# Dataframes +## All Formats +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +``` + +![](static/Example_Xlsx.png){fig-alt= width=90%} + +# Networks +## Interactive Networks +Optional description for subsection. + + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + +![](static/Man_Example.png){fig-alt= width=90%} + +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + +![](static/Ckg_Network.png){fig-alt= width=90%} + +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd new file mode 100644 index 0000000..f945070 --- /dev/null +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd @@ -0,0 +1,347 @@ +--- +title: Basic Example Vuegen Demo Notebook +fig-align: center +execute: + echo: false + output: asis +jupyter: python3 +format: + revealjs: + toc: false + smaller: true + controls: true + navigation-mode: vertical + controls-layout: bottom-right + output-file: quarto_report_revealjs.html +include-in-header: + text: | + +include-after-body: + text: | + +--- + +```{python} +#| label: 'Imports' +from itables import show, init_notebook_mode +from pathlib import Path +import IPython.display as display +import altair as alt +import json +import pandas as pd +import plotly.io as pio +import requests + + +init_notebook_mode(all_interactive=True) +report_dir = Path().cwd() +``` + +A general description of the report. + +# Plots +## Interactive Plots +Optional description for section. + + +::: {.panel-tabset} + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +### Plotly Plot R +```{python} +#| label: 'Plotly Plot R 6' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/6_plotly_plot_R.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +::: + +## Static Plots +::: {.panel-tabset} + +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +::: + +# Dataframes +## All Formats +::: {.panel-tabset} + +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Example Xlsx +```{python} +#| label: 'Example Xlsx 5' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +::: + +# Networks +## Interactive Networks +Optional description for subsection. + + +::: {.panel-tabset} + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + + +
+ +
+ +::: + +## Static Networks +::: {.panel-tabset} + +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +::: + +# Html +## All Html +::: {.panel-tabset} + +### Plot + +
+ +
+ +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + + +
+ +
+ +### Multiqc Report + +
+ +
+ +::: + +# Markdown +## All Markdown +::: {.panel-tabset} + +### Readme + +```{python} +#| label: 'Readme 4' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` + +::: From 7e13c9ebddb83b8295c56d795a5afd4cd2d0f32a Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 14:11:04 +0200 Subject: [PATCH 06/18] :bug: ignore description.md and empty sections - do not use description as component in main folder - the description is added to the key description --- src/vuegen/config_manager.py | 10 +++++++++- .../streamlit_report/sections/Home/Homepage.py | 8 -------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vuegen/config_manager.py b/src/vuegen/config_manager.py index 7927d9b..fb505b1 100644 --- a/src/vuegen/config_manager.py +++ b/src/vuegen/config_manager.py @@ -330,7 +330,7 @@ def create_yamlconfig_fromdir( main_section_config = { "title": self._create_title_fromdir(base_dir_path.name), - "description": "Components added to main report folder.", + "description": "", "components": [], } # treat it as any other section. @@ -344,13 +344,21 @@ def create_yamlconfig_fromdir( ) # could be single plots? else: + print(f"Found file in main section directory: {section_dir.name}") file_in_main_section_dir = section_dir + if file_in_main_section_dir.name.lower() == "description.md": + continue # Skip description files in the main section component_config = self._create_component_config_fromfile( file_in_main_section_dir ) if component_config is not None: main_section_config["components"].append(component_config) + if not main_section_config["components"]: + # If no components were added to the main section, remove the main section + # from the list of sections + yaml_config["sections"] = yaml_config["sections"][1:] + return yaml_config, base_dir_path def initialize_report(self, config: dict) -> tuple[r.Report, dict]: diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/streamlit_report/sections/Home/Homepage.py b/tests/report_examples/Basic_example_vuegen_demo_notebook/streamlit_report/sections/Home/Homepage.py index cfdf5d6..e35e50f 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/streamlit_report/sections/Home/Homepage.py +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/streamlit_report/sections/Home/Homepage.py @@ -1,14 +1,6 @@ -import requests import streamlit as st st.markdown('''

A general description of the report.

''', unsafe_allow_html=True) -st.markdown('''

Description

''', unsafe_allow_html=True) - -with open('docs/example_data/Basic_example_vuegen_demo_notebook/description.md', 'r') as markdown_file: - markdown_content = markdown_file.read() - -st.markdown(markdown_content, unsafe_allow_html=True) - footer = ''' +include-after-body: + text: | + +--- + +```{python} +#| label: 'Imports' +from itables import show, init_notebook_mode +from pathlib import Path +import IPython.display as display +import altair as alt +import json +import pandas as pd +import plotly.io as pio +import requests + + +init_notebook_mode(all_interactive=True) +report_dir = Path().cwd() +``` + +A general description of the report. +![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.png){fig-alt= width=90%} + +# Plots +This section contains example plots. + +## Interactive Plots +Optional description for section. + +### Top Species Plot By Biome Plotly +```{python} +#| label: 'Top Species Plot By Biome Plotly 1' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Multiline Plot Altair +```{python} +#| label: 'Multiline Plot Altair 2' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +### Pie Plot Countries Plotly +```{python} +#| label: 'Pie Plot Countries Plotly 3' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Pie Plots Biomes Plotly +```{python} +#| label: 'Pie Plots Biomes Plotly 4' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Keep only 'data' and 'layout' sections +plot_json = {key: plot_json[key] for key in plot_json if key in ['data', 'layout']} + +# Remove 'frame' section in 'data' +plot_json['data'] = [{k: v for k, v in entry.items() if k != 'frame'} for entry in plot_json.get('data', [])] + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_plotly = pio.from_json(plot_json_str) +fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50)) + +fig_plotly.show() +``` + +### Saline Metagenomics Samples Map Altair +```{python} +#| label: 'Saline Metagenomics Samples Map Altair 5' +#| fig-cap: "" + +with open(report_dir /'../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json', 'r') as plot_file: + plot_json = json.load(plot_file) + +# Convert JSON to string +plot_json_str = json.dumps(plot_json) + +# Create the plotly plot +fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) + +fig_altair +``` + +## Static Plots +### Number Samples Per Study +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png){fig-alt= width=90%} + +### Animal Metagenomics Samples Map +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png){fig-alt= width=90%} + +### Alpha Diversity Host Associated Samples +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png){fig-alt= width=90%} + +### Graphical overview of VueGen workflow and components +![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_graph_abstract.png){fig-alt= width=90%} + +>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. + +# Dataframes +## All Formats +This subsection contains example dataframes. + +### Phyla Correlation Network Csv +```{python} +#| label: 'Phyla Correlation Network Csv 1' +#| fig-cap: "" + +df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Abundance Table Example Xls +```{python} +#| label: 'Abundance Table Example Xls 2' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +#### infos +```{python} +#| label: 'Abundance Table Example Xls 2 infos' +#| fig-cap: "" + +df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Txt +```{python} +#| label: 'Sample Info Example Txt 3' +#| fig-cap: "" + +df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +### Sample Info Example Parquet +```{python} +#| label: 'Sample Info Example Parquet 4' +#| fig-cap: "" + +df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') + +show(df, classes="display nowrap compact", lengthMenu=[3, 5, 10]) +``` + +# Networks +## Interactive Networks +Optional description for subsection + +### Man Example +**Number of nodes:** 9 + +**Number of edges:** 14 + + +
+ +
+ +## Static Networks +### Phyla Correlation Network +![](../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png){fig-alt= width=90%} + +# Html +## All Html +### Plot + +
+ +
+ +### Ckg Network +**Number of nodes:** 33 + +**Number of edges:** 35 + + +
+ +
+ +### Multiqc Report + +
+ +
+ +# Markdown +## All Markdown +### Readme + +```{python} +#| label: 'Readme 3' +#| fig-cap: "" + + +with open(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md', 'r') as markdown_file: + markdown_content = markdown_file.read() + +display.Markdown(markdown_content) +``` From dc061738b31a31fc754d3e57a9bf4c5cef555a0b Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 15:39:17 +0200 Subject: [PATCH 09/18] :bug: fix path to tests/report_examples --- .github/workflows/cdci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index a8c910d..d03f7f9 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -114,7 +114,7 @@ jobs: cd docs vuegen -c example_config_files/Basic_example_vuegen_demo_notebook_config.yaml -output_dir ../tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html -rt html # Check for changes - if git diff tests/report_examples | grep .; then + if git diff ../tests/report_examples | grep .; then echo "Error: One or more protected files have been modified." exit 1 fi From 2ff06f8822905cacd3a0acb29f361f1b1fcb82bb Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 16:26:01 +0200 Subject: [PATCH 10/18] :bug: add correct file ending.. --- .../html/quarto_report/quarto_report.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd index 58b241e..d4c78d5 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd @@ -51,7 +51,7 @@ report_dir = Path().cwd() ``` A general description of the report. -![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.png){fig-alt= width=90%} +![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg){fig-alt= width=90%} # Plots This section contains example plots. From 596e6c094e225ab77d2b21b662f7867d5c67dccc Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 16:50:14 +0200 Subject: [PATCH 11/18] =?UTF-8?q?=E2=9C=85=20test=20all=20report=20types?= =?UTF-8?q?=20based=20on=20quarto=20(update=20static=20path=20setting)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cdci.yml | 12 +++++++++++- .../docx/quarto_report/quarto_report.qmd | 14 +++++++------- .../html/quarto_report/quarto_report.qmd | 2 +- .../jupyter/quarto_report/quarto_report.qmd | 2 +- .../odt/quarto_report/quarto_report.qmd | 14 +++++++------- .../pdf/quarto_report/quarto_report.qmd | 2 +- .../pptx/quarto_report/quarto_report.qmd | 14 +++++++------- .../revealjs/quarto_report/quarto_report.qmd | 2 +- 8 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index d03f7f9..3d6268b 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -127,7 +127,17 @@ jobs: echo "Error: One or more protected files have been modified." exit 1 fi - + - name: check for changes in quarto report files + run: | + # write quarto based report to test folder + for format in html pdf docx odt revealjs pptx jupyter; do + vuegen -dir docs/example_data/Basic_example_vuegen_demo_notebook -output_dir tests/report_examples/Basic_example_vuegen_demo_notebook/$format -rt $format + # Check for changes + if git diff tests/report_examples | grep .; then + echo Failed for report: $format + echo "Error: One or more protected files have been modified." + exit 1 + fi publish: name: Publish package to PyPI diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd index 031e6c8..f6f1db7 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd @@ -193,7 +193,7 @@ fig_plotly.write_image("static/Plotly_Plot_R.png") df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') -df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} @@ -205,7 +205,7 @@ df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, tabl df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') -df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} @@ -217,7 +217,7 @@ df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') -df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} @@ -229,7 +229,7 @@ df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') -df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} @@ -241,7 +241,7 @@ df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conv df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') -df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} @@ -253,7 +253,7 @@ df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') -df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Example_Xlsx.png){fig-alt= width=90%} @@ -288,7 +288,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd index f068104..8cb3b3b 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/html/quarto_report/quarto_report.qmd @@ -307,7 +307,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd index 742981a..b51059f 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/jupyter/quarto_report/quarto_report.qmd @@ -307,7 +307,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd index ed11200..7bb6852 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd @@ -193,7 +193,7 @@ fig_plotly.write_image("static/Plotly_Plot_R.png") df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') -df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} @@ -205,7 +205,7 @@ df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, tabl df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') -df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} @@ -217,7 +217,7 @@ df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') -df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} @@ -229,7 +229,7 @@ df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') -df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} @@ -241,7 +241,7 @@ df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conv df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') -df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} @@ -253,7 +253,7 @@ df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') -df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Example_Xlsx.png){fig-alt= width=90%} @@ -288,7 +288,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd index c61e77f..769c57d 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd @@ -298,7 +298,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd index bfd42e8..6914941 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd @@ -194,7 +194,7 @@ fig_plotly.write_image("static/Plotly_Plot_R.png") df = pd.read_csv(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.csv') -df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Phyla_Correlation_Network_Csv.png){fig-alt= width=90%} @@ -206,7 +206,7 @@ df.dfi.export('Phyla_Correlation_Network_Csv.png', max_rows=10, max_cols=5, tabl df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls') -df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls.png){fig-alt= width=90%} @@ -218,7 +218,7 @@ df.dfi.export('Abundance_Table_Example_Xls.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.xls', sheet_name='infos') -df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Abundance_Table_Example_Xls_infos.png){fig-alt= width=90%} @@ -230,7 +230,7 @@ df.dfi.export('Abundance_Table_Example_Xls_infos.png', max_rows=10, max_cols=5, df = pd.read_table(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.txt') -df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Txt.png){fig-alt= width=90%} @@ -242,7 +242,7 @@ df.dfi.export('Sample_Info_Example_Txt.png', max_rows=10, max_cols=5, table_conv df = pd.read_parquet(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet') -df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Sample_Info_Example_Parquet.png){fig-alt= width=90%} @@ -254,7 +254,7 @@ df.dfi.export('Sample_Info_Example_Parquet.png', max_rows=10, max_cols=5, table_ df = pd.read_excel(report_dir / '../../../../../docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/5_example_xlsx.xlsx') -df.dfi.export('Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') +df.dfi.export('static/Example_Xlsx.png', max_rows=10, max_cols=5, table_conversion='matplotlib') ``` ![](static/Example_Xlsx.png){fig-alt= width=90%} @@ -289,7 +289,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd index f945070..16b1c30 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/revealjs/quarto_report/quarto_report.qmd @@ -334,7 +334,7 @@ Optional description for subsection. ### Readme ```{python} -#| label: 'Readme 4' +#| label: 'Readme 3' #| fig-cap: "" From 1da57eb46b837584cc7bc4f4f8b65d165c4379a0 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 18:39:54 +0200 Subject: [PATCH 12/18] :bug: bash for loop needs to be close using done --- .github/workflows/cdci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 3d6268b..538e6f5 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -138,6 +138,7 @@ jobs: echo "Error: One or more protected files have been modified." exit 1 fi + done publish: name: Publish package to PyPI From e52d8f3655f22ad010c3a6728b0e81d8d521b591 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Tue, 24 Jun 2025 21:11:25 +0200 Subject: [PATCH 13/18] :bug: get rid of absolute path (missed in #136) - update tests - make altair plot path relative to qmd file --- src/vuegen/quarto_reportview.py | 6 +++--- .../docx/quarto_report/quarto_report.qmd | 4 ++-- .../odt/quarto_report/quarto_report.qmd | 4 ++-- .../pdf/quarto_report/quarto_report.qmd | 4 ++-- .../pptx/quarto_report/quarto_report.qmd | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vuegen/quarto_reportview.py b/src/vuegen/quarto_reportview.py index a615ff5..738993d 100644 --- a/src/vuegen/quarto_reportview.py +++ b/src/vuegen/quarto_reportview.py @@ -85,7 +85,7 @@ def generate_report(self, output_dir: Optional[Path] = None) -> None: Will overwrite value set on initialization of QuartoReportView. """ if output_dir is not None: - self.output_dir = Path(output_dir).resolve().absolute() + self.output_dir = Path(output_dir).resolve() self.report.logger.debug( f"Generating '{self.report_type}' report in directory: '{self.output_dir}'" @@ -543,7 +543,7 @@ def _generate_plot_content(self, plot) -> List[str]: # ? should that be in the output folder static_plot_path = ( Path(self.static_dir) / f"{plot.title.replace(' ', '_')}.png" - ).absolute() + ).resolve() self.report.logger.debug(f"Static plot path: {static_plot_path}") else: html_plot_file = ( @@ -569,7 +569,7 @@ def _generate_plot_content(self, plot) -> List[str]: plot_content.append(self._generate_plot_code(plot)) if self.is_report_static: plot_content.append( - f"""fig_altair.save("{static_plot_path.as_posix()}")\n```\n""" + f"""fig_altair.save("{static_plot_path.relative_to(self.output_dir).as_posix()}")\n```\n""" ) plot_content.append(self._generate_image_content(static_plot_path)) else: diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd index f6f1db7..8136c42 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/quarto_report.qmd @@ -72,7 +72,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/static/Multiline_Plot_Altair.png") +fig_altair.save("static/Multiline_Plot_Altair.png") ``` ![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} @@ -143,7 +143,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/docx/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +fig_altair.save("static/Saline_Metagenomics_Samples_Map_Altair.png") ``` ![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd index 7bb6852..8bcea9d 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/quarto_report.qmd @@ -72,7 +72,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/static/Multiline_Plot_Altair.png") +fig_altair.save("static/Multiline_Plot_Altair.png") ``` ![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} @@ -143,7 +143,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/odt/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +fig_altair.save("static/Saline_Metagenomics_Samples_Map_Altair.png") ``` ![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd index 769c57d..57b02d3 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/quarto_report.qmd @@ -82,7 +82,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/static/Multiline_Plot_Altair.png") +fig_altair.save("static/Multiline_Plot_Altair.png") ``` ![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} @@ -153,7 +153,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pdf/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +fig_altair.save("static/Saline_Metagenomics_Samples_Map_Altair.png") ``` ![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd index 6914941..a7db1d1 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/quarto_report.qmd @@ -73,7 +73,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/static/Multiline_Plot_Altair.png") +fig_altair.save("static/Multiline_Plot_Altair.png") ``` ![](static/Multiline_Plot_Altair.png){fig-alt= width=90%} @@ -144,7 +144,7 @@ plot_json_str = json.dumps(plot_json) # Create the plotly plot fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370) -fig_altair.save("/Users/heweb/Documents/repos/vuegen/tests/report_examples/Basic_example_vuegen_demo_notebook/pptx/quarto_report/static/Saline_Metagenomics_Samples_Map_Altair.png") +fig_altair.save("static/Saline_Metagenomics_Samples_Map_Altair.png") ``` ![](static/Saline_Metagenomics_Samples_Map_Altair.png){fig-alt= width=90%} From 0286b0782f0bb571d9ffbcec400d3e177af80d7f Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Wed, 25 Jun 2025 08:42:29 +0200 Subject: [PATCH 14/18] :art: clean-up comments/prints and improve logic --- src/vuegen/config_manager.py | 12 +++++------- src/vuegen/streamlit_reportview.py | 5 +---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/vuegen/config_manager.py b/src/vuegen/config_manager.py index fb505b1..d3a613b 100644 --- a/src/vuegen/config_manager.py +++ b/src/vuegen/config_manager.py @@ -333,8 +333,6 @@ def create_yamlconfig_fromdir( "description": "", "components": [], } - # treat it as any other section. - yaml_config["sections"].append(main_section_config) # Generate sections and subsections config for section_dir in sorted_sections: @@ -344,7 +342,6 @@ def create_yamlconfig_fromdir( ) # could be single plots? else: - print(f"Found file in main section directory: {section_dir.name}") file_in_main_section_dir = section_dir if file_in_main_section_dir.name.lower() == "description.md": continue # Skip description files in the main section @@ -354,10 +351,11 @@ def create_yamlconfig_fromdir( if component_config is not None: main_section_config["components"].append(component_config) - if not main_section_config["components"]: - # If no components were added to the main section, remove the main section - # from the list of sections - yaml_config["sections"] = yaml_config["sections"][1:] + if main_section_config["components"]: + # If components were added to the main section, i.e. there were components + # found in the main report directory, add it to the first position of the + # list of sections + yaml_config["sections"].insert(0, main_section_config) return yaml_config, base_dir_path diff --git a/src/vuegen/streamlit_reportview.py b/src/vuegen/streamlit_reportview.py index ab14b47..5ede75a 100644 --- a/src/vuegen/streamlit_reportview.py +++ b/src/vuegen/streamlit_reportview.py @@ -150,15 +150,12 @@ def generate_report(self, output_dir: str = SECTIONS_DIR) -> None: report_manag_content.append("\nsections_pages = {}") # Generate the home page and update the report manager content - # ! top level files (compontents) are added to the home page self._generate_home_section( output_dir=output_dir, report_manag_content=report_manag_content, ) - # ! move this into the _generate_home_section method - subsection_page_vars = [] - for section in self.report.sections: # skip home section components + for section in self.report.sections: # Create a folder for each section subsection_page_vars = [] section_name_var = make_valid_identifier( From e3f0510c66eaab918c3a75c0fb999dc1fdf78fe9 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Wed, 25 Jun 2025 10:21:18 +0200 Subject: [PATCH 15/18] =?UTF-8?q?=F0=9F=93=9D=20Update=20example=20config?= =?UTF-8?q?=20files=20for=20basic=20and=20EMP=20case=20studies=20and=20upd?= =?UTF-8?q?ate=20execution=20section=20of=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++ ...c_example_vuegen_demo_notebook_config.yaml | 44 +++++++++---------- ...icrobiome_vuegen_demo_notebook_config.yaml | 35 +++++++-------- 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index c345d64..73a63ab 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,9 @@ vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --rep > [!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. +> You can also specify the output directory with the `--output_directory` argumument, which defaults to the current working directory. +> See all available arguments with the `--help` option. + ### Folder structure @@ -154,6 +157,8 @@ report_folder/ 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. +### Configuration file + It's also possible to provide a configuration file instead of a directory: ```bash @@ -162,6 +167,8 @@ vuegen --config docs/example_config_files/Earth_microbiome_vuegen_demo_notebook. 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 component paths in the configuration file can be absolute or relative to the execution directory. + The current report types supported by VueGen are: - Streamlit diff --git a/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml b/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml index 9943529..57ffae7 100644 --- a/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml +++ b/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml @@ -1,8 +1,8 @@ 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 + graphical_abstract: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.png + logo: https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.png sections: - title: Plots description: This section contains example plots. @@ -11,37 +11,37 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/description.md description: '' caption: '' component_type: markdown @@ -49,19 +49,19 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png description: '' caption: '' component_type: plot @@ -82,27 +82,27 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.parquet description: '' caption: '' component_type: dataframe @@ -114,13 +114,13 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/description.md description: '' caption: '' component_type: markdown @@ -128,7 +128,7 @@ sections: 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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png description: '' caption: '' component_type: plot @@ -140,18 +140,18 @@ sections: description: '' components: - title: Plot - file_path: example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/1_plot.html + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/3_multiqc_report.html description: '' caption: '' component_type: html @@ -162,7 +162,7 @@ sections: description: '' components: - title: Readme - file_path: example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md + file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md description: '' caption: '' component_type: markdown diff --git a/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml b/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml index f8614f0..6013ad5 100644 --- a/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml +++ b/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml @@ -22,26 +22,26 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/4_saline_samples_map.json description: '' caption: '' component_type: PLOT @@ -62,13 +62,13 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/1_alpha_diversity/2_alpha_diversity_free_living_samples.json description: '' caption: '' component_type: PLOT @@ -77,13 +77,13 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 @@ -92,39 +92,38 @@ sections: description: '' components: - title: Nestedness Random Subset - file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/1_nestedness_random_subset.csv + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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. + 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 @@ -140,21 +139,21 @@ sections: 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 + file_path: ./docs/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 + file_path: ./docs/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 + file_path: ./docs/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 From df2ea1e5b760309a81eb5557a2fd8e25a8868ced Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Wed, 25 Jun 2025 10:39:39 +0200 Subject: [PATCH 16/18] =?UTF-8?q?=F0=9F=92=9A=20Correct=20paths=20relative?= =?UTF-8?q?=20to=20the=20docs=20folder=20to=20pass=20CI=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...c_example_vuegen_demo_notebook_config.yaml | 40 +++++++++---------- ...icrobiome_vuegen_demo_notebook_config.yaml | 32 +++++++-------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml b/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml index 57ffae7..a54a1a2 100644 --- a/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml +++ b/docs/example_config_files/Basic_example_vuegen_demo_notebook_config.yaml @@ -11,37 +11,37 @@ sections: description: Optional description for section. components: - title: Top Species Plot By Biome Plotly - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/1_top_species_plot_by_biome_plotly.json + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/2_multiline_plot_altair.json + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/3_pie_plot_countries_plotly.json + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/4_pie_plots_biomes_plotly.json + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/5_saline_metagenomics_samples_map_altair.json + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/description.md + file_path: example_data/Basic_example_vuegen_demo_notebook/1_Plots/1_Interactive_plots/description.md description: '' caption: '' component_type: markdown @@ -49,19 +49,19 @@ sections: description: '' components: - title: Number Samples Per Study - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/1_number_samples_per_study.png + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/2_animal_metagenomics_samples_map.png + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/1_Plots/2_Static_plots/3_alpha_diversity_host_associated_samples.png + 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 @@ -82,27 +82,27 @@ sections: description: This subsection contains example dataframes. components: - title: Phyla Correlation Network Csv - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/1_phyla_correlation_network_csv.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: ./docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/2_abundance_table_example_xls.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: ./docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/3_sample_info_example_txt.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: ./docs/example_data/Basic_example_vuegen_demo_notebook/2_Dataframes/1_All_formats/4_sample_info_example_parquet.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 @@ -114,13 +114,13 @@ sections: description: Optional description for subsection components: - title: Man Example - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/1_man_example.graphml + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/description.md + file_path: example_data/Basic_example_vuegen_demo_notebook/3_Networks/1_Interactive_networks/description.md description: '' caption: '' component_type: markdown @@ -128,7 +128,7 @@ sections: description: '' components: - title: Phyla Correlation Network - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png + file_path: example_data/Basic_example_vuegen_demo_notebook/3_Networks/2_Static_networks/1_phyla_correlation_network.png description: '' caption: '' component_type: plot @@ -140,18 +140,18 @@ sections: description: '' components: - title: Plot - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/1_plot.html + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/2_ckg_network.html + 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: ./docs/example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/3_multiqc_report.html + file_path: example_data/Basic_example_vuegen_demo_notebook/4_Html/1_All_html/3_multiqc_report.html description: '' caption: '' component_type: html @@ -162,7 +162,7 @@ sections: description: '' components: - title: Readme - file_path: ./docs/example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md + file_path: example_data/Basic_example_vuegen_demo_notebook/5_Markdown/1_All_markdown/README.md description: '' caption: '' component_type: markdown diff --git a/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml b/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml index 6013ad5..626d37e 100644 --- a/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml +++ b/docs/example_config_files/Earth_microbiome_vuegen_demo_notebook_config.yaml @@ -22,26 +22,26 @@ sections: description: '' components: - title: Metadata Random Subset - file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/1_metadata_random_subset.csv + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/2_animal_samples_map.png + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/3_plant_samples_map.json + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/1_Exploratory_data_analysis/1_sample_exploration/4_saline_samples_map.json + 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 @@ -62,13 +62,13 @@ sections: dataset. components: - title: Alpha Diversity Host Associated Samples - file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/1_alpha_diversity/1_alpha_diversity_host_associated_samples.png + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/1_alpha_diversity/2_alpha_diversity_free_living_samples.json + 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 @@ -77,13 +77,13 @@ sections: description: '' components: - title: Average Copy Number Emp Ontology Level2 - file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/2_average_copy_number/1_average_copy_number_emp_ontology_level2.png + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/2_average_copy_number/2_average_copy_number_emp_ontology_level3.json + 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 @@ -92,32 +92,32 @@ sections: description: '' components: - title: Nestedness Random Subset - file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/1_nestedness_random_subset.csv + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/2_all_samples.json + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/3_plant_samples.json + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/4_animal_samples.png + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/5_non_saline_samples.png + file_path: example_data/Earth_microbiome_vuegen_demo_notebook/2_Metagenomics/3_nestedness/5_non_saline_samples.png description: '' caption: '' component_type: PLOT @@ -139,21 +139,21 @@ sections: description: '' components: - title: Phyla Counts Subset - file_path: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/1_phyla_counts_subset.csv + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/2_phyla_correlation_network_with_0.5_threshold_edgelist.csv + 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: ./docs/example_data/Earth_microbiome_vuegen_demo_notebook/3_Network_analysis/1_phyla_association_networks/3_phyla_correlation_network_with_0.5_threshold.png + 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 From f414b802c8539c5d48ddeb1f740a7a86f6d3e480 Mon Sep 17 00:00:00 2001 From: sayalaruano Date: Wed, 25 Jun 2025 10:43:02 +0200 Subject: [PATCH 17/18] =?UTF-8?q?=F0=9F=93=9D=20Update=20README=20with=20d?= =?UTF-8?q?etails=20about=20running=20vuegen=20using=20the=20cofig=20exmap?= =?UTF-8?q?le=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73a63ab..a7aa4fd 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ vuegen --config docs/example_config_files/Earth_microbiome_vuegen_demo_notebook. 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 component paths in the configuration file can be absolute or relative to the execution directory. +The component paths in the configuration file can be absolute or relative to the execution directory. In the examples, we assume that the working directory is the `docs` folder, so the paths are relative to it. If you run VueGen from another directory, you need to adjust the paths accordingly. The current report types supported by VueGen are: From 31884cfa21fbced06897c064fd8588ac53ceb9bf Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Wed, 25 Jun 2025 10:51:32 +0200 Subject: [PATCH 18/18] :bug: commit change to test from svg to png logo --- .../html/quarto_report/quarto_report.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd b/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd index d4c78d5..58b241e 100644 --- a/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd +++ b/tests/report_examples/Basic_example_vuegen_demo_notebook_cfg/html/quarto_report/quarto_report.qmd @@ -51,7 +51,7 @@ report_dir = Path().cwd() ``` A general description of the report. -![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.svg){fig-alt= width=90%} +![](https://raw.githubusercontent.com/Multiomics-Analytics-Group/vuegen/main/docs/images/vuegen_logo.png){fig-alt= width=90%} # Plots This section contains example plots.