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:

pcvct.domainPathpcvct.timePathpcvct.fullSavePathpcvct.svgSavePath
pcvct.domainPathpcvct.timePathpcvct.fullSavePathpcvct.svgSavePath
pcvct.substratePathpcvct.cyclePathpcvct.apoptosisPathpcvct.necrosisPath
pcvct.volumePathpcvct.mechanicsPathpcvct.motilityPathpcvct.secretionPath
pcvct.cellInteractionsPathpcvct.phagocytosisPathpcvct.attackRatePathpcvct.fusionPath
pcvct.integrityPathpcvct.customDataPathpcvct.initialParameterDistributionPathpcvct.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", "0")` (`cyclePath`)
- `configPath(<cell_type>, "cycle_duration", "0")` (`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

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

pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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> pcvct.phagocytosisPath("M1", "cancer")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:M1"
 "phenotype"
 "cell_interactions"
 "live_phagocytosis_rates"
 "phagocytosis_rate:name:cancer"
julia> pcvct.phagocytosisPath("M1", :apoptotic)
5-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:M1"
 "phenotype"
 "cell_interactions"
 "apoptotic_phagocytosis_rate"
source
pcvct.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> pcvct.attackRatePath("cd8", "cancer")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:cd8"
 "phenotype"
 "cell_interactions"
 "attack_rates"
 "attack_rate:name:cancer"
source
pcvct.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> pcvct.fusionPath("epi", "epi")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:epi"
 "phenotype"
 "cell_interactions"
 "fusion_rates"
 "fusion_rate:name:epi"
source
pcvct.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
pcvct.customDataPathFunction
customDataPath(cell_definition::AbstractString, tag::AbstractString)

Return the XML path to the custom data tag for the given cell type.

source
pcvct.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

pcvct.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
pcvct.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> pcvct.attackRatePath("cd8", "cancer")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:cd8"
 "phenotype"
 "cell_interactions"
 "attack_rates"
 "attack_rate:name:cancer"
source
pcvct.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
pcvct.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
pcvct.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
pcvct.customDataPathMethod
customDataPath(cell_definition::AbstractString, tag::AbstractString)

Return the XML path to the custom data tag for the given cell type.

source
pcvct.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
pcvct.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
pcvct.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> pcvct.fusionPath("epi", "epi")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:epi"
 "phenotype"
 "cell_interactions"
 "fusion_rates"
 "fusion_rate:name:epi"
source
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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> pcvct.phagocytosisPath("M1", "cancer")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:M1"
 "phenotype"
 "cell_interactions"
 "live_phagocytosis_rates"
 "phagocytosis_rate:name:cancer"
julia> pcvct.phagocytosisPath("M1", :apoptotic)
5-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:M1"
 "phenotype"
 "cell_interactions"
 "apoptotic_phagocytosis_rate"
source
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.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> pcvct.transformationPath("M1", "M2")
6-element Vector{String}:
 "cell_definitions"
 "cell_definition:name:M1"
 "phenotype"
 "cell_transformations"
 "transformation_rates"
 "transformation_rate:name:M2"
source
pcvct.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

pcvct.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 pcvct_globals (the sole instance of PCVCTGlobals) 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
pcvct.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
pcvct.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
pcvct.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
pcvct.deathPathMethod
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.

source
pcvct.folderIsVariedMethod
folderIsVaried(location::Symbol, folder::String)

Return true if the location folder allows for varying the input files, false otherwise.

source
pcvct.getChildByAttributeMethod
getChildByAttribute(parent_element::XMLElement, path_element_split::Vector{<:AbstractString})

Get the child element of parent_element that matches the given tag and attribute.

source
pcvct.getChildByChildContentMethod
getChildByChildContent(current_element::XMLElement, path_element::AbstractString)

Get the child element of current_element that matches the given tag and child content.

source
pcvct.getContentMethod
getContent(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.

source
pcvct.icCellParameterNameMethod
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.

source
pcvct.icECMParameterNameMethod
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.

source
pcvct.inferDeathModelPathMethod
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.

source
pcvct.locationIDNameMethod
locationIDName(location)

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

Examples

julia> pcvct.locationIDName(:config)
"config_id"
source
pcvct.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
pcvct.locationVariationIDNameMethod
locationVariationIDName(location)

Return the name of the variation ID column for the location (as either a String or Symbol).

Examples

julia> pcvct.locationVariationIDName(:config)
"config_variation_id"
source
pcvct.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
pcvct.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
pcvct.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
pcvct.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
pcvct.prepareBaseFileMethod
prepareBaseFile(input_folder::InputFolder)

Return the path to the base XML file for the given input folder.

source
pcvct.prepareVariedInputFolderMethod
prepareVariedInputFolder(location::Symbol, sampling::Sampling)

Create the XML file for each monad in the sampling for the given location.

source
pcvct.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
pcvct.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
pcvct.ruleParameterNameMethod
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.

source
pcvct.shortConfigVariationNameMethod
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.

source
pcvct.shortICCellVariationNameMethod
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.

source
pcvct.shortICECMVariationNameMethod
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.

source
pcvct.shortIntracellularVariationNameMethod
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.

source
pcvct.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
pcvct.shortLocationVariationIDMethod
shortLocationVariationID(type::Type, fieldname::Union{String, Symbol})

Return (as a type) the short location variation ID name used in creating a DataFrame summary table.

source
pcvct.shortRulesetsVariationNameMethod
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.

source
pcvct.shortVariationNameMethod
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.

source
pcvct.tableNameMethod
tableName(location)

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

Examples

julia> pcvct.tableName(:config)
"configs"
source
pcvct.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
pcvct.variationsTableNameMethod
variationsTableName(location)

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

source