Skip to content

Commit

Permalink
fixing kwarg issue with log
Browse files Browse the repository at this point in the history
  • Loading branch information
nrminor committed Nov 19, 2024
1 parent ad2e77b commit 9859d6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/multisample_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 9859d6f

Please sign in to comment.