Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add plots to result #255

Merged
merged 14 commits into from
Jun 11, 2024
Merged

Feature/add plots to result #255

merged 14 commits into from
Jun 11, 2024

Conversation

rugeli
Copy link
Collaborator

@rugeli rugeli commented May 29, 2024

Problem

What is the problem this work solves, including
closes #254

Solution

  • created a class to handle plot data(scatter plots and histograms) and added all plots to one list
  • in the function histogram within Analysis.py, added the logic to insert plot data into result file. Set the argument add_to_result to true and set save_png to false, by default
  • in simularium_helper, added plot data to the trajectory converter and had simularium io process the plot display on the website

with @meganrm @mogres @ascibisz and Joe

Type of change

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. Pack any recipes with the save_analyze_result config set to true to see if the plots display next to the result as expected

Screenshots (optional):

Screenshot 2024-05-29 at 1 22 15 PM

Copy link

github-actions bot commented May 29, 2024

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli rugeli requested review from mogres and meganrm May 29, 2024 22:54
@rugeli rugeli marked this pull request as draft June 8, 2024 00:32
@rugeli rugeli marked this pull request as ready for review June 10, 2024 20:16
Copy link
Collaborator

@mogres mogres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool feature! The PlotData class is super useful :) I was able to run the test_spheres recipe and generate simularium files with plots on the side!

Your PR description asks to set show_grid_plot config to true but I don't see it checked anywhere. Do you mean save_analyze_result?

self.saveResult = "out" in config
self.saveResult = (
"out" in config
and not config["save_analyze_result"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have these additional conditions here? Wouldn't this prevent saving simularium files completely if there is more than one packing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's because the saving happens from the Analysis class instead of the Env class

@rugeli
Copy link
Collaborator Author

rugeli commented Jun 11, 2024

Really cool feature! The PlotData class is super useful :) I was able to run the test_spheres recipe and generate simularium files with plots on the side!

Your PR description asks to set show_grid_plot config to true but I don't see it checked anywhere. Do you mean save_analyze_result?

ah right, I meant save_analyze_result, corrected!

@rugeli rugeli merged commit acea1ee into main Jun 11, 2024
7 checks passed
@rugeli rugeli deleted the feature/add-plots-to-result branch June 11, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding plots to result file
3 participants