Skip to content

Commit

Permalink
Merge pull request #7 from aertslab/update_polars_groupby_syntax
Browse files Browse the repository at this point in the history
Update polars groupby syntax
  • Loading branch information
SeppeDeWinter authored Jul 8, 2024
2 parents 6c1b626 + 5365d4c commit 27b3a05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "_rust_scatac_fragment_tools"
version = "0.1.1"
version = "0.1.2"
authors = ["Seppe De Winter <seppe.dewinter@kuleuven.be>", "Gert Hulselmans <gert.hulselmans@kuleuven.be>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion src/scatac_fragment_tools/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 27b3a05

Please sign in to comment.