Select subset of sims for analysis #1250
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 useself.ap
instead. By default, all cell paths will be included and you can further select a subset specific to your analysis usingself.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
:Only variant 0 -
python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory --variant-path 0
:Only variant 0 with seed 0 -
python runscripts/manual/analysisVariant.py out/ecocyc -p growth_trajectory --variant-path 0 --seed-path 0
: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
: