Skip to content

Commit

Permalink
style: Black files
Browse files Browse the repository at this point in the history
Signed-off-by: jvfe <[email protected]>
  • Loading branch information
jvfe committed May 2, 2024
1 parent 0744a70 commit 51e0652
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion microview/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion microview/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 51e0652

Please sign in to comment.