-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intracellular introduced, and inputs.toml
- create developer's guide - start using `#!` for comments to stay - this is only info in guide for now - broader use of `haskey` - `InputFolder` class now includes: `location`, `basename`, `required`, `varied`, and `path_from_inputs` - Inner constructors help initialize from just `location` + (`id` OR `folder` OR both) - `InputFolders` now a wrapper for a `NamedTuple` where the keys are locations (stored in `project_locations.all`) and the values are of type `InputFolder` - users are expected to use either the keyword arg constructor (`InputFolders(; kwargs...)`) or the parse-time defined `InputFolders(<required_locations...>; <optional_locations...>)` where the `inputs.toml` determines the parameter/keyword arg names - users could create a vector of pairs, but this is expected to be used internally - `getindex` is implemented to allow for `input_folders[:config]` to access the values of the `NamedTuple` - `VariationID` replaces `VariationIDs` and is now just a wrapper for a `NamedTuple` - handles construction of default variation ids based on the folder ID being -1 or not - `getindex` implemented to allow for `variation_id[:config]` to access the id for the config variation - better checks on instantiating `Simulation`s - make use of `project_locations` in just so many helpful ways - functions to simplify adding output types to vct.db - one function each for setting table names (`"$(loc)s"`), loc ids (`"$(loc)_id"`) and loc var ids (`"$(loc)_variation_id"`) - support for roadrunner sims! - will download roadrunner if needed and then go ahead and run the sims - checks for environment variables needed, sets in the julia runtime if need be, and helps the user to fix this - printls helpful message if not present - `locationPath` to standardize how to access `inputs` - starting to support components that containt, well, components of simulation inputs - these will live in `data/components` and can be used outside of `run` to set up different input/location folders - added `VCTComponents.jl` (though it could be renamed to `VCTIntracellularComponents.jl`) to manage combining of components together - standardize loading of input folders using `createXMLFile` - `inputs.toml` now allows users to decide on the structure of their project at runtime - rewrite of VCTDatabase using inputs.toml - `initializeVCT` replaced by `initializeModelManager` and can accept no arguments to initialize from the current directory - `make clean` only in the `temp_physicell_dir` - compilation `cmd` gets the `ENV` passed in (so the librr var can be included) and also the `temp_physicell_dir` to make sure everything is in that location - print entire compile `cmd` rather than just the `cflags` (though first get rid of the env and dir info because those make it hard to read) - on compilation failure, print the log and err to console - `prepareInputFolder` function now gives a generic interface for initializing each input - `cmd` for running the sim now has `env` and `dir` set to ensure necessary flags are passed in and that it is being run from teh PHysiCell directory - `--chdir=$(physicell_dir)` now set for `sbatch` command to make sure it is being run from that directory. still need to see if the env is being properly set there or if that requires extra attention - bundle results of `addVariations` into an `AddVariationsResult` type so those only output one thing - `sqliteDataType(ev::ElementaryVariation)` to standardize how all database types are determined - VCTComponents doc
- Loading branch information
Showing
64 changed files
with
2,169 additions
and
1,914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name = "pcvct" | ||
uuid = "3c374bc7-7384-4f83-8ca0-87b8c727e6ff" | ||
authors = ["Daniel Bergman <[email protected]> and contributors"] | ||
version = "0.0.15" | ||
version = "0.0.16" | ||
|
||
[deps] | ||
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f" | ||
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" | ||
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
|
@@ -28,9 +29,11 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | |
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" | ||
Sobol = "ed01d8cd-4d21-5b2a-85b4-cc3bdc58bad4" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" | ||
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" | ||
|
||
[compat] | ||
AutoHashEquals = "2.2.0" | ||
CSV = "0.10" | ||
DataFrames = "1" | ||
Distributions = "0.25" | ||
|
@@ -53,6 +56,7 @@ RecipesBase = "1.3.4" | |
SQLite = "1" | ||
Sobol = "1" | ||
Statistics = "1" | ||
TOML = "1.0.3" | ||
Tables = "1" | ||
julia = "1.6.7" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
```@meta | ||
CollapsedDocStrings = true | ||
``` | ||
|
||
# VCTComponents | ||
|
||
Allows for combining PhysiCell input components into whole inputs. | ||
|
||
Currently, only supports this for intracellular ODE (libRoadRunner) models. | ||
|
||
```@autodocs | ||
Modules = [pcvct] | ||
Pages = ["VCTComponents.jl"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Developer guide | ||
|
||
## Style guide | ||
- Use `#!` for comments that are informative | ||
- This helps find code lines commented out in development. | ||
- Using the regexp `^(\s+)?# .+\n` seems to work well for finding commented out code lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Intracellular inputs | ||
|
||
pcvct currently only supports ODE intracellular models using libRoadRunner. | ||
It uses a specialized format to achieve this, creating the SBML files needed by libRoadRunner at PhysiCell runtime. | ||
Briefly, the `intracellular.xml` file defines a mapping between cell definitions and intracellular models. | ||
See the template provided [here](https://github.com/drbergman/PhysiCell/blob/my-physicell/sample_projects_intracellular/combined/template-combined/config/sample_combined_sbmls.xml). | ||
|
||
To facilitate creation of such files, and to make it easy to mix-and-match intracellular models, users can place the SBML files that define the ODEs into `data/components/roadrunner` and then simply reference those to construct the specialized XMLs needed. | ||
For example, place the `Toy_Metabolic_Model.xml` from [sample_projects_intracellular/ode/ode_energy/config/](https://github.com/drbergman/PhysiCell/blob/my-physicell/sample_projects_intracellular/ode/ode_energy/config) into `data/components/roadrunner` and assemble the XML as follows | ||
|
||
```julia | ||
cell_type = "default" # name of the cell type using this intracellular model | ||
component = PhysiCellComponent("roadrunner", "Toy_Metabolic_Model.xml") # pass in the type of the component and the name of the file to use | ||
cell_type_to_component = Dict{String, PhysiCellComponent}(cell_type => component) # add other entries to this Dict for other cell types using an intracellular model | ||
intracellular_folder = assembleIntracellular!(cell_type_to_component; name="toy_metabolic") # will return "toy_metabolic" or "toy_metabolic_n" | ||
``` | ||
|
||
This creates a folder at `data/inputs/intracellulars/` with the name stored in `intracellular_folder`. | ||
Also, the `!` in `assembleIntracellular!` references how the components in the `cell_type_to_component` `Dict` are updated to match those in `data/inputs/intracellulars/$(intracellular_folder)/intracellular.xml`. | ||
Use these IDs to make variations on the components by using | ||
|
||
```julia | ||
xml_path = ["intracellulars", "intracellular:ID:$(component.id)", ...] | ||
``` | ||
|
||
where the `...` is the path starting with the root of the XML file (`sbml` for SBML files). | ||
|
||
Finally, pass this folder into `InputFolders` to use this input in simulation runs: | ||
```julia | ||
inputs = InputFolders(...; ..., intracellular=intracellular_folder, ...) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.