diff --git a/microview/file_finder.py b/microview/file_finder.py index 83f67a7..5edd42f 100644 --- a/microview/file_finder.py +++ b/microview/file_finder.py @@ -120,7 +120,6 @@ def detect_report_type(report_paths: List[Path], console) -> List[Sample]: console.print("\n Could not find any valid reports", style="red") raise Exception("Could not find any valid files.") else: - kraken_not_in_kaiju = list( filter(lambda report: report not in kaiju_reports, kraken_reports) ) diff --git a/microview/parse_taxonomy.py b/microview/parse_taxonomy.py index 5f7b928..2fd3725 100644 --- a/microview/parse_taxonomy.py +++ b/microview/parse_taxonomy.py @@ -46,7 +46,6 @@ def parse_kaiju2table(sample_name: str, df, parsed_stats: Dict) -> None: Parses kaiju report """ for row in df.itertuples(): - row_dict = {"n_reads": row.reads, "percent": row.percent} if row.taxon_name == "unclassified": parsed_stats[sample_name].update({"unclassified": row_dict}) diff --git a/microview/plotting.py b/microview/plotting.py index 8eac5c9..1d221cb 100644 --- a/microview/plotting.py +++ b/microview/plotting.py @@ -1,5 +1,6 @@ -from typing import Dict, Optional from pathlib import Path +from typing import Dict, Optional + from plotly import io from plotly.express import bar, colors, line, scatter from plotly.graph_objects import Figure @@ -156,7 +157,9 @@ def generate_taxo_plots(tax_data: Dict, contrast_df=None) -> Dict: # TODO: Improve this check if contrast_df is not None and "group" in contrast_df.columns: - contrast_df['sample'] = [str(Path(s).name) for s in contrast_df['sample'].to_list()] + contrast_df["sample"] = [ + str(Path(s).name) for s in contrast_df["sample"].to_list() + ] merged_taxas_df = merge_with_contrasts(tax_data["common taxas"], contrast_df) common_taxas = plot_common_taxas(merged_taxas_df, facet_col="group")