Skip to content

Commit

Permalink
Tkakar/cat 1017 add 3d seg support (#146)
Browse files Browse the repository at this point in the history
* Fixed mudata column names reading

* Updated containers and versions

* Changed sprm-json version

* Updated input file in workflow

* Minor comment move
  • Loading branch information
tkakar authored Feb 18, 2025
1 parent f97102a commit 544f1f4
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion containers/seg-mudata-to-zarr/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.4
0.0.5
2 changes: 2 additions & 0 deletions containers/seg-mudata-to-zarr/context/create_zarr_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def create_zarr_for_masks(mdata, output_path):
None
"""
try:
# to remove default: in the obs column-names
mdata.obs.columns = mdata.obs.columns.str.replace('default:', '')
if mask_name_col not in mdata.obs.columns.str.lower():
raise ValueError(f"Column '{mask_name_col}' not found in mdata.obs")

Expand Down
2 changes: 0 additions & 2 deletions containers/seg-mudata-to-zarr/create-test-input.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ def create_h5mu(h5mu_path):
)

mdata = MuData({'default': adata})
# to remove default: in the obs column-names
mdata.obs.columns = mdata.obs.columns.str.replace('default:', '')
mdata.write(h5mu_path)


Expand Down
Binary file modified containers/seg-mudata-to-zarr/test-input/objects.h5mu
Binary file not shown.
2 changes: 1 addition & 1 deletion containers/sprm-to-json/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.5
0.0.6
4 changes: 2 additions & 2 deletions containers/sprm-to-json/context/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def create_factors(tile_str, input_dir, output_dir):
input_dir, tile_str, is_genes=False
)
for cluster_type in cluster_types:
cluster_names = sorted(df[cluster_type].unique().astype("uint8"))
cluster_names = sorted(df[cluster_type].unique())
factors[cluster_type] = {
"map": [str(cluster) for cluster in cluster_names],
"cells": {k: v[cluster_type] for (k, v) in df_items},
Expand All @@ -106,7 +106,7 @@ def create_cell_sets(tile_str, input_dir, output_dir):
)

for cluster_type in cluster_types:
cluster_names = sorted(df[cluster_type].unique().astype("uint8"))
cluster_names = sorted(df[cluster_type].unique())
cell_sets["tree"].append({
"name": cluster_type,
"children": [
Expand Down
2 changes: 1 addition & 1 deletion seg-mudata-to-zarr.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class: CommandLineTool
baseCommand: ['python', '/main.py', '--output_dir', './seg-to-mudata-zarr', '--input_dir']
hints:
DockerRequirement:
dockerPull: hubmap/portal-container-seg-mudata-to-zarr:0.0.4
dockerPull: hubmap/portal-container-seg-mudata-to-zarr:0.0.5
inputs:
input_directory:
type: Directory
Expand Down
2 changes: 1 addition & 1 deletion sprm-to-json.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class: CommandLineTool
baseCommand: ['python', '/main.py', '--output_dir', './output_json', '--input_dir']
hints:
DockerRequirement:
dockerPull: hubmap/portal-container-sprm-to-json:0.0.4
dockerPull: hubmap/portal-container-sprm-to-json:0.0.5
inputs:
input_directory:
type: Directory
Expand Down
Binary file modified workflows/seg-mudata-to-zarr/test-input/objects.h5mu
Binary file not shown.

0 comments on commit 544f1f4

Please sign in to comment.