From 6da2b1c6604d08fa1e0e5fdf7edd17885a469563 Mon Sep 17 00:00:00 2001 From: sdewin Date: Mon, 8 Jul 2024 10:27:38 +0200 Subject: [PATCH] change groupby to group_by syntax --- src/scatac_fragment_tools/cli/commands.py | 2 +- src/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scatac_fragment_tools/cli/commands.py b/src/scatac_fragment_tools/cli/commands.py index 8bd7007..e30165e 100644 --- a/src/scatac_fragment_tools/cli/commands.py +++ b/src/scatac_fragment_tools/cli/commands.py @@ -143,7 +143,7 @@ def command_split_fragments_by_cell_type(args): d_cell_type_to_cell_barcode_definition = pl.scan_csv( args.path_to_cell_type_to_cell_barcode_definition, separator=args.separator) \ - .groupby([args.sample_column_name, args.cell_type_column_name]) \ + .group_by([args.sample_column_name, args.cell_type_column_name]) \ .agg(pl.col(args.cell_barcode_column_name)) \ .collect() \ .to_dict() diff --git a/src/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py b/src/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py index bbbacfe..df22e86 100644 --- a/src/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py +++ b/src/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py @@ -232,7 +232,7 @@ def read_fragments_to_polars_df( "Score" not in fragments_df_pl.columns or fragments_df_pl.schema["Score"] == pl.Utf8 ): - fragments_df_pl = fragments_df_pl.groupby( + fragments_df_pl = fragments_df_pl.group_by( ["Chromosome", "Start", "End", "Name"] ).agg(pl.len().cast(pl.Int32()).alias("Score")) else: