From 9859d6f25f6d618e9c52e7a0e6489d34db98a075 Mon Sep 17 00:00:00 2001 From: Nicholas Minor Date: Tue, 19 Nov 2024 14:47:33 -0600 Subject: [PATCH] fixing kwarg issue with log --- bin/multisample_plot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/multisample_plot.py b/bin/multisample_plot.py index 98f447a..fe0d18b 100755 --- a/bin/multisample_plot.py +++ b/bin/multisample_plot.py @@ -36,8 +36,8 @@ import argparse import json -from math import log import os +from math import log10 from pathlib import Path import polars as pl @@ -218,7 +218,8 @@ def accumulate_cov_dfs(directory: str, sample_lookup: dict[str, str]) -> pl.Data def plot_log_coverages( - all_barcodes: pl.DataFrame, min_desired_depth: int = 20 + all_barcodes: pl.DataFrame, + min_desired_depth: int = 20, ) -> ggplot: """ Create a line plot of log-transformed coverage depth across different samples and chromosomes. @@ -246,7 +247,7 @@ def plot_log_coverages( barcodes_log = all_barcodes.with_columns( pl.col("coverage").log(base=10).alias("log_coverage"), ) - log_desired_depth = log(min_desired_depth, base=10) + log_desired_depth = log10(min_desired_depth) return ( ggplot( barcodes_log.to_pandas(),