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 foolproof but less robust:

PhysiCellModelManager.domainPathPhysiCellModelManager.timePathPhysiCellModelManager.fullSavePathPhysiCellModelManager.svgSavePath
PhysiCellModelManager.domainPathPhysiCellModelManager.timePathPhysiCellModelManager.fullSavePathPhysiCellModelManager.svgSavePath
PhysiCellModelManager.substratePathPhysiCellModelManager.cyclePathPhysiCellModelManager.apoptosisPathPhysiCellModelManager.necrosisPath
PhysiCellModelManager.volumePathPhysiCellModelManager.mechanicsPathPhysiCellModelManager.motilityPathPhysiCellModelManager.secretionPath
PhysiCellModelManager.cellInteractionsPathPhysiCellModelManager.phagocytosisPathPhysiCellModelManager.attackRatePathPhysiCellModelManager.fusionPath
PhysiCellModelManager.integrityPathPhysiCellModelManager.customDataPathPhysiCellModelManager.initialParameterDistributionPathPhysiCellModelManager.userParameterPath

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.configPathFunction
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.

source
PhysiCellModelManager.rulePathFunction
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"
source
PhysiCellModelManager.icCellsPathFunction
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"
source
PhysiCellModelManager.icECMPathFunction
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"
source

Config file specific functions

PhysiCellModelManager.domainPathFunction
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")
source
PhysiCellModelManager.timePathFunction
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"
source
PhysiCellModelManager.substratePathFunction
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"
source
PhysiCellModelManager.cyclePathFunction
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 phase
  • cyclePath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # replace 0 with the start index of the phase
source
PhysiCellModelManager.apoptosisPathFunction
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 0
  • apoptosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # apoptosis only has one phase, so start index is always 0
  • apoptosisPath(<cell_type>, "parameters", <tag>) with <tag> one of
    • unlysed_fluid_change_rate
    • lysed_fluid_change_rate
    • cytoplasmic_biomass_change_rate
    • nuclear_biomass_change_rate
    • calcification_rate
    • relative_rupture_volume
source
PhysiCellModelManager.necrosisPathFunction
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 1
  • necrosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # necrosis has two phases, so start index is either 0 or 1
  • necrosisPath(<cell_type>, "parameters", <tag>) with <tag> one of
    • unlysed_fluid_change_rate
    • lysed_fluid_change_rate
    • cytoplasmic_biomass_change_rate
    • nuclear_biomass_change_rate
    • calcification_rate
    • relative_rupture_volume
source
PhysiCellModelManager.volumePathFunction
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"
source
PhysiCellModelManager.mechanicsPathFunction
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"
source
PhysiCellModelManager.motilityPathFunction
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
source
PhysiCellModelManager.secretionPathFunction
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"
source
PhysiCellModelManager.cellInteractionsPathFunction
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.

source
PhysiCellModelManager.phagocytosisPathFunction
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"
source
PhysiCellModelManager.attackRatePathFunction
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"
source
PhysiCellModelManager.fusionPathFunction
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"
source
PhysiCellModelManager.integrityPathFunction
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"
source
PhysiCellModelManager.initialParameterDistributionPathFunction
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, max
  • type="LogUniform" : min, max
  • type="Normal" : mu, sigma, lower_bound, upper_bound
  • type="LogNormal" : mu, sigma, lower_bound, upper_bound
  • type="Log10Normal": mu, sigma, lower_bound, upper_bound
source

Public API

PhysiCellModelManager.apoptosisPathMethod
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 0
  • apoptosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # apoptosis only has one phase, so start index is always 0
  • apoptosisPath(<cell_type>, "parameters", <tag>) with <tag> one of
    • unlysed_fluid_change_rate
    • lysed_fluid_change_rate
    • cytoplasmic_biomass_change_rate
    • nuclear_biomass_change_rate
    • calcification_rate
    • relative_rupture_volume
source
PhysiCellModelManager.attackRatePathMethod
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"
source
PhysiCellModelManager.cellDefinitionPathMethod
cellDefinitionPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})

Return the XML path to the cell definition or deeper if more path elements are given.

source
PhysiCellModelManager.cellInteractionsPathMethod
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.

source
PhysiCellModelManager.configPathMethod
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.

source
PhysiCellModelManager.cyclePathMethod
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 phase
  • cyclePath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # replace 0 with the start index of the phase
source
PhysiCellModelManager.domainPathMethod
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")
source
PhysiCellModelManager.fusionPathMethod
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"
source
PhysiCellModelManager.icCellsPathMethod
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"
source
PhysiCellModelManager.icECMPathMethod
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"
source
PhysiCellModelManager.initialParameterDistributionPathMethod
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, max
  • type="LogUniform" : min, max
  • type="Normal" : mu, sigma, lower_bound, upper_bound
  • type="LogNormal" : mu, sigma, lower_bound, upper_bound
  • type="Log10Normal": mu, sigma, lower_bound, upper_bound
source
PhysiCellModelManager.integrityPathMethod
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"
source
PhysiCellModelManager.mechanicsPathMethod
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"
source
PhysiCellModelManager.motilityPathMethod
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
source
PhysiCellModelManager.necrosisPathMethod
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 1
  • necrosisPath(<cell_type>, "phase_transition_rates", "rate:start_index:0") # necrosis has two phases, so start index is either 0 or 1
  • necrosisPath(<cell_type>, "parameters", <tag>) with <tag> one of
    • unlysed_fluid_change_rate
    • lysed_fluid_change_rate
    • cytoplasmic_biomass_change_rate
    • nuclear_biomass_change_rate
    • calcification_rate
    • relative_rupture_volume
source
PhysiCellModelManager.phagocytosisPathMethod
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"
source
PhysiCellModelManager.phenotypePathMethod
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).

source
PhysiCellModelManager.rulePathMethod
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"
source
PhysiCellModelManager.secretionPathMethod
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"
source
PhysiCellModelManager.substratePathMethod
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"
source
PhysiCellModelManager.timePathMethod
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"
source
PhysiCellModelManager.transformationPathMethod
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"
source
PhysiCellModelManager.volumePathMethod
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"
source

Private API

PhysiCellModelManager.ProjectLocationsType
ProjectLocations

A 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.
source
PhysiCellModelManager.cellParameterNameMethod
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.

source
PhysiCellModelManager.createInputsTOMLTemplateMethod
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.

source
PhysiCellModelManager.createXMLFileMethod
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).

source
PhysiCellModelManager.locationIDNameMethod
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"
source
PhysiCellModelManager.locationPathFunction
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.

source
PhysiCellModelManager.locationTableNameMethod
locationTableName(location)

Return the name of the table for the location (as either a String or Symbol).

Examples

julia> PhysiCellModelManager.locationTableName(:config)
"configs"
source
PhysiCellModelManager.locationVariationIDNameMethod
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"
source
PhysiCellModelManager.makeXMLPathMethod
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.
source
PhysiCellModelManager.makeXMLPathMethod
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.
source
PhysiCellModelManager.pathToICCellMethod
pathToICCell(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.

source
PhysiCellModelManager.pathToICECMMethod
pathToICECM(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.

source
PhysiCellModelManager.retrieveElementMethod
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.

source
PhysiCellModelManager.retrieveElementErrorMethod
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.

source
PhysiCellModelManager.shortLocationVariationIDMethod
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.
source
PhysiCellModelManager.updateFieldMethod
updateField(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.

source