Skip to content

Commit

Permalink
Merge pull request #174 from PixelgenTechnologies/dev
Browse files Browse the repository at this point in the history
Release 0.18.2
  • Loading branch information
johandahlberg authored Jul 16, 2024
2 parents 22ec8d8 + a8b5bd2 commit ef58e21
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 130 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.18.2] - 2024-07-16

### Changed

- Bump polars to stable 1.x series

### Fixed

- Fix a qc report crash issue when the layout stage is run in a pipeline due to an unsupported parameter type.

## [0.18.1] - 2024-07-12

### Changed

- Bump `umi_tools` version requirements
- Bump `umi_tools` version requirements

## [0.18.0] - 2024-07-11

Expand Down
237 changes: 119 additions & 118 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ pyarrow = ">=14,<16"
semver = "^3.0.0"
ruamel-yaml = "^0.17.21"
pydantic = ">=2.0,<2.5"
# Pin to 0.20.19 to fix a bug in lazy collect projection_pushdown optimzation
polars = "0.20.19"
polars = ">=1.0.0,<2.0.0"
importlib-resources = "^5.12.0"
fsspec = "^2023.12.2"
fastparquet = "^2023.8.0"
Expand Down
2 changes: 1 addition & 1 deletion src/pixelator/analysis/analysis_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def edgelist_to_component_stream(
.items()
):
yield (
component_id,
str(component_id[0]), # component id is a tuple here, hence the [0]
Graph.from_edgelist(
edgelist=component_df.lazy(),
add_marker_counts=True,
Expand Down
2 changes: 1 addition & 1 deletion src/pixelator/graph/community_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def recovered_component_info(
merged.select(pl.col("component"), pl.col("component_new")) # type: ignore
.group_by(pl.col("component"))
.agg(pl.col("component_new").unique().drop_nulls())
.collect(streaming=True, projection_pushdown=False)
.collect(streaming=True)
.iter_rows()
)

Expand Down
4 changes: 2 additions & 2 deletions src/pixelator/graph/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def _update_edgelist_membership_lazy_frame(
}

def _map_edge_index_to_component_id():
return pl.col("edge_index").map_dict(edge_index_to_component_mapping)
return pl.col("edge_index").replace(edge_index_to_component_mapping)

def _build_component_name_str():
return pl.format(
Expand All @@ -457,7 +457,7 @@ def _build_component_name_str():
.with_columns(_build_component_name_str().alias("component"))
)
edgelist_with_component_info = edgelist_with_component_info.drop(
columns=["edge_index", "component_index"]
["edge_index", "component_index"]
)
return edgelist_with_component_info

Expand Down
4 changes: 2 additions & 2 deletions src/pixelator/pixeldataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def edgelist(self, value: pd.DataFrame) -> None:
def edgelist_lazy(self) -> pl.LazyFrame:
"""Get the edge list as a lazy dataframe."""
lz_edgelist = self._backend.edgelist_lazy
if "index" in lz_edgelist.columns:
if "index" in set(lz_edgelist.collect_schema().names()):
warnings.warn(
"A column called `index` was identified in your edgelist. "
"This will be removed."
Expand Down Expand Up @@ -243,7 +243,7 @@ def graph(
potential_component = self.edgelist_lazy.filter(
pl.col("component") == component_id
)
if potential_component.fetch(1).is_empty():
if potential_component.head(1).collect().is_empty():
raise KeyError(f"{component_id} not found in edgelist")
return Graph.from_edgelist(
potential_component,
Expand Down
2 changes: 1 addition & 1 deletion src/pixelator/pixeldataset/precomputed_layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def data():
.sort_index(axis=1)
)
.with_columns(
component=pl.lit(component),
component=pl.lit(component[0]),
graph_projection=pl.lit("bipartite"),
layout=pl.lit(layout_algorithm),
)
Expand Down
4 changes: 2 additions & 2 deletions src/pixelator/report/qcreport/template.html

Large diffs are not rendered by default.

0 comments on commit ef58e21

Please sign in to comment.