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:
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.configPath
— FunctionconfigPath(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.
pcvct.rulePath
— FunctionrulePath(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"
pcvct.icCellsPath
— FunctionicCellsPath(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"
pcvct.icECMPath
— FunctionicECMPath(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
pcvct.domainPath
— FunctiondomainPath(tag::AbstractString)
Return the XML path to the domain for the given tag.
Possible tag
s include:
"x_min"
"x_max"
"y_min"
"y_max"
"z_min"
"z_max"
"dx"
"dy"
"dz"
"use_2D"
(value is"true"
or"false"
)
pcvct.timePath
— FunctiontimePath(tag::AbstractString)
Return the XML path to the time for the given tag.
Possible tag
s include:
"max_time"
"dt_intracellular"
"dt_diffusion"
"dt_mechanics"
"dt_phenotype"
pcvct.fullSavePath
— FunctionfullSavePath()
Return the XML path to the interval for full data saves.
pcvct.svgSavePath
— FunctionsvgSavePath()
Return the XML path to the interval for SVG data saves.
pcvct.substratePath
— FunctionsubstratePath(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"
pcvct.cyclePath
— FunctioncyclePath(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
pcvct.apoptosisPath
— FunctionapoptosisPath(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_rate
lysed_fluid_change_rate
cytoplasmic_biomass_change_rate
nuclear_biomass_change_rate
calcification_rate
relative_rupture_volume
pcvct.necrosisPath
— FunctionnecrosisPath(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_rate
lysed_fluid_change_rate
cytoplasmic_biomass_change_rate
nuclear_biomass_change_rate
calcification_rate
relative_rupture_volume
pcvct.volumePath
— FunctionvolumePath(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 tag
s include:
"total"
"fluid_fraction"
"nuclear"
"fluid_change_rate"
"cytoplasmic_biomass_change_rate"
"nuclear_biomass_change_rate"
"calcified_fraction"
"calcification_rate"
"relative_rupture_volume"
pcvct.mechanicsPath
— FunctionmechanicsPath(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"
pcvct.motilityPath
— FunctionmotilityPath(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
pcvct.secretionPath
— FunctionsecretionPath(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 tag
s include:
"secretion_rate"
"secretion_target"
"uptake_rate"
"net_export_rate"
pcvct.cellInteractionsPath
— FunctioncellInteractionsPath(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.
pcvct.phagocytosisPath
— FunctionphagocytosisPath(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"
pcvct.attackRatePath
— FunctionattackRatePath(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"
pcvct.fusionPath
— FunctionfusionPath(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"
pcvct.integrityPath
— FunctionintegrityPath(cell_definition::AbstractString, tag::AbstractString)
Return the XML path to the cell integrity tag for the given cell type.
Possible tag
s include:
"damage_rate"
"damage_repair_rate"
pcvct.customDataPath
— FunctioncustomDataPath(cell_definition::AbstractString, tag::AbstractString)
Return the XML path to the custom data tag for the given cell type.
pcvct.initialParameterDistributionPath
— FunctioninitialParameterDistributionPath(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
pcvct.userParameterPath
— FunctionuserParameterPath(tag::AbstractString)
Return the XML path to the user parameter for the given field name. userParametersPath
is a synonym for this function.
Public API
pcvct.apoptosisPath
— MethodapoptosisPath(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_rate
lysed_fluid_change_rate
cytoplasmic_biomass_change_rate
nuclear_biomass_change_rate
calcification_rate
relative_rupture_volume
pcvct.attackRatePath
— MethodattackRatePath(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"
pcvct.cellDefinitionPath
— MethodcellDefinitionPath(cell_definition::AbstractString, path_elements::Vararg{AbstractString})
Return the XML path to the cell definition or deeper if more path elements are given.
pcvct.cellInteractionsPath
— MethodcellInteractionsPath(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.
pcvct.configPath
— MethodconfigPath(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.
pcvct.customDataPath
— MethodcustomDataPath(cell_definition::AbstractString, tag::AbstractString)
Return the XML path to the custom data tag for the given cell type.
pcvct.cyclePath
— MethodcyclePath(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
pcvct.domainPath
— MethoddomainPath(tag::AbstractString)
Return the XML path to the domain for the given tag.
Possible tag
s include:
"x_min"
"x_max"
"y_min"
"y_max"
"z_min"
"z_max"
"dx"
"dy"
"dz"
"use_2D"
(value is"true"
or"false"
)
pcvct.fullSavePath
— MethodfullSavePath()
Return the XML path to the interval for full data saves.
pcvct.fusionPath
— MethodfusionPath(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"
pcvct.icCellsPath
— MethodicCellsPath(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"
pcvct.icECMPath
— MethodicECMPath(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"
pcvct.initialParameterDistributionPath
— MethodinitialParameterDistributionPath(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
pcvct.integrityPath
— MethodintegrityPath(cell_definition::AbstractString, tag::AbstractString)
Return the XML path to the cell integrity tag for the given cell type.
Possible tag
s include:
"damage_rate"
"damage_repair_rate"
pcvct.mechanicsPath
— MethodmechanicsPath(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"
pcvct.motilityPath
— MethodmotilityPath(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
pcvct.necrosisPath
— MethodnecrosisPath(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_rate
lysed_fluid_change_rate
cytoplasmic_biomass_change_rate
nuclear_biomass_change_rate
calcification_rate
relative_rupture_volume
pcvct.phagocytosisPath
— MethodphagocytosisPath(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"
pcvct.phenotypePath
— MethodphenotypePath(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).
pcvct.rulePath
— MethodrulePath(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"
pcvct.secretionPath
— MethodsecretionPath(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 tag
s include:
"secretion_rate"
"secretion_target"
"uptake_rate"
"net_export_rate"
pcvct.substratePath
— MethodsubstratePath(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"
pcvct.svgSavePath
— MethodsvgSavePath()
Return the XML path to the interval for SVG data saves.
pcvct.timePath
— MethodtimePath(tag::AbstractString)
Return the XML path to the time for the given tag.
Possible tag
s include:
"max_time"
"dt_intracellular"
"dt_diffusion"
"dt_mechanics"
"dt_phenotype"
pcvct.transformationPath
— MethodtransformationPath(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"
pcvct.userParameterPath
— MethoduserParameterPath(tag::AbstractString)
Return the XML path to the user parameter for the given field name. userParametersPath
is a synonym for this function.
pcvct.volumePath
— MethodvolumePath(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 tag
s 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
pcvct.ProjectLocations
— TypeProjectLocations
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.
pcvct.attackPath
— FunctionattackPath(cell_definition::AbstractString, target_cell_definition::AbstractString)
Alias for attackRatePath
.
pcvct.attackRatesPath
— FunctionattackRatesPath(cell_definition::AbstractString, target_cell_definition::AbstractString)
Alias for attackRatePath
.
pcvct.cellParameterName
— MethodcellParameterName(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.
pcvct.columnName
— MethodcolumnName(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
.
pcvct.columnNameToXMLPath
— MethodcolumnNameToXMLPath(column_name::String)
Return the XML path corresponding to the given column name.
Inverse of columnName
.
pcvct.createInputsTOMLTemplate
— MethodcreateInputsTOMLTemplate(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.
pcvct.createXMLFile
— MethodcreateXMLFile(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).
pcvct.deathPath
— MethoddeathPath(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.
pcvct.folderIsVaried
— MethodfolderIsVaried(location::Symbol, folder::String)
Return true
if the location folder allows for varying the input files, false
otherwise.
pcvct.getChildByAttribute
— MethodgetChildByAttribute(parent_element::XMLElement, path_element_split::Vector{<:AbstractString})
Get the child element of parent_element
that matches the given tag and attribute.
pcvct.getChildByChildContent
— MethodgetChildByChildContent(current_element::XMLElement, path_element::AbstractString)
Get the child element of current_element
that matches the given tag and child content.
pcvct.getContent
— MethodgetContent(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
.
pcvct.icCellParameterName
— MethodicCellParameterName(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.
pcvct.icECMParameterName
— MethodicECMParameterName(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.
pcvct.inferDeathModelPath
— MethodinferDeathModelPath(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
.
pcvct.locationIDName
— MethodlocationIDName(location)
Return the name of the ID column for the location (as either a String or Symbol).
Examples
julia> pcvct.locationIDName(:config)
"config_id"
pcvct.locationIDNames
— MethodlocationIDNames()
Return the names of the ID columns for all locations.
pcvct.locationPath
— FunctionlocationPath(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.
pcvct.locationPath
— MethodlocationPath(location::Symbol, S::AbstractSampling)
Return the path to the location folder in the inputs
directory for the AbstractSampling
object.
pcvct.locationPath
— MethodlocationPath(input_folder::InputFolder)
Return the path to the location folder in the inputs
directory for the InputFolder
object.
pcvct.locationVariationIDName
— MethodlocationVariationIDName(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"
pcvct.locationVariationIDNames
— MethodlocationVariationIDNames()
Return the names of the variation ID columns for all varied locations.
pcvct.makeXMLPath
— MethodmakeXMLPath(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.
pcvct.makeXMLPath
— MethodmakeXMLPath(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.
pcvct.parseProjectInputsConfigurationFile
— MethodparseProjectInputsConfigurationFile()
Parse the inputs.toml
file in the data directory and create a global ProjectLocations
object.
pcvct.pathToICCell
— MethodpathToICCell(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.
pcvct.pathToICECM
— MethodpathToICECM(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.
pcvct.prepareBaseFile
— MethodprepareBaseFile(input_folder::InputFolder)
Return the path to the base XML file for the given input folder.
pcvct.prepareBaseRulesetsCollectionFile
— MethodprepareBaseRulesetsCollectionFile(input_folder::InputFolder)
Return the path to the base XML file for the given input folder.
pcvct.prepareVariedInputFolder
— MethodprepareVariedInputFolder(location::Symbol, sampling::Sampling)
Create the XML file for each monad in the sampling for the given location.
pcvct.prepareVariedInputFolder
— MethodprepareVariedInputFolder(location::Symbol, M::AbstractMonad)
Create the XML file for the location in the monad.
pcvct.retrieveElement
— MethodretrieveElement(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.
pcvct.retrieveElementError
— MethodretrieveElementError(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.
pcvct.ruleParameterName
— MethodruleParameterName(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.
pcvct.sanitizePathElement
— MethodsanitizePathElement(path_elements::String)
Disallow certain path elements to prevent security issues.
pcvct.shortConfigVariationName
— MethodshortConfigVariationName(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.
pcvct.shortICCellVariationName
— MethodshortICCellVariationName(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.
pcvct.shortICECMVariationName
— MethodshortICECMVariationName(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.
pcvct.shortIntracellularVariationName
— MethodshortIntracellularVariationName(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.
pcvct.shortLocationVariationID
— MethodshortLocationVariationID(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.
pcvct.shortLocationVariationID
— MethodshortLocationVariationID(type::Type, fieldname::Union{String, Symbol})
Return (as a type
) the short location variation ID name used in creating a DataFrame summary table.
pcvct.shortRulesetsVariationName
— MethodshortRulesetsVariationName(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.
pcvct.shortVariationName
— MethodshortVariationName(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.
pcvct.tableName
— MethodtableName(location)
Return the name of the table for the location (as either a String or Symbol).
Examples
julia> pcvct.tableName(:config)
"configs"
pcvct.updateField
— MethodupdateField(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
.
pcvct.userParametersPath
— FunctionuserParametersPath(tag::AbstractString)
Alias for userParameterPath
.
pcvct.variationsTableName
— MethodvariationsTableName(location)
Return the name of the variations table for the location (as either a String or Symbol).