Configuration
Interface with the configuration file necessary for PhysiCell simulations.
Provide functionality for accessing and modifying elements in any XML, including the PhysiCell configuration file, XML rules file, combined intracellular XML file, XML IC cell file, and XML IC ECM file.
Config XML paths
The configPath is the most user-friendly way to create the XML path to (most) any parameter in the configuration file. The following functions are called by configPath and are more explicit and rigid. Note, none of these are exported and so they must be called with the PhysiCellModelManager. prefix, e.g., PhysiCellModelManager.domainPath("x_min").
Here is a near-exhaustive list of the available tokens (the flexibiilty of configPath allows for some of these XML paths to be created in multiple ways):
Single tokens
The following can be passed in alone to configPath:
- "x_min", "x_max", "y_min", "y_max", "z_min", "z_max", "dx", "dy", "dz", "use_2D" (`domainPath`)
- "max_time", "dt_intracellular", "dt_diffusion", "dt_mechanics", "dt_phenotype" (`timePath`)
- "full_data_interval" (`fullSavePath`)
- "SVG_save_interval" (`svgSavePath`)Double tokens
The following can be passed in as the second argument to configPath(<substrate_name>, <token>) where <substrate_name> is the name of the substrate in your model:
- "diffusion_coefficient", "decay_rate"
- "initial_condition", "Dirichlet_boundary_condition"
- "xmin", "xmax", "ymin", "ymax", "zmin", "zmax"The following can be passed in as the second argument to configPath(<cell_type>, <token>) where <cell_type> is the name of the cell type in your model:
- "total", "fluid_fraction", "nuclear", "fluid_change_rate", "cytoplasmic_biomass_change_rate", "nuclear_biomass_change_rate", "calcified_fraction", "calcification_rate", "relative_rupture_volume" (`volumePath`)
- "cell_cell_adhesion_strength", "cell_cell_repulsion_strength", "relative_maximum_adhesion_distance", "attachment_elastic_constant", "attachment_rate", "detachment_rate", "maximum_number_of_attachments" (`mechanicsPath`)
- "set_relative_equilibrium_distance", "set_absolute_equilibrium_distance" (`mechanicsPath`)
- "speed", "persistence_time", "migration_bias" (`motilityPath`)
- "apoptotic_phagocytosis_rate", "necrotic_phagocytosis_rate", "other_dead_phagocytosis_rate", "attack_damage_rate", "attack_duration" (`cellInteractionsPath`)
- "damage_rate", "damage_repair_rate" (`integrityPath`)
- "custom:<tag>" (`customDataPath`)Finally, for a user parameter you can use the following:
configPath("user_parameters", <tag>)where <tag> is the name of the user parameter in your model.
Triple tokens
The following can be passed in as the third argument to configPath(<substrate_name>, "Dirichlet_options", <token>) where <substrate_name> is the name of the substrate in your model:
- "xmin", "xmax", "ymin", "ymax", "zmin", "zmax" (`substratePath`)The following tokens work with a cell_type from your model:
- `configPath(<cell_type>, "cycle_rate", <start_index>)` (`cyclePath`)
- `configPath(<cell_type>, "cycle_duration", <index>)` (`cyclePath`)
- `configPath(<cell_type>, "apoptosis", <parameter>)` (`apoptosisPath`)
- `configPath(<cell_type>, "necrosis", <parameter>)` (`necrosisPath`)
- `configPath(<cell_type>, "adhesion", <cell_type>)` (`mechanicsPath`)
- `configPath(<cell_type>, "motility", <parameter>)` (`motilityPath`)
- `configPath(<cell_type>, "chemotaxis", <parameter>)` (`motilityPath`)
- `configPath(<cell_type>, "advanced_chemotaxis", <parameter>)` (`motilityPath`)
- `configPath(<cell_type>, "advanced_chemotaxis", <substrate_name>)` (`motilityPath`)
- `configPath(<cell_type>, <substrate_name>, <parameter>)` (`secretionPath`)
- `configPath(<cell_type>, <interaction>, <cell_type>)` (`<interaction>` is one of "phagocytosis", "fusion", "transformation", "attack_rate") (`cellInteractionsPath`)
- `configPath(<cell_type>, "custom", <tag>)` (`customDataPath`)Four tokens
The following tokens work with a cell_type from your model:
- `configPath(<cell_type>, "cycle", "duration", <index>)` (`cyclePath`)
- `configPath(<cell_type>, "cycle", "rate", <start_index>)` (`cyclePath`)
- `configPath(<cell_type>, "necrosis", "duration", <index>)` (`necrosisPath`)
- `configPath(<cell_type>, "necrosis", "transition_rate", <start_index>)` (`necrosisPath`)
- `configPath(<cell_type>, "initial_parameter_distribution", <behavior>, <parameter>)` (`initialParameterDistributionPath`)Main XML path functions
PhysiCellModelManager.configPath — Function
configPath(tokens::Vararg{Union{AbstractString,Integer}})Return the XML path to the configuration for the given tokens, inferring the path based on the tokens.
This function works by calling the explicit path functions for the given tokens: domainPath, timePath, fullSavePath, svgSavePath, substratePath, cyclePath, apoptosisPath, necrosisPath, volumePath, mechanicsPath, motilityPath, secretionPath, cellInteractionsPath, phagocytosisPath, attackRatePath, fusionPath, transformationPath, integrityPath, customDataPath, initialParameterDistributionPath, and userParameterPath.
This is an experimental feature that can perhaps standardize ways to access the configuration XML path with (hopefully) minimal referencing of the XML file. Take a guess at what you think the inputs should be. Depending on the number of tokens passed in, the function will try to infer the path or throw an error if it cannot. The error message will include the possible tokens that can be used for the given number of tokens as well as the more explicit function that has specific documentation.
PhysiCellModelManager.rulePath — Function
rulePath(cell_definition::AbstractString, behavior::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the rule for the given cell type and behavior.
Optionally, add more path_elements to the path as extra arguments.
Example
julia> rulePath("T cell", "attack rate")
2-element Vector{String}:
"behavior_ruleset:name:T cell"
"behavior:name:attack rate"julia> rulePath("cancer", "cycle entry", "increasing_signals", "signal:name:oxygen", "half_max")
5-element Vector{String}:
"behavior_ruleset:name:cancer"
"behavior:name:cycle entry"
"increasing_signals"
"signal:name:oxygen"
"half_max"PhysiCellModelManager.icCellsPath — Function
icCellsPath(cell_definition::AbstractString, patch_type::AbstractString, patch_id, path_elements::Vararg{Union{Integer,AbstractString}})Return the XML path to the IC cell patch for the given cell type, patch type, and patch ID. The remaining arguments are either just the tag for the patch parameter or the carveout patch type, ID, and tag.
Examples
julia> icCellsPath("default", "disc", 1, "x0")
4-element Vector{String}:
"cell_patches:name:default"
"patch_collection:type:disc"
"patch:ID:1"
"x0"julia> icCellsPath("default", "annulus", 1, "rectangle", 1, "width")
7-element Vector{String}:
"cell_patches:name:default"
"patch_collection:type:annulus"
"patch:ID:1"
"carveout_patches"
"patch_collection:type:rectangle"
"patch:ID:1"
"width"PhysiCellModelManager.icECMPath — Function
icECMPath(layer_id::Int, patch_type::AbstractString, patch_id, path_elements::Vararg{AbstractString})Return the XML path to the IC ECM patch for the given layerid, patchtype, and patchid. Optionally, add more pathelements to the path as extra arguments.
Examples
julia> icECMPath(2, "ellipse", 1, "a")
4-element Vector{String}:
"layer:ID:2"
"patch_collection:type:ellipse"
"patch:ID:1"
"a"julia> icECMPath(2, "elliptical_disc", 1, "density")
4-element Vector{String}:
"layer:ID:2"
"patch_collection:type:elliptical_disc"
"patch:ID:1"
"density"julia> icECMPath(2, "ellipse_with_shell", 1, "interior", "density")
5-element Vector{String}:
"layer:ID:2"
"patch_collection:type:ellipse_with_shell"
"patch:ID:1"
"interior"
"density"Config file specific functions
PhysiCellModelManager.domainPath — Function
domainPath(tag::AbstractString)Return the XML path to the domain for the given tag.
Possible tags include:
"x_min""x_max""y_min""y_max""z_min""z_max""dx""dy""dz""use_2D"(value is"true"or"false")
PhysiCellModelManager.timePath — Function
timePath(tag::AbstractString)Return the XML path to the time for the given tag.
Possible tags include:
"max_time""dt_intracellular""dt_diffusion""dt_mechanics""dt_phenotype"
PhysiCellModelManager.fullSavePath — Function
fullSavePath()Return the XML path to the interval for full data saves.
PhysiCellModelManager.svgSavePath — Function
svgSavePath()Return the XML path to the interval for SVG data saves.
PhysiCellModelManager.substratePath — Function
substratePath(substrate_name::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the substrate for the given name (or deeper if more path elements are given).
Possible path_elements include:
substratePath(<substrate_name>, "physical_parameter_set", <tag>)with<tag>one of"diffusion_coefficient""decay_rate"
substratePath(<substrate_name>, <tag>)with<tag>one of"initial_condition""Dirichlet_boundary_condition"
substratePath(<substrate_name>, "Dirichlet_options", "boundary_value:ID:<boundary_id>")where<boundary_id>is one of"xmin""xmax""ymin""ymax""zmin""zmax"
PhysiCellModelManager.cyclePath — Function
cyclePath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the cycle for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
cyclePath(<cell_type>, "phase_durations", "duration:index:0")# replace 0 with the index of the phasecyclePath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# replace 0 with the start index of the phase
PhysiCellModelManager.apoptosisPath — Function
apoptosisPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the apoptosis for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
apoptosisPath(<cell_type>, "death_rate")apoptosisPath(<cell_type>, "phase_durations", "duration:index:0")# apoptosis only has one phase, so index is always 0apoptosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# apoptosis only has one phase, so start index is always 0apoptosisPath(<cell_type>, "parameters", <tag>)with<tag>one ofunlysed_fluid_change_ratelysed_fluid_change_ratecytoplasmic_biomass_change_ratenuclear_biomass_change_ratecalcification_raterelative_rupture_volume
PhysiCellModelManager.necrosisPath — Function
necrosisPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the necrosis for the given cell type (or deeper if more path elements are given).
Possible path_elements are identical to those for apoptosisPath with one exception: Necrosis has two phases so the phase index can be either 0 or 1. They include:
necrosisPath(<cell_type>, "death_rate")necrosisPath(<cell_type>, "phase_durations", "duration:index:0")# necrosis has two phases, so index is either 0 or 1necrosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# necrosis has two phases, so start index is either 0 or 1necrosisPath(<cell_type>, "parameters", <tag>)with<tag>one ofunlysed_fluid_change_ratelysed_fluid_change_ratecytoplasmic_biomass_change_ratenuclear_biomass_change_ratecalcification_raterelative_rupture_volume
PhysiCellModelManager.volumePath — Function
volumePath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the volume for the given cell type (or deeper if more path elements are given).
Possible tags include:
"total""fluid_fraction""nuclear""fluid_change_rate""cytoplasmic_biomass_change_rate""nuclear_biomass_change_rate""calcified_fraction""calcification_rate""relative_rupture_volume"
PhysiCellModelManager.mechanicsPath — Function
mechanicsPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the mechanics for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
mechanicsPath(<cell_type>, <tag>)with<tag>one of"cell_cell_adhesion_strength""cell_cell_repulsion_strength""relative_maximum_adhesion_distance""attachment_elastic_constant""attachment_rate""detachment_rate""maximum_number_of_attachments"
mechanicsPath(<cell_type>, "cell_adhesion_affinities", "cell_adhesion_affinity:name:<cell_type>")<cell_type>is a string of the model cell type
mechanicsPath(<cell_type>, "options", <tag>)with<tag>one of"set_relative_equilibrium_distance""set_absolute_equilibrium_distance"
PhysiCellModelManager.motilityPath — Function
motilityPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the motility for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
motilityPath(<cell_type>, <tag>)with<tag>one of"speed""persistence_time""migration_bias"
motilityPath(<cell_type>, "options", <tag>)with<tag>one of"enabled"(value is"true"or"false")"use_2D"(value is"true"or"false")
motilityPath(<cell_type>, "options", "chemotaxis", <tag>)with<tag>one of"enabled"(value is"true"or"false")"substrate"(value is string of the model substrate)"direction"(value is -1 or 1)
motilityPath(<cell_type>, "options", "advanced_chemotaxis", <tag>)"enabled"(value is"true"or"false")"normalize_each_gradient"(value is"true"or"false")
motilityPath(<cell_type>, "options", "advanced_chemotaxis", "chemotactic_sensitivities", "chemotactic_sensitivity:substrate:<substrate_name>")<substrate_name>is a string of the model substrate
PhysiCellModelManager.secretionPath — Function
secretionPath(cell_definition::AbstractString, substrate_name::AbstractString, tag::AbstractString)Return the XML path to the secretion tag of the given substrate for the given cell type.
Possible tags include:
"secretion_rate""secretion_target""uptake_rate""net_export_rate"
PhysiCellModelManager.cellInteractionsPath — Function
cellInteractionsPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the cell interactions for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
cellInteractionsPath(<cell_type>, <tag>)with<tag>one of"apoptotic_phagocytosis_rate""necrotic_phagocytosis_rate""other_dead_phagocytosis_rate""attack_damage_rate""attack_duration"
For other elements in <cell_interactions>, use phagocytosisPath, attackRatePath, or fusionPath as needed.
PhysiCellModelManager.phagocytosisPath — Function
phagocytosisPath(cell_definition::AbstractString, target_cell_definition::AbstractString)
phagocytosisPath(cell_definition::AbstractString, death_process::Symbol)Return the XML path to the phagocytosis element for the given cell type. If a string is supplied, it is treated as a cell type. If a symbol is supplied, it specifies a death model and must be one of :apoptosis, :necrosis, or :other_dead.
Examples
julia> PhysiCellModelManager.phagocytosisPath("M1", "cancer")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:M1"
"phenotype"
"cell_interactions"
"live_phagocytosis_rates"
"phagocytosis_rate:name:cancer"julia> PhysiCellModelManager.phagocytosisPath("M1", :apoptotic)
5-element Vector{String}:
"cell_definitions"
"cell_definition:name:M1"
"phenotype"
"cell_interactions"
"apoptotic_phagocytosis_rate"PhysiCellModelManager.attackRatePath — Function
attackRatePath(cell_definition::AbstractString, target_cell_definition::AbstractString)Return the XML path to the attack rate of the first cell type attacking the second cell type. attackPath and attackRatesPath are synonyms for this function.
Examples
julia> PhysiCellModelManager.attackRatePath("cd8", "cancer")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:cd8"
"phenotype"
"cell_interactions"
"attack_rates"
"attack_rate:name:cancer"PhysiCellModelManager.fusionPath — Function
fusionPath(cell_definition::AbstractString, target_cell_definition::AbstractString)Return the XML path to the fusion rate of the first cell type fusing to the second cell type.
Examples
julia> PhysiCellModelManager.fusionPath("epi", "epi")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:epi"
"phenotype"
"cell_interactions"
"fusion_rates"
"fusion_rate:name:epi"PhysiCellModelManager.integrityPath — Function
integrityPath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the cell integrity tag for the given cell type.
Possible tags include:
"damage_rate""damage_repair_rate"
PhysiCellModelManager.customDataPath — Function
customDataPath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the custom data tag for the given cell type.
PhysiCellModelManager.initialParameterDistributionPath — Function
initialParameterDistributionPath(cell_definition::AbstractString, behavior::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the initial parameter distribution of the behavior for the given cell type.
Possible path_elements depend on the type of the distribution:
type="Uniform":min,maxtype="LogUniform":min,maxtype="Normal":mu,sigma,lower_bound,upper_boundtype="LogNormal":mu,sigma,lower_bound,upper_boundtype="Log10Normal":mu,sigma,lower_bound,upper_bound
PhysiCellModelManager.userParameterPath — Function
userParameterPath(tag::AbstractString)Return the XML path to the user parameter for the given field name. userParametersPath is a synonym for this function.
Public API
PhysiCellModelManager.apoptosisPath — Method
apoptosisPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the apoptosis for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
apoptosisPath(<cell_type>, "death_rate")apoptosisPath(<cell_type>, "phase_durations", "duration:index:0")# apoptosis only has one phase, so index is always 0apoptosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# apoptosis only has one phase, so start index is always 0apoptosisPath(<cell_type>, "parameters", <tag>)with<tag>one ofunlysed_fluid_change_ratelysed_fluid_change_ratecytoplasmic_biomass_change_ratenuclear_biomass_change_ratecalcification_raterelative_rupture_volume
PhysiCellModelManager.attackRatePath — Method
attackRatePath(cell_definition::AbstractString, target_cell_definition::AbstractString)Return the XML path to the attack rate of the first cell type attacking the second cell type. attackPath and attackRatesPath are synonyms for this function.
Examples
julia> PhysiCellModelManager.attackRatePath("cd8", "cancer")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:cd8"
"phenotype"
"cell_interactions"
"attack_rates"
"attack_rate:name:cancer"PhysiCellModelManager.cellDefinitionPath — Method
cellDefinitionPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the cell definition or deeper if more path elements are given.
PhysiCellModelManager.cellInteractionsPath — Method
cellInteractionsPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the cell interactions for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
cellInteractionsPath(<cell_type>, <tag>)with<tag>one of"apoptotic_phagocytosis_rate""necrotic_phagocytosis_rate""other_dead_phagocytosis_rate""attack_damage_rate""attack_duration"
For other elements in <cell_interactions>, use phagocytosisPath, attackRatePath, or fusionPath as needed.
PhysiCellModelManager.configPath — Method
configPath(tokens::Vararg{Union{AbstractString,Integer}})Return the XML path to the configuration for the given tokens, inferring the path based on the tokens.
This function works by calling the explicit path functions for the given tokens: domainPath, timePath, fullSavePath, svgSavePath, substratePath, cyclePath, apoptosisPath, necrosisPath, volumePath, mechanicsPath, motilityPath, secretionPath, cellInteractionsPath, phagocytosisPath, attackRatePath, fusionPath, transformationPath, integrityPath, customDataPath, initialParameterDistributionPath, and userParameterPath.
This is an experimental feature that can perhaps standardize ways to access the configuration XML path with (hopefully) minimal referencing of the XML file. Take a guess at what you think the inputs should be. Depending on the number of tokens passed in, the function will try to infer the path or throw an error if it cannot. The error message will include the possible tokens that can be used for the given number of tokens as well as the more explicit function that has specific documentation.
PhysiCellModelManager.customDataPath — Method
customDataPath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the custom data tag for the given cell type.
PhysiCellModelManager.cyclePath — Method
cyclePath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the cycle for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
cyclePath(<cell_type>, "phase_durations", "duration:index:0")# replace 0 with the index of the phasecyclePath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# replace 0 with the start index of the phase
PhysiCellModelManager.domainPath — Method
domainPath(tag::AbstractString)Return the XML path to the domain for the given tag.
Possible tags include:
"x_min""x_max""y_min""y_max""z_min""z_max""dx""dy""dz""use_2D"(value is"true"or"false")
PhysiCellModelManager.fullSavePath — Method
fullSavePath()Return the XML path to the interval for full data saves.
PhysiCellModelManager.fusionPath — Method
fusionPath(cell_definition::AbstractString, target_cell_definition::AbstractString)Return the XML path to the fusion rate of the first cell type fusing to the second cell type.
Examples
julia> PhysiCellModelManager.fusionPath("epi", "epi")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:epi"
"phenotype"
"cell_interactions"
"fusion_rates"
"fusion_rate:name:epi"PhysiCellModelManager.icCellsPath — Method
icCellsPath(cell_definition::AbstractString, patch_type::AbstractString, patch_id, path_elements::Vararg{Union{Integer,AbstractString}})Return the XML path to the IC cell patch for the given cell type, patch type, and patch ID. The remaining arguments are either just the tag for the patch parameter or the carveout patch type, ID, and tag.
Examples
julia> icCellsPath("default", "disc", 1, "x0")
4-element Vector{String}:
"cell_patches:name:default"
"patch_collection:type:disc"
"patch:ID:1"
"x0"julia> icCellsPath("default", "annulus", 1, "rectangle", 1, "width")
7-element Vector{String}:
"cell_patches:name:default"
"patch_collection:type:annulus"
"patch:ID:1"
"carveout_patches"
"patch_collection:type:rectangle"
"patch:ID:1"
"width"PhysiCellModelManager.icECMPath — Method
icECMPath(layer_id::Int, patch_type::AbstractString, patch_id, path_elements::Vararg{AbstractString})Return the XML path to the IC ECM patch for the given layerid, patchtype, and patchid. Optionally, add more pathelements to the path as extra arguments.
Examples
julia> icECMPath(2, "ellipse", 1, "a")
4-element Vector{String}:
"layer:ID:2"
"patch_collection:type:ellipse"
"patch:ID:1"
"a"julia> icECMPath(2, "elliptical_disc", 1, "density")
4-element Vector{String}:
"layer:ID:2"
"patch_collection:type:elliptical_disc"
"patch:ID:1"
"density"julia> icECMPath(2, "ellipse_with_shell", 1, "interior", "density")
5-element Vector{String}:
"layer:ID:2"
"patch_collection:type:ellipse_with_shell"
"patch:ID:1"
"interior"
"density"PhysiCellModelManager.initialParameterDistributionPath — Method
initialParameterDistributionPath(cell_definition::AbstractString, behavior::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the initial parameter distribution of the behavior for the given cell type.
Possible path_elements depend on the type of the distribution:
type="Uniform":min,maxtype="LogUniform":min,maxtype="Normal":mu,sigma,lower_bound,upper_boundtype="LogNormal":mu,sigma,lower_bound,upper_boundtype="Log10Normal":mu,sigma,lower_bound,upper_bound
PhysiCellModelManager.integrityPath — Method
integrityPath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the cell integrity tag for the given cell type.
Possible tags include:
"damage_rate""damage_repair_rate"
PhysiCellModelManager.mechanicsPath — Method
mechanicsPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the mechanics for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
mechanicsPath(<cell_type>, <tag>)with<tag>one of"cell_cell_adhesion_strength""cell_cell_repulsion_strength""relative_maximum_adhesion_distance""attachment_elastic_constant""attachment_rate""detachment_rate""maximum_number_of_attachments"
mechanicsPath(<cell_type>, "cell_adhesion_affinities", "cell_adhesion_affinity:name:<cell_type>")<cell_type>is a string of the model cell type
mechanicsPath(<cell_type>, "options", <tag>)with<tag>one of"set_relative_equilibrium_distance""set_absolute_equilibrium_distance"
PhysiCellModelManager.motilityPath — Method
motilityPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the motility for the given cell type (or deeper if more path elements are given).
Possible path_elements include:
motilityPath(<cell_type>, <tag>)with<tag>one of"speed""persistence_time""migration_bias"
motilityPath(<cell_type>, "options", <tag>)with<tag>one of"enabled"(value is"true"or"false")"use_2D"(value is"true"or"false")
motilityPath(<cell_type>, "options", "chemotaxis", <tag>)with<tag>one of"enabled"(value is"true"or"false")"substrate"(value is string of the model substrate)"direction"(value is -1 or 1)
motilityPath(<cell_type>, "options", "advanced_chemotaxis", <tag>)"enabled"(value is"true"or"false")"normalize_each_gradient"(value is"true"or"false")
motilityPath(<cell_type>, "options", "advanced_chemotaxis", "chemotactic_sensitivities", "chemotactic_sensitivity:substrate:<substrate_name>")<substrate_name>is a string of the model substrate
PhysiCellModelManager.necrosisPath — Method
necrosisPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the necrosis for the given cell type (or deeper if more path elements are given).
Possible path_elements are identical to those for apoptosisPath with one exception: Necrosis has two phases so the phase index can be either 0 or 1. They include:
necrosisPath(<cell_type>, "death_rate")necrosisPath(<cell_type>, "phase_durations", "duration:index:0")# necrosis has two phases, so index is either 0 or 1necrosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0")# necrosis has two phases, so start index is either 0 or 1necrosisPath(<cell_type>, "parameters", <tag>)with<tag>one ofunlysed_fluid_change_ratelysed_fluid_change_ratecytoplasmic_biomass_change_ratenuclear_biomass_change_ratecalcification_raterelative_rupture_volume
PhysiCellModelManager.phagocytosisPath — Method
phagocytosisPath(cell_definition::AbstractString, target_cell_definition::AbstractString)
phagocytosisPath(cell_definition::AbstractString, death_process::Symbol)Return the XML path to the phagocytosis element for the given cell type. If a string is supplied, it is treated as a cell type. If a symbol is supplied, it specifies a death model and must be one of :apoptosis, :necrosis, or :other_dead.
Examples
julia> PhysiCellModelManager.phagocytosisPath("M1", "cancer")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:M1"
"phenotype"
"cell_interactions"
"live_phagocytosis_rates"
"phagocytosis_rate:name:cancer"julia> PhysiCellModelManager.phagocytosisPath("M1", :apoptotic)
5-element Vector{String}:
"cell_definitions"
"cell_definition:name:M1"
"phenotype"
"cell_interactions"
"apoptotic_phagocytosis_rate"PhysiCellModelManager.phenotypePath — Method
phenotypePath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the phenotype for the given cell type (or deeper if more path elements are given).
PhysiCellModelManager.rulePath — Method
rulePath(cell_definition::AbstractString, behavior::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the rule for the given cell type and behavior.
Optionally, add more path_elements to the path as extra arguments.
Example
julia> rulePath("T cell", "attack rate")
2-element Vector{String}:
"behavior_ruleset:name:T cell"
"behavior:name:attack rate"julia> rulePath("cancer", "cycle entry", "increasing_signals", "signal:name:oxygen", "half_max")
5-element Vector{String}:
"behavior_ruleset:name:cancer"
"behavior:name:cycle entry"
"increasing_signals"
"signal:name:oxygen"
"half_max"PhysiCellModelManager.secretionPath — Method
secretionPath(cell_definition::AbstractString, substrate_name::AbstractString, tag::AbstractString)Return the XML path to the secretion tag of the given substrate for the given cell type.
Possible tags include:
"secretion_rate""secretion_target""uptake_rate""net_export_rate"
PhysiCellModelManager.substratePath — Method
substratePath(substrate_name::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the substrate for the given name (or deeper if more path elements are given).
Possible path_elements include:
substratePath(<substrate_name>, "physical_parameter_set", <tag>)with<tag>one of"diffusion_coefficient""decay_rate"
substratePath(<substrate_name>, <tag>)with<tag>one of"initial_condition""Dirichlet_boundary_condition"
substratePath(<substrate_name>, "Dirichlet_options", "boundary_value:ID:<boundary_id>")where<boundary_id>is one of"xmin""xmax""ymin""ymax""zmin""zmax"
PhysiCellModelManager.svgSavePath — Method
svgSavePath()Return the XML path to the interval for SVG data saves.
PhysiCellModelManager.timePath — Method
timePath(tag::AbstractString)Return the XML path to the time for the given tag.
Possible tags include:
"max_time""dt_intracellular""dt_diffusion""dt_mechanics""dt_phenotype"
PhysiCellModelManager.transformationPath — Method
transformationPath(from_cell_definition::AbstractString, to_cell_definition::AbstractString)Return the XML path to the transformation rates for the first cell definition to the second cell definition.
Examples
julia> PhysiCellModelManager.transformationPath("M1", "M2")
6-element Vector{String}:
"cell_definitions"
"cell_definition:name:M1"
"phenotype"
"cell_transformations"
"transformation_rates"
"transformation_rate:name:M2"PhysiCellModelManager.userParameterPath — Method
userParameterPath(tag::AbstractString)Return the XML path to the user parameter for the given field name. userParametersPath is a synonym for this function.
PhysiCellModelManager.volumePath — Method
volumePath(cell_definition::AbstractString, tag::AbstractString)Return the XML path to the volume for the given cell type (or deeper if more path elements are given).
Possible tags include:
"total""fluid_fraction""nuclear""fluid_change_rate""cytoplasmic_biomass_change_rate""nuclear_biomass_change_rate""calcified_fraction""calcification_rate""relative_rupture_volume"
Private API
PhysiCellModelManager.ProjectLocations — Type
ProjectLocationsA struct that contains information about the locations of input files in the project.
The global instance of this struct is project_locations in pcmm_globals (the sole instance of PCMMGlobals) and is created by reading the inputs.toml file in the data directory. It is instantiated with the parseProjectInputsConfigurationFile function.
Fields
all::NTuple{L,Symbol}: A tuple of all locations in the project.required::NTuple{M,Symbol}: A tuple of required locations in the project.varied::NTuple{N,Symbol}: A tuple of varied locations in the project.
PhysiCellModelManager.attackPath — Function
attackPath(cell_definition::AbstractString, target_cell_definition::AbstractString)Alias for attackRatePath.
PhysiCellModelManager.attackRatesPath — Function
attackRatesPath(cell_definition::AbstractString, target_cell_definition::AbstractString)Alias for attackRatePath.
PhysiCellModelManager.cellParameterName — Method
cellParameterName(column_name::String)Return the short name of the varied parameter associated with a cell definition for the given column name used in creating a DataFrame summary table.
PhysiCellModelManager.columnName — Method
columnName(xml_path)Return the column name corresponding to the given XML path.
Works on a vector of strings, an XMLPath object, or a ElementaryVariation object. Inverse of columnNameToXMLPath.
PhysiCellModelManager.columnNameToXMLPath — Method
columnNameToXMLPath(column_name::String)Return the XML path corresponding to the given column name.
Inverse of columnName.
PhysiCellModelManager.createInputsTOMLTemplate — Method
createInputsTOMLTemplate(path_to_toml::String)Create a template TOML file for the inputs configuration at the specified path.
This is something users should not be changing. It is something in the codebase to hopefully facilitate extending this framework to other ABM frameworks.
PhysiCellModelManager.createXMLFile — Method
createXMLFile(location::Symbol, M::AbstractMonad)Create XML file for the given location and variation_id in the given monad.
The file is placed in $(location)_variations and can be accessed from there to run the simulation(s).
PhysiCellModelManager.deathPath — Method
deathPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})Return the XML path to the death for the given cell type (or deeper if more path elements are given). Users are encouraged to use the apoptosisPath or necrosisPath functions.
PhysiCellModelManager.elementIsTerminal — Method
elementIsTerminal(e::XMLElement)Check if an XML element is terminal (i.e., has no child elements). Returns true if the element has no children, false otherwise.
PhysiCellModelManager.folderIsVaried — Method
folderIsVaried(location::Symbol, folder::String)Return true if the location folder allows for varying the input files, false otherwise.
PhysiCellModelManager.getChildByAttribute — Method
getChildByAttribute(parent_element::XMLElement, path_element_split::Vector{<:AbstractString})Get the child element of parent_element that matches the given tag and attribute.
PhysiCellModelManager.getChildByChildContent — Method
getChildByChildContent(current_element::XMLElement, path_element::AbstractString)Get the child element of current_element that matches the given tag and child content.
PhysiCellModelManager.getSimpleContent — Method
getSimpleContent(xml_doc::XMLDocument, xml_path::Vector{<:AbstractString}; required::Bool=true)Get the content of the element in the XML document that matches the given path. See retrieveElement.
Validates that the element is terminal (has no child elements) and contains non-empty text content. Throws AssertionError if either condition is not met.
PhysiCellModelManager.icCellParameterName — Method
icCellParameterName(name::String)Return the short name of the varied parameter associated with a cell patch for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.icECMParameterName — Method
icECMParameterName(name::String)Return the short name of the varied parameter associated with a ECM patch for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.inferDeathModelPath — Method
inferDeathModelPath(death_model::Symbol, token1::AbstractString, token3::AbstractString)Helper function to infer the death model path based on the death model and the third token passed in to configPath.
PhysiCellModelManager.locationFolder — Method
locationFolder(location::Union{String,Symbol})Return the name of the folder for the location (as either a String or Symbol). This is the folder where the directories with the input files for the location are stored.
PhysiCellModelManager.locationIDName — Method
locationIDName(location)Return the name of the ID column for the location (as either a String or Symbol).
Examples
julia> PhysiCellModelManager.locationIDName(:config)
"config_id"PhysiCellModelManager.locationIDNames — Method
locationIDNames()Return the names of the ID columns for all locations.
PhysiCellModelManager.locationPath — Function
locationPath(location::Symbol, folder=missing)Return the path to the location folder in the inputs directory.
If folder is not specified, the path to the location folder is returned.
PhysiCellModelManager.locationPath — Method
locationPath(input_folder::InputFolder)Return the path to the location folder in the inputs directory for the InputFolder object.
PhysiCellModelManager.locationPath — Method
locationPath(location::Symbol, S::AbstractSampling)Return the path to the location folder in the inputs directory for the AbstractSampling object.
PhysiCellModelManager.locationTableName — Method
locationTableName(location)Return the name of the table for the location (as either a String or Symbol). This table stores the folder names and their IDs for the location.
Examples
julia> PhysiCellModelManager.locationTableName(:config)
"configs"PhysiCellModelManager.locationVariationIDName — Method
locationVariationIDName(location)Return the name of the variation ID column for the location (as either a String or Symbol).
Examples
julia> PhysiCellModelManager.locationVariationIDName(:config)
"config_variation_id"PhysiCellModelManager.locationVariationIDNames — Method
locationVariationIDNames()Return the names of the variation ID columns for all varied locations.
PhysiCellModelManager.locationVariationsDBName — Method
locationVariationsDBName(location::Union{String,Symbol})Return the name of the variations database for the location (as either a String or Symbol).
PhysiCellModelManager.locationVariationsFolder — Method
locationVariationsFolder(location)Return the name of the variations folder for the location (as either a String or Symbol).
PhysiCellModelManager.locationVariationsTableName — Method
locationVariationsTableName(location)Return the name of the variations table for the location (as either a String or Symbol). This table stores the variations of the folder it is located in.
PhysiCellModelManager.makeXMLPath — Method
makeXMLPath(xml_doc::XMLDocument, xml_path::AbstractVector{<:AbstractString})Create (if it does not exist) and return the XML element relative to the root of the given XML document.
Arguments
xml_doc::XMLDocument: The XML document to start from.xml_path::AbstractVector{<:AbstractString}: The path to the XML element to create or retrieve. Can be a string representing a child of the root element.
PhysiCellModelManager.makeXMLPath — Method
makeXMLPath(current_element::XMLElement, xml_path::AbstractVector{<:AbstractString})Create (if it does not exist) and return the XML element relative to the given XML element.
Similar functionality to the shell command mkdir -p, but for XML elements.
Arguments
current_element::XMLElement: The current XML element to start from.xml_path::AbstractVector{<:AbstractString}: The path to the XML element to create or retrieve. Can be a string representing a child of the current element.
PhysiCellModelManager.parseProjectInputsConfigurationFile — Method
parseProjectInputsConfigurationFile()Parse the inputs.toml file in the data directory and create a global ProjectLocations object.
PhysiCellModelManager.pathToInputsConfig — Method
pathToInputsConfig()Return the path to the inputs.toml file in the inputs directory.
PhysiCellModelManager.postVariationXMLProcessing — Method
postVariationXMLProcessing(location::Symbol, path_to_xml::String)Perform any post-processing needed after creating the XML file for the given location.
PhysiCellModelManager.prepareBaseFile — Method
prepareBaseFile(input_folder::InputFolder)Return the path to the base XML file for the given input folder.
PhysiCellModelManager.prepareBaseRulesetsCollectionFile — Method
prepareBaseRulesetsCollectionFile(input_folder::InputFolder)Return the path to the base XML file for the given input folder.
PhysiCellModelManager.prepareVariedInputFolder — Method
prepareVariedInputFolder(location::Symbol, M::AbstractMonad)Create the XML file for the location in the monad.
PhysiCellModelManager.prepareVariedInputFolder — Method
prepareVariedInputFolder(location::Symbol, sampling::Sampling)Create the XML file for each monad in the sampling for the given location.
PhysiCellModelManager.retrieveElement — Method
retrieveElement(xml_doc::XMLDocument, xml_path::Vector{<:AbstractString}; required::Bool=true)Retrieve the element in the XML document that matches the given path.
If required is true, an error is thrown if the element is not found. Otherwise, nothing is returned if the element is not found.
PhysiCellModelManager.retrieveElementError — Method
retrieveElementError(xml_path::Vector{<:AbstractString}, path_element::String)Throw an error if the element defined by xml_path is not found in the XML document, including the path element that caused the error.
PhysiCellModelManager.ruleParameterName — Method
ruleParameterName(name::String)Return the short name of the varied parameter associated with a ruleset for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.sanitizePathElement — Method
sanitizePathElement(path_elements::String)Disallow certain path elements to prevent security issues.
PhysiCellModelManager.setSimpleContent — Method
setSimpleContent(xml_doc::XMLDocument, xml_path::Vector{<:AbstractString}, new_value::Union{Int,Real,String})Update the content of the element in the XML document that matches the given path with the new value. See retrieveElement.
Update the content of the element in the XML document that matches the given path with the new value. Validates that the element is terminal (has no child elements) before setting content. Throws AssertionError if the element has child elements.
PhysiCellModelManager.setUpICCell — Method
setUpICCell(simulation::Simulation)Return the path to the IC cell file for the given simulation, creating it if it needs to be generated from an XML file.
PhysiCellModelManager.setUpICECM — Method
setUpICECM(simulation::Simulation)Return the path to the IC ECM file for the given simulation, creating it if it needs to be generated from an XML file.
PhysiCellModelManager.shortConfigVariationName — Method
shortConfigVariationName(name::String)Return the short name of the varied parameter in the configuration file for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.shortICCellVariationName — Method
shortICCellVariationName(name::String)Return the short name of the varied parameter in the IC cell file for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.shortICECMVariationName — Method
shortICECMVariationName(name::String)Return the short name of the varied parameter in the ECM file for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.shortIntracellularVariationName — Method
shortIntracellularVariationName(name::String)Return the short name of the varied parameter in the intracellular file for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.shortLocationVariationID — Method
shortLocationVariationID(fieldname)Return the short location variation ID name used in creating a DataFrame summary table.
Arguments
fieldname: The field name to get the short location variation ID for. This can be a symbol or a string.
PhysiCellModelManager.shortLocationVariationID — Method
shortLocationVariationID(type::Type, fieldname::Union{String, Symbol})Return (as a type) the short location variation ID name used in creating a DataFrame summary table.
PhysiCellModelManager.shortRulesetsVariationName — Method
shortRulesetsVariationName(name::String)Return the short name of the varied parameter in the rulesets collection file for the given name used in creating a DataFrame summary table.
PhysiCellModelManager.shortVariationName — Method
shortVariationName(location::Symbol, name::String)Return the short name of the varied parameter for the given location and name used in creating a DataFrame summary table.
PhysiCellModelManager.userParametersPath — Function
userParametersPath(tag::AbstractString)Alias for userParameterPath.