Skip to content

Commit

Permalink
Read outlines or masks from segmentation_file_regex parameter (#25)
Browse files Browse the repository at this point in the history
* add shrink data script and duckdb

* add example images

* read outlines, masks from segmentation_file_regex

* Create BR00143976_shrunken.parquet

* updated lockfile

* update notebook
  • Loading branch information
d33bs authored Nov 12, 2024
1 parent 25fac60 commit e3e3962
Show file tree
Hide file tree
Showing 18 changed files with 442 additions and 85 deletions.
151 changes: 122 additions & 29 deletions docs/src/examples/cytodataframe_at_a_glance.ipynb

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/src/examples/cytodataframe_at_a_glance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
jump_data_path = "../../../tests/data/cytotable/JUMP_plate_BR00117006"
nf1_cellpainting_path = "../../../tests/data/cytotable/NF1_cellpainting_data_shrunken/"
nuclear_speckles_path = "../../../tests/data/cytotable/nuclear_speckles"
pediatric_cancer_atlas_path = (
"../../../tests/data/cytotable/pediatric_cancer_atlas_profiling"
)
# -
# %%time
# view JUMP plate BR00117006 with images
Expand Down Expand Up @@ -107,3 +110,22 @@
"Image_FileName_GOLD",
]
][:3]

# %%time
# view ALSF pediatric cancer atlas plate BR00143976 with images
CytoDataFrame(
data=f"{pediatric_cancer_atlas_path}/BR00143976_shrunken.parquet",
data_context_dir=f"{pediatric_cancer_atlas_path}/images/orig",
data_outline_context_dir=f"{pediatric_cancer_atlas_path}/images/outlines",
segmentation_file_regex={
r"CellsOutlines_BR(\d+)_C(\d{2})_\d+\.tiff": r".*ch3.*\.tiff",
r"NucleiOutlines_BR(\d+)_C(\d{2})_\d+\.tiff": r".*ch5.*\.tiff",
},
)[
[
"Metadata_ImageNumber",
"Metadata_Nuclei_Number_Object_Number",
"Image_FileName_OrigAGP",
"Image_FileName_OrigDNA",
]
][:3]
2 changes: 1 addition & 1 deletion media/coverage-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 63 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jupytext = "^1.16.4"
black = "^24.10.0"
isort = "^5.13.2"
jupyterlab-code-formatter = "^3.0.2"
duckdb = "^1.1.3"

[tool.poetry.group.docs.dependencies]
# used for rendering docs into docsite
Expand Down
Loading

0 comments on commit e3e3962

Please sign in to comment.