Skip to content

Commit 3a1d9b3

Browse files
authored
Merge pull request #30 from elmbeech/master
pcdl release v4.0.1
2 parents ccad4ee + 478bb00 commit 3a1d9b3

File tree

79 files changed

+3862
-3644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3862
-3644
lines changed

.github/workflows/apple.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ run-name: ${{ github.actor }}::pytest pcdl library on mac os x; the latest pytho
77

88
on:
99
push:
10-
branches: ["master", "v3", "v4"]
11-
#pull_request:
12-
# branches: ["master", "v3", "v4"]
10+
branches: ["utest"] # ["master", "v3", "v4"]
1311

1412
jobs:
1513
build-macosx:
1614
runs-on: macos-latest
1715
strategy:
1816
fail-fast: false
1917
matrix:
20-
python-version: ["3.13"]
21-
#python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
#python-version: ["3.14"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2220

2321
env:
2422
PYTHONPATH: /Users/runner/work/physicelldataloader/physicelldataloader

.github/workflows/linux.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ run-name: ${{ github.actor }}::pytest pcdl library on linux os; all python3 vers
77

88
on:
99
push:
10-
branches: ["master", "v3", "v4"]
11-
#pull_request:
12-
# branches: ["master", "v3", "v4"]
10+
branches: ["utest"] # ["master", "v3", "v4"]
1311

1412
jobs:
1513
build-linux:
1614
runs-on: ubuntu-latest
1715
strategy:
1816
fail-fast: false
1917
matrix:
20-
python-version: ["3.13"]
21-
#python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
#python-version: ["3.14"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2220

2321
env:
2422
PYTHONPATH: /home/runner/work/physicelldataloader/physicelldataloader

.github/workflows/windows.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ run-name: ${{ github.actor }}::pytest pcdl library on windows os; the latest pyt
77

88
on:
99
push:
10-
branches: ["master", "v3", "v4"]
11-
#pull_request:
12-
# branches: ["master", "v3", "v4"]
10+
branches: ["utest"] # ["master", "v3", "v4"]
1311

1412
jobs:
1513
build-windows:
1614
runs-on: windows-latest
1715
strategy:
1816
fail-fast: false
1917
matrix:
20-
python-version: ["3.13"]
21-
#python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18+
#python-version: ["3.14"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2220

2321
env:
2422
PYTHONPATH: D:\a\physicelldataloader\physicelldataloader

