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

Select subset of sims for analysis #1250

Merged
merged 6 commits into from
Feb 1, 2022
Merged

Select subset of sims for analysis #1250

merged 6 commits into from
Feb 1, 2022

Conversation

tahorst
Copy link
Member

@tahorst tahorst commented Jan 30, 2022

This partly addresses #1221 by adding command line options for selecting a subset of variants, seeds or generations when running the manual analysis runscripts. The workflow generating scripts could be updated to take the same options and pass to the firetasks but I think these options would be most valuable for individual analysis scripts run after a set of sims (using the manual analysis scripts). Using this framework in analysis plots will make it much easier to create plots with a subset of the sims run for debugging or comparison purposes since we do not need to modify code but instead select options from the command line. This framework is not implemented for the comparison analysis plots. Some of the examples below could be added to docs in the future.

This PR only addresses the framework additions but I'll also create a PR that updates the analysis scripts themselves.

For variant, seed and generation there are new options that will take the form --variant-path or --variant-path-range (replace variant with seed or generation if desired). --variant-path will take any number of specific variants to include and --variant-path-range start end will create a range (range(start, end)) with both options being combined.

In the analysis scripts, you will no longer need to create an AnalysisPaths object and can just use self.ap instead. By default, all cell paths will be included and you can further select a subset specific to your analysis using self.ap.get_cells().

Examples of the selection options with a set of sims that has 2 gens/2 seeds for variant 0 and 8 gens, 1 seed for variant 2 using the growth_trajectory variant plot.

All data - python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory:
all-growth_trajectory

Only variant 0 - python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory --variant-path 0:
0-growth_trajectory

Only variant 0 with seed 0 - python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory --variant-path 0 --seed-path 0:
0-0-growth_trajectory

Only variant 2 with generations 0, 2, 3, 4 - python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory --variant-path 2 --generation-path-range 2 5 --generation-path 0:
2-range-growth_trajectory

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.

1 participant