Skip to content

Commit 98c192e

Browse files
committed
@ python-loader : introducing branch v3.
1 parent d66a0f6 commit 98c192e

File tree

86 files changed

+3374
-5797
lines changed

Some content is hidden

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

86 files changed

+3374
-5797
lines changed

.github/workflows/apple.yml

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

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

1412
jobs:
1513
build-macosx:
@@ -33,7 +31,7 @@ jobs:
3331
run: |
3432
brew install ffmpeg imagemagick
3533
python -m pip install --upgrade pip
36-
python -m pip install flake8 pytest anndata bioio matplotlib numpy pandas requests scipy vtk
34+
python -m pip install flake8 pytest anndata matplotlib numpy pandas requests scipy vtk
3735
python -m pip install /Users/runner/work/physicelldataloader/physicelldataloader -v
3836
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3937
- name: lint with flake8

.github/workflows/linux.yml

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

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

1412
jobs:
1513
build-linux:
@@ -33,7 +31,7 @@ jobs:
3331
run: |
3432
sudo apt install ffmpeg imagemagick
3533
python -m pip install --upgrade pip
36-
python -m pip install flake8 pytest anndata bioio matplotlib numpy pandas requests scipy vtk
34+
python -m pip install flake8 pytest anndata matplotlib numpy pandas requests scipy vtk
3735
python -m pip install /home/runner/work/physicelldataloader/physicelldataloader -v
3836
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3937
- name: lint with flake8

.github/workflows/windows.yml

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

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

1412
jobs:
1513
build-windows:
@@ -33,7 +31,7 @@ jobs:
3331
run: |
3432
choco install ffmpeg imagemagick
3533
python -m pip install --upgrade pip
36-
python -m pip install flake8 pytest anndata bioio matplotlib numpy pandas requests scipy vtk
34+
python -m pip install flake8 pytest anndata matplotlib numpy pandas requests scipy vtk
3735
python -m pip install D:\a\physicelldataloader\physicelldataloader -v
3836
#echo 'set PYTHONPATH=D:\a\physicelldataloader\physicelldataloader' >> $GITHUB_ENV
3937
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

man/HOWTO.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,5 @@ 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-
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.
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.

man/REFERENCE.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Familiarize yourself well with their parameters!
3434
Basically, there are four types of functions:
3535
+ set_ : set a python3 variable.
3636
+ get_ : recall a python3 variable.
37-
+ make_ : make functions generate file output (gml, ome.tiff, vtk).
37+
+ make_ : make functions generate file output (gml, vtk).
3838
+ plot_ : plot functions generate a matplotlib figure, or axis object, or file output (jpeg, png, tiff), depending on your parameter settings.
3939

4040
### TimeStep initialize
@@ -80,6 +80,8 @@ 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)
8385
+ [help(mcds.get_conc_df)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_conc_df.md) #! workhorse function
8486
+ [help(mcds.plot_contour)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.plot_contour.md) #! workhorse function
8587
+ [help(mcds.make_conc_vtk)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_conc_vtk.md) #! workhorse function
@@ -88,6 +90,7 @@ Basically, there are four types of functions:
8890
+ [help(mcds.get_celltype_list)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_celltype_list.md) #! workhorse function
8991
+ [help(mcds.get_celltype_dict)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_celltype_dict.md)
9092
+ [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)
9194
+ [help(mcds.plot_scatter)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.plot_scatter.md) #! workhorse function
9295
+ [help(mcds.make_cell_vtk)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_cell_vtk.md) #! workhorse function
9396
+ [help(mcds.get_anndata)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_anndata.md) #! workhorse function
@@ -97,16 +100,12 @@ Basically, there are four types of functions:
97100
+ [help(mcds.get_neighbor_graph_dict)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.get_neighbor_graph_dict.md)
98101
+ [help(mcds.make_graph_gml)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcds.make_graph_gml.md) #! workhose function
99102

