Variations
Vary parameters of the project.
Public API
PhysiCellModelManager.CoVariation — Type
CoVariation{T<:ElementaryVariation} <: AbstractVariationA co-variation of one or more variations. Each must be of the same type, either DiscreteVariation or DistributedVariation.
Fields
variations::Vector{T}: The variations that make up the co-variation.
Constructors
CoVariation(inputs::Vararg{Tuple{Vector{<:AbstractString},Distribution},N}) where {N}: Create a co-variation from a vector of XML paths and distributions.
CoVariation((xml_path_1, d_1), (xml_path_2, d_2), ...) # d_i are distributions, e.g. `d_1 = Uniform(1, 2)`CoVariation(inputs::Vararg{Tuple{Vector{<:AbstractString},Vector},N}) where {N}: Create a co-variation from a vector of XML paths and values.
CoVariation((xml_path_1, val_1), (xml_path_2, val_2), ...) # val_i are vectors of values, e.g. `val_1 = [0.1, 0.2]`, or singletons, e.g. `val_2 = 0.3`CoVariation(evs::Vector{ElementaryVariation}): Create a co-variation from a vector of variations all the same type.
CoVariation([discrete_1, discrete_2, ...]) # all discrete variations and with the same number of values
CoVariation([distributed_1, distributed_2, ...]) # all distributed variationsCoVariation(inputs::Vararg{T}) where {T<:ElementaryVariation}: Create a co-variation from a variable number of variations all the same type.
CoVariation(discrete_1, discrete_2, ...) # all discrete variations and with the same number of values
CoVariation(distributed_1, distributed_2, ...) # all distributed variationsPhysiCellModelManager.DiscreteVariation — Type
DiscreteVariationThe location, target, and values of a discrete variation.
Fields
location::Symbol: The location of the variation. Can be:config,:rulesets_collection,:intracellular,:ic_cell,:ic_ecm. The location is inferred from the target.target::XMLPath: The target of the variation. The target is a vector of strings that represent the XML path to the element being varied. SeeXMLPathfor more information.values::Vector{T}: The values of the variation. The values are the possible values that the target can take on.
A singleton value can be passed in place of values for convenience.
Examples
julia> dv = DiscreteVariation(["overall", "max_time"], [1440.0, 2880.0])
DiscreteVariation (Float64):
location: config
target: overall/max_time
values: [1440.0, 2880.0]xml_path = rulePath("default", "cycle entry", "decreasing_signals", "max_response")
DiscreteVariation(xml_path, 0)
# output
DiscreteVariation (Int64):
location: rulesets_collection
target: behavior_ruleset:name:default/behavior:name:cycle entry/decreasing_signals/max_response
values: [0]xml_path = icCellsPath("default", "disc", 1, "x0")
DiscreteVariation(xml_path, [0.0, 100.0])
# output
DiscreteVariation (Float64):
location: ic_cell
target: cell_patches:name:default/patch_collection:type:disc/patch:ID:1/x0
values: [0.0, 100.0]xml_path = icECMPath(2, "ellipse", 1, "density")
DiscreteVariation(xml_path, [0.1, 0.2])
# output
DiscreteVariation (Float64):
location: ic_ecm
target: layer:ID:2/patch_collection:type:ellipse/patch:ID:1/density
values: [0.1, 0.2]PhysiCellModelManager.DistributedVariation — Type
DistributedVariationThe location, target, and distribution of a distributed variation.
Analagousy to DiscreteVariation, instances of DistributedVariation can be initialized with a target (XML path) and a distribution (a distribution from the Distributions package). Alternatively, users can use the UniformDistributedVariation and NormalDistributedVariation functions to create instances of DistributedVariation.
Fields
location::Symbol: The location of the variation. Can be:config,:rulesets_collection,:intracellular,:ic_cell, or:ic_ecm. The location is inferred from the target.target::XMLPath: The target of the variation. The target is a vector of strings that represent the XML path to the element being varied. SeeXMLPathfor more information.distribution::Distribution: The distribution of the variation.flip::Bool=false: Whether to flip the distribution, i.e., when asked for the iCDF ofx, return the iCDF of1-x. Useful forCoVariation's.
Examples
using Distributions
d = Uniform(1, 2)
DistributedVariation(PhysiCellModelManager.apoptosisPath("default", "death_rate"), d)
# output
DistributedVariation:
location: config
target: cell_definitions/cell_definition:name:default/phenotype/death/model:code:100/death_rate
distribution: Distributions.Uniform{Float64}(a=1.0, b=2.0)using Distributions
d = Uniform(1, 2)
flip = true # the cdf on this variation will decrease from 1 to 0 as the value increases from 1 to 2
DistributedVariation(PhysiCellModelManager.necrosisPath("default", "death_rate"), d; flip=flip)
# output
DistributedVariation (flipped):
location: config
target: cell_definitions/cell_definition:name:default/phenotype/death/model:code:101/death_rate
distribution: Distributions.Uniform{Float64}(a=1.0, b=2.0)PhysiCellModelManager.ElementaryVariation — Type
ElementaryVariation <: AbstractVariationThe base type for variations of a single parameter.
PhysiCellModelManager.GridVariation — Type
GridVariation <: AddVariationMethodA variation method that creates a grid of all possible combinations of the values of the variations.
Examples
julia> GridVariation() # the only method for GridVariation
GridVariation()PhysiCellModelManager.LHSVariation — Type
LHSVariation <: AddVariationMethodA variation method that creates a Latin Hypercube Sample of the values of the variations.
Fields
Default values from constructors are shown.
n::Int: The number of samples to take.add_noise::Bool=false: Whether to add noise to the samples or have them be in the center of the bins.rng::AbstractRNG=Random.GLOBAL_RNG: The random number generator to use.orthogonalize::Bool=true: Whether to orthogonalize the samples. See https://en.wikipedia.org/wiki/Latinhypercubesampling#:~:text=In%20orthogonal%20sampling
Examples
julia> LHSVariation(4) # set `n` and use default values for the rest
LHSVariation(4, false, Random.TaskLocalRNG(), true)using Random
LHSVariation(; n=16, add_noise=true, rng=MersenneTwister(1234), orthogonalize=false)
# output
LHSVariation(16, true, MersenneTwister(1234), false)PhysiCellModelManager.LatentVariation — Type
LatentVariation{T<:Union{Vector{<:Real},<:Distribution}} <: AbstractVariationA variation that uses latent parameters to generate the variation values.
Whereas CoVariations enforce a 1D relationship between parameters, LatentVariations allow for multi-dimensional relationships between parameters via the mapping functions and latent parameters. These latent parameters are not recorded in the database; only the values of the target parameters are recorded.
Internally, ParsedVariations converts all variations to LatentVariations for processing.
Sensitivity Analysis
When performing senstivity analysis with these, the latent parameter names are used to identify the parameters in the Monad DataFrames. If the user does not provide names for the latent parameters, default names are generated based on the targets. See defaultLatentParameterNames for more information.
Fields
latent_parameters::Vector{T}: The latent parameters used to generate the variation values. Must be either all vectors of real values or all distributions.latent_parameter_names::Vector{String}: The names of the latent parameters (useful for interpretable names in sensitivity analysis). Default names are generated if not provided.locations::Vector{Symbol}: The locations where the variations are applied.targets::Vector{XMLPath}: The target parameters to vary.maps::Vector{<:Function}: The mapping functions that take in the latent parameters (as a vector) and output the target parameter value.types::Vector{DataType}: The data types of the target parameters.
Note:
- The length of
latent_parametersandlatent_parameter_namesmust be the same, one per latent parameter. - The lengths of
locations,targets,maps, andtypesmust be the same, one per target parameter.
Examples
using Distributions
latent_parameters = [Uniform(0.0, 1.0), truncated(Normal(0.5, 0.1); lower=0)] # two latent parameters: one setting the bottom threshold and one setting the threshold gap
latent_parameter_names = ["bottom_threshold", "threshold_gap"] # optional, human-interpretable names for the latent parameters
targets = [rulePath("stem", "asymmetric division to type1", "increasing_signals", "signal:name:custom:alpha", "half_max"), # this will track the bottom threshold
rulePath("stem", "asymmetric division to type1", "decreasing_signals", "signal:name:custom:alpha", "half_max"), # this will track the top threshold
rulePath("stem", "asymmetric division to type2", "increasing_signals", "signal:name:custom:alpha", "half_max")] # this will also track the top threshold
maps = [lp -> lp[1], # map the first latent parameter to the bottom threshold
lp -> lp[1] + lp[2], # map the sum of the two latent parameters to the top threshold
lp -> lp[1] + lp[2]] # map the sum of the two latent parameters to the top threshold for the second rule as well
LatentVariation(latent_parameters, targets, maps, latent_parameter_names)
# output
LatentVariation (Distribution), 2 -> 3:
---------------------------------------
Latent Parameters (n = 2):
lp#1. bottom_threshold (Distributions.Uniform{Float64}(a=0.0, b=1.0))
lp#2. threshold_gap (Truncated(Distributions.Normal{Float64}(μ=0.5, σ=0.1); lower=0.0))
Target Parameters (n = 3):
tp#1. stem: custom:alpha increases asymmetric division to type1 half max
Location: rulesets_collection
Target: XMLPath: behavior_ruleset:name:stem/behavior:name:asymmetric division to type1/increasing_signals/signal:name:custom:alpha/half_max
tp#2. stem: custom:alpha decreases asymmetric division to type1 half max
Location: rulesets_collection
Target: XMLPath: behavior_ruleset:name:stem/behavior:name:asymmetric division to type1/decreasing_signals/signal:name:custom:alpha/half_max
tp#3. stem: custom:alpha increases asymmetric division to type2 half max
Location: rulesets_collection
Target: XMLPath: behavior_ruleset:name:stem/behavior:name:asymmetric division to type2/increasing_signals/signal:name:custom:alpha/half_maxPhysiCellModelManager.RBDVariation — Type
RBDVariation <: AddVariationMethodA variation method that creates a Random Balance Design of the values of the variations.
This creates n sample points where the values in each dimension are uniformly distributed. By default, this will use Sobol sequences (see SobolVariation) to create the sample points. If use_sobol is false, it will use random permutations of uniformly spaced points for each dimension.
Fields
Default values from constructors are shown.
n::Int: The number of samples to take.rng::AbstractRNG=Random.GLOBAL_RNG: The random number generator to use.use_sobol::Bool=true: Whether to use Sobol sequences to create the sample points.
Do not set these next two fields unless you know what you are doing. Let PhysiCellModelManager.jl compute them.
pow2_diff::Union{Missing, Int}=missing: The difference betweennand the nearest power of 2. Missing means PhysiCellModelManager.jl will compute it if using Sobol sequences.num_cycles::Union{Missing, Int, Rational}=missing: The number of cycles to use in the Sobol sequence. Missing means PhysiCellModelManager.jl will set it.
Examples
julia> PhysiCellModelManager.RBDVariation(4) # set `n` and use default values for the rest
RBDVariation(4, Random.TaskLocalRNG(), true, 0, 1//2)julia> PhysiCellModelManager.RBDVariation(4; use_sobol=false) # use random permutations of uniformly spaced points
RBDVariation(4, Random.TaskLocalRNG(), false, missing, 1//1)PhysiCellModelManager.SobolVariation — Type
SobolVariation <: AddVariationMethodA variation method that creates a Sobol sequence of the values of the variations.
See generateSobolCDFs for more information on how the Sobol sequence is generated based on n and the other fields.
See the GlobalSensitivity.jl package for more information on RandomizationMethod's to use.
Fields
Default values from constructors are shown.
n::Int: The number of samples to take.n_matrices::Int=1: The number of matrices to use in the Sobol sequence.randomization::RandomizationMethod=NoRand(): The randomization method to use on the deterministic Sobol sequence.skip_start::Union{Missing, Bool, Int}=missing: Whether to skip the start of the sequence. Missing means PhysiCellModelManager.jl will choose the best option.include_one::Union{Missing, Bool}=missing: Whether to include 1 in the sequence. Missing means PhysiCellModelManager.jl will choose the best option.
Examples
julia> SobolVariation(9) # set `n` and use default values for the rest; will use [0, 0.5, 0.25, 0.75, 0.125, 0.375, 0.625, 0.875, 1]
SobolVariation(9, 1, QuasiMonteCarlo.NoRand(), missing, missing)julia> SobolVariation(15; skip_start=true) # use [0.5, 0.25, 0.75, ..., 1/16, 3/16, ..., 15/16]
SobolVariation(15, 1, QuasiMonteCarlo.NoRand(), true, missing)julia> SobolVariation(4; include_one=true) # use [0, 0.5, 1] and one of [0.25, 0.75]
SobolVariation(4, 1, QuasiMonteCarlo.NoRand(), missing, true)PhysiCellModelManager.NormalDistributedVariation — Method
NormalDistributedVariation(xml_path::Vector{<:AbstractString}, mu::T, sigma::T; lb::Real=-Inf, ub::Real=Inf, flip::Bool=false) where {T<:Real}Create a (possibly truncated) distributed variation with a normal distribution.
PhysiCellModelManager.UniformDistributedVariation — Method
UniformDistributedVariation(xml_path::Vector{<:AbstractString}, lb::T, ub::T; flip::Bool=false) where {T<:Real}Create a distributed variation with a uniform distribution.
PhysiCellModelManager.addAttackRateVariationDimension! — Method
addAttackRateVariationDimension!(evs::Vector{<:ElementaryVariation}, cell_definition::String, target_name::String, values::Vector{T} where T)Deprecated function that pushes a variation onto evs for the attack rate of a cell type against a target cell type.
Instead of using this function, use configPath(<attacker_cell_type>, "attack", <target_cell_type>) to create the XML path and then use DiscreteVariation to create the variation.
Examples:
addAttackRateVariationDimension!(evs, "immune", "cancer", [0.1, 0.2, 0.3])PhysiCellModelManager.addCustomDataVariationDimension! — Method
addCustomDataVariationDimension!(evs::Vector{<:ElementaryVariation}, cell_definition::String, field_name::String, values::Vector{T} where T)Deprecated function that pushes a variation onto evs for a custom data field of a cell type.
Instead of using this function, use configPath(<cell_definition>, "custom", <tag>) to create the XML path and then use DiscreteVariation to create the variation.
Examples:
addCustomDataVariationDimension!(evs, "immune", "perforin", [0.1, 0.2, 0.3])PhysiCellModelManager.addDomainVariationDimension! — Method
addDomainVariationDimension!(evs::Vector{<:ElementaryVariation}, domain::NamedTuple)Deprecated function that pushes variations onto evs for each domain boundary named in domain.
The names in domain can be flexibly named as long as they contain either min or max and one of x, y, or z (other than the the x in max). It is not required to include all three dimensions and their boundaries. The values for each boundary can be a single value or a vector of values.
Instead of using this function, use configPath("x_min"), configPath("x_max"), etc. to create the XML paths and then use DiscreteVariation to create the variations. Use a CoVariation if you want to vary any of these together.
Examples:
evs = ElementaryVariation[]
addDomainVariationDimension!(evs, (x_min=-78, xmax=78, min_y=-30, maxy=[30, 60], z_max=10))Private API
PhysiCellModelManager.AbstractVariation — Type
AbstractVariationAbstract type for variations.
Subtypes
ElementaryVariation, DiscreteVariation, DistributedVariation, CoVariation
Methods
PhysiCellModelManager.AddGridVariationsResult — Type
AddGridVariationsResult <: AddVariationsResultA struct that holds the result of adding grid variations to a set of inputs.
Fields
variation_ids::AbstractArray{VariationID}: The variation IDs for all the variations added.
PhysiCellModelManager.AddLHSVariationsResult — Type
AddLHSVariationsResult <: AddVariationsResultA struct that holds the result of adding LHS variations to a set of inputs.
Fields
cdfs::Matrix{Float64}: The CDFs for the samples. Each row is a sample and each column is a dimension (corresponding to a latent parameter).variation_ids::Vector{VariationID}: The variation IDs for all the variations added.
PhysiCellModelManager.AddRBDVariationsResult — Type
AddRBDVariationsResult <: AddVariationsResultA struct that holds the result of adding Sobol variations to a set of inputs.
Fields
variation_ids::AbstractArray{VariationID}: The variation IDs for all the variations added.variation_matrix::Matrix{VariationID}: The matrix of variation IDs sorted for RBD calculations.
PhysiCellModelManager.AddSobolVariationsResult — Type
AddSobolVariationsResult <: AddVariationsResultA struct that holds the result of adding Sobol variations to a set of inputs.
Fields
cdfs::Array{Float64, 3}: The CDFs for the samples. The first dimension is the varied parameters, the second dimension is the design matrices, and the third dimension is the samples.variation_ids::AbstractArray{VariationID}: The variation IDs for all the variations added.
PhysiCellModelManager.AddVariationMethod — Type
AddVariationMethodAbstract type for variation methods.
Subtypes
GridVariation, LHSVariation, SobolVariation, RBDVariation
Methods
PhysiCellModelManager.AddVariationsResult — Type
AddVariationsResultAbstract type for the result of adding variations to a set of inputs.
Subtypes
AddGridVariationsResult, AddLHSVariationsResult, AddSobolVariationsResult, AddRBDVariationsResult
PhysiCellModelManager.ColumnSetup — Type
ColumnSetupA struct to hold the setup for the columns in a variations database.
Fields
db::SQLite.DB: The database connection to the variations database.table::String: The name of the table in the database.variation_id_name::String: The name of the variation ID column in the table.ordered_inds::Vector{Int}: Indexes into the concatenated static and varied values to get the parameters in the order of the table columns (excluding the variation ID and par_key columns).static_values::Vector{String}: The static values for the columns that are not varied.feature_str::String: The string representation of the features (columns) in the table.types::Vector{DataType}: The data types of the columns in the table.placeholders::String: The string representation of the placeholders for the values in the table.stmt_insert::SQLite.Stmt: The prepared statement for inserting new rows into the table.stmt_select::SQLite.Stmt: The prepared statement for selecting existing rows from the table.
PhysiCellModelManager.ParsedVariations — Type
ParsedVariationsA struct that holds the parsed variations and their sizes for all locations.
Fields
latent_variations::Vector{T}: The latent variations parsed from the input variations.
PhysiCellModelManager.XMLPath — Type
XMLPathHold the XML path as a vector of strings.
PhysiCell uses a : in names for signals/behaviors from cell custom data. For example, custom:sample is the default way to represent the sample custom data in a PhysiCell rule. PhysiCellModelManager.jl uses : to indicate an attribute in an XML path and thus splits on : when looking for attribute values. To avoid this conflict, PhysiCellModelManager.jl will internally replace custom:<name> and custom: <name> with custom <name>. Users should never have to think about this. Any PhysiCellModelManager.jl function that uses XML paths will automatically handle this replacement.
Distributions.cdf — Method
cdf(ev::ElementaryVariation, x::Real)Get the cumulative distribution function (CDF) of the variation at x.
If ev is a DiscreteVariation, x must be in the values of the variation. The value returned is from 0:Δ:1 where Δ=1/(n-1) and n is the number of values in the variation.
If ev is a DistributedVariation, the CDF is computed from the distribution of the variation.
PhysiCellModelManager.addCDFVariations — Method
addCDFVariations(inputs::InputFolders, pv::ParsedVariations, reference_variation_id::VariationID, cdfs::AbstractMatrix{Float64})Add variations to the inputs. Used in addVariations with the LHSVariation, SobolVariation, and RBDVariation methods.
PhysiCellModelManager.addColumns — Method
addColumns(location::Symbol, folder_id::Int, loc_types::Vector{DataType}, loc_targets::Vector{XMLPath})Add columns to the variations database for the given location and folder_id.
PhysiCellModelManager.addVariationRow — Method
addVariationRow(column_setup::ColumnSetup, varied_values::Vector{<:Real})Add a new row to the location variations database using the prepared statement. If the row already exists, it returns the existing variation ID.
PhysiCellModelManager.addVariationRows — Method
addVariationRows(inputs::InputFolders, reference_variation_id::VariationID, loc_dicts::Dict)Add new rows to the variations databases for the given inputs and return the new variation IDs.
PhysiCellModelManager.addVariations — Function
addVariations(method::AddVariationMethod, inputs::InputFolders, avs::Vector{<:AbstractVariation}, reference_variation_id::VariationID=VariationID(inputs))Add variations to the inputs using the specified AddVariationMethod and the variations in avs.
PhysiCellModelManager.createSortedRBDMatrix — Method
createSortedRBDMatrix(variation_ids::Vector{Int}, rbd_sorting_inds::Matrix{Int})Create a sorted matrix of variation IDs based on the RBD sorting indices. This ensures that the orderings for each parameter stored for the RBD calculations.
PhysiCellModelManager.defaultLatentParameterNames — Method
defaultLatentParameterNames(latent_parameters::Vector, targets::Vector{XMLPath})Generate default names for latent parameters based on the target parameters. For each latent parameter, the name is constructed as: "<target_1> | <target_2> | ... | lp#<i>" where <target_n> is the column name of the n-th target parameter and <i> is the index of the latent parameter.
Returns
Vector{String}: A vector of default names for the latent parameters.
PhysiCellModelManager.generateLHSCDFs — Method
generateLHSCDFs(n::Int, d::Int[; add_noise::Bool=false, rng::AbstractRNG=Random.GLOBAL_RNG, orthogonalize::Bool=true])Generate a Latin Hypercube Sample of the Cumulative Distribution Functions (CDFs) for n samples in d dimensions.
Arguments
n::Int: The number of samples to take.d::Int: The number of dimensions to sample.add_noise::Bool=false: Whether to add noise to the samples or have them be in the center of the bins.rng::AbstractRNG=Random.GLOBAL_RNG: The random number generator to use.orthogonalize::Bool=true: Whether to orthogonalize the samples, if possible. See https://en.wikipedia.org/wiki/Latinhypercubesampling#:~:text=In%20orthogonal%20sampling
Returns
cdfs::Matrix{Float64}: The CDFs for the samples. Each row is a sample and each column is a dimension (corresponding to a feature).
Examples
cdfs = PhysiCellModelManager.generateLHSCDFs(4, 2)
size(cdfs)
# output
(4, 2)PhysiCellModelManager.generateRBDCDFs — Method
generateRBDCDFs(rbd_variation::RBDVariation, d::Int)Generate CDFs for a Random Balance Design (RBD) in d dimensions.
Arguments
rbd_variation::RBDVariation: The RBD variation method to use.d::Int: The number of dimensions to sample.
Returns
cdfs::Matrix{Float64}: The CDFs for the samples. Each row is a sample and each column is a dimension (corresponding to a parameter / parameter group from aCoVariation).rbd_sorting_inds::Matrix{Int}: An_samplesxdmatrix that gives the ordering of the dimensions to use for the RBD. The order along each column is necessary for computing the RBD, sorting the simulations along the periodic curve.
PhysiCellModelManager.generateSobolCDFs — Method
generateSobolCDFs(n::Int, d::Int[; n_matrices::Int=1, randomization::RandomizationMethod=NoRand(), skip_start::Union{Missing, Bool, Int}=missing, include_one::Union{Missing, Bool}=missing)Generate n_matrices Sobol sequences of the Cumulative Distribution Functions (CDFs) for n samples in d dimensions.
The subsequence of the Sobol sequence is chosen based on the value of n and the value of include_one. If it is one less than a power of 2, e.g. n=7, skip 0 and start from 0.5. Otherwise, it will always start from 0. If it is one more than a power of 2, e.g. n=9, include 1 (unless include_one is false).
The skip_start field can be used to control this by skipping the start of the sequence. If skip_start is true, skip to the smallest consecutive subsequence with the same denominator that has at least n elements. If skip_start is false, start from 0. If skip_start is an integer, skip that many elements in the sequence, .e.g., skip_start=1 skips 0 and starts at 0.5.
If you want to include 1 in the sequence, set include_one to true. If you want to exlude 1 (in the case of n=9, e.g.), set include_one to false.
Arguments
n::Int: The number of samples to take.d::Int: The number of dimensions to sample.n_matrices::Int=1: The number of matrices to use in the Sobol sequence (effectively, the dimension of the sample isdxn_matrices).randomization::RandomizationMethod=NoRand(): The randomization method to use on the deterministic Sobol sequence. See GlobalSensitivity.jl.skip_start::Union{Missing, Bool, Int}=missing: Whether to skip the start of the sequence. Missing means PhysiCellModelManager.jl will choose the best option.include_one::Union{Missing, Bool}=missing: Whether to include 1 in the sequence. Missing means PhysiCellModelManager.jl will choose the best option.
Returns
cdfs::Array{Float64, 3}: The CDFs for the samples. The first dimension is the features, the second dimension is the matrix, and the third dimension is the sample points.
Examples
cdfs = PhysiCellModelManager.generateSobolCDFs(11, 3)
size(cdfs)
# output
(3, 1, 11)cdfs = PhysiCellModelManager.generateSobolCDFs(7, 5; n_matrices=2)
size(cdfs)
# output
(5, 2, 7)PhysiCellModelManager.orthogonalLHS — Method
orthogonalLHS(k::Int, d::Int)Generate an orthogonal Latin Hypercube Sample in d dimensions with k subdivisions in each dimension, requiring n=k^d samples.
PhysiCellModelManager.setUpColumns — Method
setUpColumns(location::Symbol, folder_id::Int, loc_types::Vector{DataType}, loc_targets::Vector{XMLPath}, reference_variation_id::Int)Set up the columns for the variations database for the given location and folder_id.
PhysiCellModelManager.sqliteDataType — Method
sqliteDataType(ev::ElementaryVariation)
sqliteDataType(data_type::DataType)Get the SQLite data type to hold the Julia data type.
These are the mappings in the order of the if-else statements:
Bool->TEXTInteger->INTReal->REAL- otherwise ->
TEXT
PhysiCellModelManager.variationDataType — Method
variationDataType(ev::ElementaryVariation)Get the data type of the variation.
PhysiCellModelManager.variationLocation — Method
variationLocation(av::AbstractVariation)Get the location of a variation as a Symbol, e.g., :config, :rulesets_collection, etc. Can also pass in an XMLPath object.
PhysiCellModelManager.variationTarget — Method
variationTarget(av::AbstractVariation)Get the type XMLPath target(s) of a variation
PhysiCellModelManager.variationValues — Method
variationValues(ev::ElementaryVariation[, cdf])Get the values of an ElementaryVariation.
If ev is a DiscreteVariation, all values are returned unless cdf is provided. In that case, the CDF(s) is linearly converted into an index into the values vector and the corresponding value is returned.
If ev is a DistributedVariation, the cdf is required and the iCDF is returned. The cdf can be a single value or a vector of values.
Arguments
ev::ElementaryVariation: The variation to get the values of.cdf: The cumulative distribution function (CDF) values to use for the variation.
PhysiCellModelManager.variationValues — Method
variationValues(f::Function, ev::ElementaryVariation[, cdf])Apply a function f to each of the variation values of an ElementaryVariation. See variationValues for details on how the variation values are obtained.
PhysiCellModelManager.variationValues — Method
variationValues(lv::LatentVariation)Compute the variation values for all combinations of latent parameters in the LatentVariation. Only works for LatentVariations with discrete latent parameters.
Returns
Array{Float64}: A matrix where each row corresponds to a unique combination of latent parameters and each column corresponds to a target parameter.