README.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ into [python3](https://en.wikipedia.org/wiki/Python_(programming_language)).
88

99
pcdl was forked from the original [PhysiCell-Tools](https://github.com/PhysiCell-Tools) [python-loader](https://github.com/PhysiCell-Tools/python-loader) implementation.
1010

11-
The pcdl python3 library maintains three branches:
11+
The pcdl python3 library maintains four branches:
1212

1313
+ **Branch version 1** is the original PhysiCell-Tools/python-loader code.
1414
+ **Branch version 2** will be strictly compatible with the original PhysiCell-Tools/python-loader code, although pip installable.
1515
+ **Branch version 3** might break with old habits, although tries to be as much downward compatible as possible.
1616
The aim of the v3 branch is to get a very lean and agile python3 physicell output interface for the ones coming from the python3 world.
17+
+ Finally, **Branch version 4** reimplemented the backend in a more python3, less C++ like manner.
1718

1819

1920
## Header:
2021

21-
+ Language: python [>= 3.9](https://devguide.python.org/versions/)
22+
+ Language: python [>= 3.10](https://devguide.python.org/versions/)
2223
+ Library dependencies: anndata, bioio, matplotlib, numpy, pandas, (requests), scipy, vtk
2324
+ Date of origin original PhysiCell-Tools python-loader: 2019-09-02
2425
+ Date of origin pcdl fork: 2022-08-30
@@ -28,12 +29,12 @@ The pcdl python3 library maintains three branches:
2829
+ Source code: [https://github.com/elmbeech/physicelldataloader](https://github.com/elmbeech/physicelldataloader)
2930

3031

31-
## HowTo Guide:
32+
## ✨ HowTo Guide:
3233

3334
+ [installation and troubleshooting](https://github.com/elmbeech/physicelldataloader/tree/master/man/HOWTO.md)
3435

3536

36-
## Tutorial:
37+
## ✨ Tutorial:
3738

3839
Basics Tutorials:
3940

@@ -63,17 +64,15 @@ Extras tutorials for GUI software:
6364
+ [pcdl and paraview](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_paraview.md)
6465
+ [pcdl and blender](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_blender.md)
6566
+ [pcdl and napari](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_python3_napari.md)
66-
+ [pcdl and fiji imagej](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_fijiimagej.md)
67-
<!--
68-
+ [pcdl and neuroglancer](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_(python3)_neuroglancer.md)
69-
-->
67+
+ [pcdl and fiji imagej, icy, qupath](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_fijiimagej.md)
68+
+ [pcdl and neuroglancer](https://github.com/elmbeech/physicelldataloader/tree/master/man/TUTORIAL_neuroglancer.md)
7069

7170
Slides:
7271

7372
+ [presentations given](https://github.com/elmbeech/physicelldataloader/tree/master/man/lecture)
7473

7574

76-
## Reference Manual:
75+
## &#x2728; Reference Manual:
7776

7877
+ [API application interface](https://github.com/elmbeech/physicelldataloader/tree/master/man/REFERENCE.md)
7978

@@ -95,11 +94,14 @@ Within the pcdl library, we tried to stick to the documentation policy laid out
9594
+ fork pcdl co-programmer: Furkan Kurtoglu, Jennifer Eng, Heber Rocha
9695
+ fork pcdl continuous testing and feedbacks: Aneequa Sundus, John Metzcar
9796
+ student prj on pcdl:
98-
Benjamin Jacobs (make\_gml),
97+
Benjamin Jacobs (make\_graph\_gml),
98+
Jason Lu (render\_neuroglancer),
9999
Katie Pletz (beta testing),
100+
Leena Sohail (beta testing),
100101
Marshal Gress (plot\_scatter),
101102
Nick Oldfather (unit test model),
102-
Thierry-Pascal Fleurant (plot\_timeseries)
103+
Thierry-Pascal Fleurant (plot\_timeseries),
104+
Viviana Kwong (render\_neuroglancer)
103105

104106
Developers, please make pull requests to the https://github.com/elmbeech/physicelldataloader/tree/development branch. Thanks!
105107

@@ -121,13 +123,44 @@ Developers, please make pull requests to the https://github.com/elmbeech/physice
121123
## Road Map:
122124

123125
+ evt generate lineage tree graph output files.
124-
+ evt add neuroglancer ome.tiff support.
125-
+ evt add DataDiVR support.
126126

127127
## Release Notes:
128+
+ version 4.0.1 (2025-06-24): elmbeech/physicelldataloader
129+
+ man updated.
130+
+ minor bugfixes.
131+
132+
+ version 4.0.0 (2025-05-13): elmbeech/physicelldataloader
133+
+ v4 was forked from v3.3.4!
134+
+ **mcds.data** struct was rewritten in more python less c++ way.
135+
+ pyMCDS.py and part of pyAnnData.py was fused to **timestep.py**.
136+
+ pyMCDSts.py and part of pyAnnData.py was fused to **timeseries.py**.
137+
+ pyCLI.py was renames to **commandline.py**.
138+
+ data\_timeseries.py was renamed to **output_data.py**.
139+
+ TimeStep function **get_concentration** was deprecated because pandas already has this functionlity.
140+
+ TimeStep function **get_concentration_at** was deprecated because pandas already has this functionlity.
141+
+ TimeStep function **get_cell_df_at** was deprecated because pandas already has this functionlity.
142+
+ **make_conc_vtk** and **make_cell_vtk** on the fly visualization was removed because paraview is good enough.
143+
+ new TimeStep **get_cell_attribute_list** function, to retrieve a list of all tracked cell attribute labels.
144+
+ new **pcdl_get_cell_attribute_list** function, to retrieve a list of all tracked cell attribute labels.
145+
+ new **render_neuroglancer** function, to render ome tiff image into neuroglancer.
146+
+ new **pcdl_render_neuroglancer** function, to render ome tiff images into neuroglancer.
147+
148+
+ version 3.3.7 (2025-06-01): elmbeech/physicelldataloader
149+
+ compatible with current (non end-of-life cycle) python versions.
150+
+ minor bugfixes.
151+
152+
+ version 3.3.6 (2025-05-13): elmbeech/physicelldataloader
153+
+ compatible with numpy >= 2.0.0 and current (non end-of-life cycle) python versions.
154+
155+
+ version 3.3.5 (2025-05-13): elmbeech/physicelldataloader
156+
+ compatible with numpy < 2.0.0 and current (non end-of-life cycle) python versions.
157+
+ remove pyMCDS and pyMCDSts **make_ome_tiff** and pyCLI **pcdl_make_ome_tiff** to make pyMCS.py stand alone again.
158+
+ new TimeStep **get_cell_attribute_list** function, to retrieve a list of all tracked cell attribute labels.
159+
+ new **pcdl_get_cell_attribute_list** function, to retrieve a list of all tracked cell attribute labels.
160+
128161
+ version 3.3.4 (2025-03-07): elmbeech/physicelldataloader
129162
+ replace the **aicsimageio** library dependency with its successor **bioio**. special thanks to Joel Eliason!
130-
+ **make_ome_tiff** can handle automatically generated file names with > 255 characters. special thank to Genevieve Stein-O'Brien and DanielBergman!
163+
+ **make_ome_tiff** can now handel generated file names with > 255 characters. special thank to Genevieve Stein-O'Brien and DanielBergman!
131164
+ **get_mesh_spacing** handels now an edge case correctly that would have resulted in a division by zero. special thanks to Randy Heiland!
132165

133166
+ version 3.3.3 (2025-01-10): elmbeech/physicelldataloader

man/HOWTO.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,6 @@ pyMCDS.py and the pyMCDS class is very lightweight.
146146
Besides the python3 core library, this code has only matplotlib, numpy, pandas, scipy, and vtk library dependencies.\
147147
The pyMCDS class evolved into the pcdl.TimeStep class, which has additionally anndata dependency, which makes the library slightly heavier but much more powerful for downstream data analysis.
148148
Apart from that, pcdl offers the pcdl.TimeSeries class to handle the mcds snapshots from an entire PhysiCell run, and a set of functions that can be run straight from the command line, without even having to fire up a python3 shell.
149-
Future branch version 4 will abandon this ancient library structure to become more concise.
150-
Don't fear. pyMCDS.py is there to last. We will keep on maintaining pyMCDS.py from branch version 3.
149+
Finally, branch version 4 broke with this ancient library structure because it is just out of time to run the code like this.\
150+
Stay assured, if you like pyMCDS.py, it is there to last.
151+
We will keep on maintaining pyMCDS.py from branch version 3.

man/REFERENCE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ Basically, there are four types of functions:
8080
+ [help(mcds.get_substrate_list)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_substrate_list.md) #! workhorse function
8181
+ [help(mcds.get_substrate_dict)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_substrate_dict.md)
8282
+ [help(mcds.get_substrate_df)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_substrate_df.md)
83-
+ [help(mcds.get_concentration)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_concentration.md)
84-
+ [help(mcds.get_concentration_at)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_concentration_at.md)
8583
+ [help(mcds.get_conc_df)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_conc_df.md) #! workhorse function
8684
+ [help(mcds.plot_contour)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.plot_contour.md) #! workhorse function
8785
+ [help(mcds.make_conc_vtk)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_conc_vtk.md) #! workhorse function
@@ -90,7 +88,6 @@ Basically, there are four types of functions:
9088
+ [help(mcds.get_celltype_list)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_celltype_list.md) #! workhorse function
9189
+ [help(mcds.get_celltype_dict)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_celltype_dict.md)
9290
+ [help(mcds.get_cell_df)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_cell_df.md) #! workhorse function
93-
+ [help(mcds.get_cell_df_at)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_cell_df_at.md)
9491
+ [help(mcds.plot_scatter)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.plot_scatter.md) #! workhorse function
9592
+ [help(mcds.make_cell_vtk)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_cell_vtk.md) #! workhorse function
9693
+ [help(mcds.get_anndata)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_anndata.md) #! workhorse function
@@ -102,13 +99,14 @@ Basically, there are four types of functions:
10299

103100
### TimeStep microenvironment and cells
104101
+ [help(mcds.make_ome_tiff)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_ome_tiff.md) #! workhose function
102+
+ [help(mcds.make_neuroglancer)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_neuroglancer.md) #! workhose function
105103

106104
### TimeStep internal functions
107105
+ [help(pcdl.scaler)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.scaler.md) # anndata
108106
+ [help(pcdl.graphfile_parser)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.graphfile_parser.md) # mcds
109107
```python3
110-
help(pcdl.pyMCDS._read_xml)
111-
help(pcdl.pyAnnData._anndextract)
108+
help(pcdl.TimeStep._read_xml)
109+
help(pcdl.TimeStep._anndextract)
112110
```
113111

114112

@@ -147,6 +145,7 @@ Basically, there are four types of functions:
147145

148146
### TimeSteries microenvironment and cells
149147
+ [help(mcdsts.make_ome_tiff)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcdsts.make_ome_tiff.md) #! workhose function
148+
+ [help(mcdsts.make_neuroglancer)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcdsts.make_neuroglancer.md) #! workhose function
150149

151150
### Timeseries timeseries
152151
+ [help(mcdsts.plot_timeseries)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcdsts.plot_timeseries.md) #! workhorse function
@@ -160,8 +159,8 @@ Basically, there are four types of functions:
160159
### TimeSeries internal functions
161160
+ [help(pcdl.scaler)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.scaler.md) # anndata
162161
```python3
163-
help(pcdl.pyMCDSts._handle_magick)
164-
help(pcdl.pyAnnData._anndextract)
162+
help(pcdl.TimeSeries._handle_magick)
163+
help(pcdl.TimeSeries._anndextract)
165164
```
166165

167166

@@ -196,6 +195,7 @@ The command line interface functions mimic the name and parameter arguments as c
196195

197196
### Command line cells and microenvironment
198197
+ [pcdl_make_ome_tiff --help](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl_make_ome_tiff.md) #! workhorse function
198+
+ [pcdl_make_neuroglancer --help](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl_make_neuroglancer.md) #! workhorse function
199199

200200
### Command line timeseries
201201
+ [pcdl_plot_timeseries --help](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl_plot_timeseries.md) #! workhorse function

man/TUTORIAL_commandline.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# PhysiCell Data Loader Tutorial: pcdl from the Commandline
22

3-
<!-- bue 2024-08-22: have to check if this works from dos and power shell. it will work somehow, because i can run the cli unit tests -->
4-
53
The most important commands for down stream data analysis,
64
available in the pcdl TimeStep and TimeSeries class,
75
can be run straight from a command line shell, like [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)), [csh](https://en.wikipedia.org/wiki/C_shell), [dos](https://en.wikipedia.org/wiki/DOS), [fish](https://en.wikipedia.org/wiki/Fish_(Unix_shell)), [ksh](https://en.wikipedia.org/wiki/KornShell), [powershell](https://en.wikipedia.org/wiki/PowerShell), [sh](https://en.wikipedia.org/wiki/Bourne_shell), [tsh](https://en.wikipedia.org/wiki/Tcsh), or [zsh](https://en.wikipedia.org/wiki/Z_shell), to name a view.
@@ -196,6 +194,19 @@ pcdl_get_celltype_list output/output00000000.xml
196194
pcdl_get_celltype_list -h
197195
```
198196

197+
### &#x2728; pcdl\_get\_cell\_attrribute\_list
198+
199+
Output all recorded cell attributes.
200+
201+
```bash
202+
pcdl_get_cell_attribute_list output
203+
```
204+
```bash
205+
pcdl_get_cell_attribute_list output/output00000000.xml
206+
```
207+
```bash
208+
pcdl_get_cell_attribute_list -h
209+
```
199210

200211
### &#x2728; pcdl\_get\_cell\_attribute
201212

@@ -398,7 +409,7 @@ However, any numerical (bool, int, float) cell\_attribute can be outputted.
398409
For example: dead, cells\_per\_voxel, or pressure.
399410

400411
These ome.tiff files can be further analyzed,
401-
for example with the [napari](https://napari.org/stable/) or [fiji imagej](https://fiji.sc/) or [blender](https://www.blender.org/) software,
412+
for example with the [Napari](https://napari.org/stable/) or [Fiji Imagej](https://fiji.sc/) or [Neuroglancer](https://research.google/blog/an-interactive-automated-3d-reconstruction-of-a-fly-brain/) or [Blender](https://www.blender.org/) or similar software,
402413
as described in the extra tutorials.
403414

404415
```bash
@@ -414,25 +425,33 @@ pcdl_make_ome_tiff -h
414425
Further readings:
415426
+ [TUTORIAL_python3_napari.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_python3_napari.md)
416427
+ [TUTORIAL_fiji_imagej.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_fijiimagej.md)
428+
+ [TUTORIAL_neuroglancer.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_neuroglancer.md)
417429
+ [TUTORIAL_blender.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_blender.md)
418430

419431

432+
### &#x2728; pcdl\_render\_neuroglancer
420433

421-
## [Making movies](https://en.wikipedia.org/wiki/Making_Movies)
422-
423-
424-
### &#x2728; pcdl\_make\_movie
425-
426-
Make a [mp4](https://en.wikipedia.org/wiki/MP4_file_format) movie from the jpeg plots from a time series.
434+
With this command, you can render a time step ome.tiff file or a time step from a whole time series ome.tiff file straight into [Neuroglancer](https://research.google/blog/an-interactive-automated-3d-reconstruction-of-a-fly-brain/), which is a [WebGL](https://en.wikipedia.org/wiki/WebGL)-based viewer that will render the ome.tiff straight in your browser.
427435

436+
Below, we render a time step into Neuroglancer, first utilizing the time step ome.tiff, then using the whole time series ome.tiff.
437+
You can only render one time step at a time and not a entire time series, like, for example, in napari.
428438
```bash
429-
pcdl_plot_scatter output
430-
pcdl_make_movie output/cell_cell_type_z0.0/
439+
pcdl_make_ome_tiff output/output00000000.xml
440+
pcdl_render_neuroglancer output_2d/output00000000_oxygen_water_default_blood_cells_ID.ome.tiff
431441
```
432442
```bash
433-
pcdl_make_movie -h
443+
pcdl_make_ome_tiff output
444+
pcdl_render_neuroglancer output_2d/timeseries_oxygen_water_default_blood_cells_ID.ome.tiff 3 # render time step 3 from the time series
445+
```
446+
```bash
447+
pcdl_make_ome_tiff -h
434448
```
435449

450+
Further readings:
451+
+ [TUTORIAL_neuroglancer.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_neuroglancer.md)
452+
453+
454+
## [Making movies](https://en.wikipedia.org/wiki/Making_Movies)
436455

437456
### &#x2728; pcdl\_make\_gif
438457

@@ -446,7 +465,17 @@ pcdl_make_gif output/cell_cell_type_z0.0/
446465
pcdl_make_gif -h
447466
```
448467

468+
### &#x2728; pcdl\_make\_movie
469+
470+
Make a [mp4](https://en.wikipedia.org/wiki/MP4_file_format) movie from the jpeg plots from a time series.
449471

472+
```bash
473+
pcdl_plot_scatter output
474+
pcdl_make_movie output/cell_cell_type_z0.0/
475+
```
476+
```bash
477+
pcdl_make_movie -h
478+
```
450479

451480
## Data Clean Up
452481

0 commit comments

Comments
 (0)