PhysiCell-Tools / PhysiCell-Studio

PhysiCell Studio is a graphical tool to allow easy editing of a (XML) model, create initial positions of cells, run a simulation, and visualize results. To contribute, fork and make PRs to the development branch.
GNU General Public License v3.0
19 stars 11 forks source link

Created a window of multivariate rules plot. #197

Closed heberlr closed 3 months ago

heberlr commented 3 months ago

This has some issues: I created the function associated with the button, but the window does not appear. We need to prepare the data from the rules tab for this plot. This is expecting to receive a CSV file name and a dataframe with the following column names: ['cell', 'signal', 'direction', 'behavior', 'saturation', 'half_max', 'hill_power', 'dead', 'base_behavior'].

rheiland commented 3 months ago

I want to understand how this is supposed to work before merging. I cloned your branch and ran it, added a couple of rules to the table (with same behavior, but different signals), then click the new Plot rules button, but no plotting window appears. Should it? Also, after clicking the new button, the cells in the table seem to be unselectable. Can show you in person sometime.

heberlr commented 3 months ago

Thank you for the feedback. This is something we can discuss. My idea was allow the user to load another csv, but ultimately you can close this window and load the csv in the Studio and plot again using the right base value. This load csv alone won't use the proper base values. I think you convenced me, I will remove the load csv thing.

heberlr commented 3 months ago

Everything is working now. However, we still need to create a dynamic dataframe compatible in rules_tab.py. I have included an example there. I addressed all your points, Daniel. Thank you!

rheiland commented 3 months ago

I've begun looking at the dynamic dataframe. However, I still don't understand the Down regulation slider. It doesn't seem to do anything, for the sample data you provided. Or maybe I've done something to make it behave that way.

Also, we may want to disable the mouse scrollwheel from moving a Slider when it's in focus under the cursor. Or wait to see if users complain. Personally, I was a little shocked when I accidentally did it.

heberlr commented 3 months ago

I did the dynamic dataframe in this new commit. I define all the sliders from behavior changing +/- 100% of the real value, if it is zero doesn't change. Any ideas to do it automatically?

rheiland commented 3 months ago

Thanks for doing the dynamic dataframe! I've played with it a bit more. Are we comfortable with going ahead and exposing this functionality in the Studio in the next release? If so, I will do it this weekend. An alternative is to make it a beta feature (requiring the user to specify an arg on the command line at startup). Do you think Paul is on board with this feature? Eventually, I'd like to have one relatively simple example of its use in the Guide.