Skip to content

Commit

Permalink
Fix mod 2 bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmymathews committed Aug 14, 2023
1 parent ea11460 commit 35fc485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spatialprofilingtoolbox/ondemand/service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ def get_squidpy_metrics(
radius: float | None = None,
) -> SquidpyMetricsComputationResult:
"""Get spatial proximity statistics between phenotype clusters as calculated by Squidpy."""
if not len(signature) in {1, 2}:
raise ValueError(f'Expected 1 or 2 signatures/phenotypes but got {len(signature)}.')
if not len(signature) in {2, 4}:
message = f'Expected 2 or 4 channel lists (1 or 2 phenotypes) but got {len(signature)}.'
raise ValueError(message)
separator = self._get_record_separator()
groups = [feature_class, self._sanitize_token(study)]
groups.extend(separator.join([self._sanitize_token(c) for c in s]) for s in signature)
Expand Down

0 comments on commit 35fc485

Please sign in to comment.