100-
### TimeStep microenvironment and cells
101-
+ [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
103-
104103
### TimeStep internal functions
105104
+ [help(pcdl.scaler)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.scaler.md) # anndata
106105
+ [help(pcdl.graphfile_parser)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.graphfile_parser.md) # mcds
107106
```python3
108-
help(pcdl.TimeStep._read_xml)
109-
help(pcdl.TimeStep._anndextract)
107+
help(pcdl.pyMCDS._read_xml)
108+
help(pcdl.pyAnnData._anndextract)
110109
```
111110

112111

@@ -115,7 +114,7 @@ help(pcdl.TimeStep._anndextract)
115114
Basically, there are four types of functions:
116115
+ set_ : set a python3 variable.
117116
+ get_ : recall a python3 variable.
118-
+ make_ : make functions generate file output (gif, gml, mp4, ome.tiff, vtk).
117+
+ make_ : make functions generate file output (gif, gml, mp4, vtk).
119118
+ plot_ : plot functions generate a matplotlib figure, or axis object, or file output (jpeg, png, tiff), depending on your parameter settings.
120119

121120
### TimeSeries initialization
@@ -143,10 +142,6 @@ Basically, there are four types of functions:
143142
### TimeSeries cell graph
144143
+ [help(mcdsts.get_graph_gml)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcdsts.make_graph_gml.md) #! workhose function
145144

146-
### TimeSteries microenvironment and cells
147-
+ [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
149-
150145
### Timeseries timeseries
151146
+ [help(mcdsts.plot_timeseries)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/mcdsts.plot_timeseries.md) #! workhorse function
152147

@@ -159,8 +154,8 @@ Basically, there are four types of functions:
159154
### TimeSeries internal functions
160155
+ [help(pcdl.scaler)](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl.scaler.md) # anndata
161156
```python3
162-
help(pcdl.TimeSeries._handle_magick)
163-
help(pcdl.TimeSeries._anndextract)
157+
help(pcdl.pyMCDSts._handle_magick)
158+
help(pcdl.pyAnnData._anndextract)
164159
```
165160

166161

@@ -193,10 +188,6 @@ The command line interface functions mimic the name and parameter arguments as c
193188
### Command line cell graph
194189
+ [pcdl_make_graph_gml --help](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl_make_graph_gml.md) #! workhorse function
195190

196-
### Command line cells and microenvironment
197-
+ [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
199-
200191
### Command line timeseries
201192
+ [pcdl_plot_timeseries --help](https://github.com/elmbeech/physicelldataloader/tree/master/man/docstring/pcdl_plot_timeseries.md) #! workhorse function
202193

man/TUTORIAL_blender.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[Blender](https://www.blender.org/) is a modeling, rigging, animation, simulation, rendering, compositing, motion tracking, video editing, and game creation software.
44
Blender is free and open source.
55
There exists a vtk nodes plugin, that lets us load <!-- vtk rectilinear grid data, -->vtk polynomial data files.
6-
And there exists a bioxel nodes plugin, that lets us load ome tiff files.
76

87

98
## &#x2728; Handle vtk files
@@ -64,31 +63,4 @@ To learn more about Blender and BVTK Node plugin, please study the official docu
6463
+ https://docs.blender.org/manual/en/latest/
6564

6665

67-
## &#x2728; Handle ome tiff files
68-
69-
The blender bioxel nodes plugin allows us load single time step ome tiff files into blender.
70-
71-
### Generate ome tiff files from the command line
72-
73-
```bash
74-
pcdl_make_ome_tiff output --collapse false
75-
```
76-
77-
### Generate ome tiff files from within python
78-
79-
```python
80-
import pcdl
81-
82-
mcdsts = pcdl.TimeSeries('output/')
83-
mcdsts.make_ome_tiff(collapse=False)
84-
```
85-
86-
### The blender bioxel nodes plugin
87-
88-
Please follow the official bioxel nodes instructions for installation
89-
and to learn how to use the plugin.
90-
91-
+ https://omoolab.github.io/BioxelNodes/latest/
92-
93-
9466
That's it! The rest is analysis within blender!

man/TUTORIAL_commandline.md

Lines changed: 9 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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+
35
The most important commands for down stream data analysis,
46
available in the pcdl TimeStep and TimeSeries class,
57
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.
@@ -9,7 +11,7 @@ The command parameter mimics the related python3 function arguments as closely a
911
You can always call the [help](https://en.wikipedia.org/wiki/Help!) parameter ( pcdl\_command -h),
1012
to access the man page for a pcdl command!
1113

12-
Please spend some time to learn about each of the about 20 commands, by studying its man page.
14+
Please spend some time to learn about each of the 18 commands, by studying its man page.
1315
This will truly make you a power user!
1416

1517

@@ -194,19 +196,6 @@ pcdl_get_celltype_list output/output00000000.xml
194196
pcdl_get_celltype_list -h
195197
```
196198

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-
```
210199

211200
### &#x2728; pcdl\_get\_cell\_attribute
212201

@@ -398,60 +387,21 @@ pcdl_plot_timeseries -h
398387
```
399388

400389

401-
### &#x2728; pcdl\_make\_ome\_tiff
402-
403-
Generate an [ome.tiff](https://ome-model.readthedocs.io/en/stable/index.html) file,
404-
to analyze a single time step or the whole time series,
405-
the same way as usually fluorescent microscopy data is analyzed.
406-
407-
By default, the cell\_attribute outputted is the cell ID + 1.
408-
However, any numerical (bool, int, float) cell\_attribute can be outputted.
409-
For example: dead, cells\_per\_voxel, or pressure.
410-
411-
These ome.tiff files can be further analyzed,
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,
413-
as described in the extra tutorials.
414-
415-
```bash
416-
pcdl_make_ome_tiff output/output00000000.xml pressure
417-
```
418-
```bash
419-
pcdl_make_ome_tiff output
420-
```
421-
```bash
422-
pcdl_make_ome_tiff -h
423-
```
424-
425-
Further readings:
426-
+ [TUTORIAL_python3_napari.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_python3_napari.md)
427-
+ [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)
429-
+ [TUTORIAL_blender.md](https://github.com/elmbeech/physicelldataloader/blob/master/man/TUTORIAL_blender.md)
390+
## [Making movies](https://en.wikipedia.org/wiki/Making_Movies)
430391

431392

432-
### &#x2728; pcdl\_render\_neuroglancer
393+
### &#x2728; pcdl\_make\_movie
433394

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.
395+
Make a [mp4](https://en.wikipedia.org/wiki/MP4_file_format) movie from the jpeg plots from a time series.
435396

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.
438397
```bash
439-
pcdl_make_ome_tiff output/output00000000.xml
440-
pcdl_render_neuroglancer output_2d/output00000000_oxygen_water_default_blood_cells_ID.ome.tiff
441-
```
442-
```bash
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
398+
pcdl_plot_scatter output
399+
pcdl_make_movie output/cell_cell_type_z0.0/
445400
```
446401
```bash
447-
pcdl_make_ome_tiff -h
402+
pcdl_make_movie -h
448403
```
449404

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)
455405

456406
### &#x2728; pcdl\_make\_gif
457407

@@ -465,17 +415,7 @@ pcdl_make_gif output/cell_cell_type_z0.0/
465415
pcdl_make_gif -h
466416
```
467417

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.
471418

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-
```
479419

480420
## Data Clean Up
481421

man/TUTORIAL_fijiimagej.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)