From 51e0652fcaf8354c80db16ba8e66a69870c8a2a3 Mon Sep 17 00:00:00 2001 From: jvfe Date: Thu, 2 May 2024 15:09:43 -0300 Subject: [PATCH] style: Black files Signed-off-by: jvfe --- microview/cli.py | 4 +++- microview/plotting.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/microview/cli.py b/microview/cli.py index 5556a97..b14f0be 100644 --- a/microview/cli.py +++ b/microview/cli.py @@ -70,7 +70,9 @@ def main(taxonomy: Path, csv_file: Path, output: Path) -> None: tax_results = get_tax_data(reports) # TODO: Improve this double check if parsed_result is not None: - tax_plots = generate_taxo_plots(tax_results, parsed_result["dataframe"], output_path=output) + tax_plots = generate_taxo_plots( + tax_results, parsed_result["dataframe"], output_path=output + ) else: tax_plots = generate_taxo_plots(tax_results, output_path=output) render_base(tax_plots=tax_plots, dir_path=data_source, output_path=output) diff --git a/microview/plotting.py b/microview/plotting.py index d285f68..970df42 100644 --- a/microview/plotting.py +++ b/microview/plotting.py @@ -28,6 +28,7 @@ def export_to_html(fig: Figure, div_id: str) -> str: config=config, ) + def write_table(df, output_path, path): """ Write a dataframe to a file @@ -38,6 +39,7 @@ def write_table(df, output_path, path): df.to_csv(path, sep="\t", index=False) + def merge_with_contrasts(df, contrast_df, left_colname: Optional[str] = "index"): """ Merges a dataframe with the dataframe containing contrasts (or groups) @@ -180,7 +182,9 @@ def generate_taxo_plots(tax_data: Dict, contrast_df=None, output_path=None) -> D ] merged_taxas_df = merge_with_contrasts(tax_data["common taxas"], contrast_df) - common_taxas = plot_common_taxas(merged_taxas_df,output_path, facet_col="group") + common_taxas = plot_common_taxas( + merged_taxas_df, output_path, facet_col="group" + ) common_taxas.update_xaxes(matches=None) abund_div = plot_abund_div(