Components
Allows for combining PhysiCell input components into whole inputs.
Currently, only supports this for intracellular ODE (libRoadRunner) models.
Public API
pcvct.PhysiCellComponent
— TypePhysiCellComponent
A struct to hold the information about a component that is used to assemble an input of PhysiCell.
The type
and name
are the only fields that are compared for equality. The type
represents the type of component that it is. Currently, only "roadrunner" is supported. The name
is the name of the file inside the components/type/
directory. The id
is the id of the component, which will be -1 to indicate it is not yet set. The id
is used to link which cell definition(s) use which component(s).
Fields
type::String
: The type of the component (e.g., "roadrunner", "dfba", "maboss").name::String
: The name of the component (e.g., "component.xml").id::Int
: The id of the component (e.g., 1, 2, 3). This is used to link which cell definition(s) use which component(s). A value of -1 indicates that the id is not yet set.
Examples
julia> PhysiCellComponent("roadrunner", "test.xml")
PhysiCellComponent("roadrunner", "test.xml", -1)
```jldoctest component = PhysiCellComponent("roadrunner", "test.xml") PhysiCellComponent(component, 78) # set the id to 78; users should not need to do this
output
PhysiCellComponent("roadrunner", "test.xml", 78)
pcvct.assembleIntracellular!
— MethodassembleIntracellular!(cell_to_components_dict::Dict{String,Vector{PhysiCellComponent}}; name::String="assembled", skip_db_insert::Bool=false)
Assembles the intracellular components for the given cell types into a single file.
First, check if the components have been previously assembled. If so, return that folder name. If not, create a new folder and save the components there as a single file along with the assembly manifest; finally, update the database with the new folder.
Arguments
cell_to_components_dict::Dict{String,Vector{PhysiCellComponent}}
: A dictionary mapping cell types to their components.- The keys are the cell type names (e.g., "Tcell", "Bcell").
- The values can be either a single
PhysiCellComponent
or a vector ofPhysiCellComponent
s.
name::String
: The name of the folder to create (default is "assembled").skip_db_insert::Bool
: If true, skip the database insert (default is false). Skipped when importing a project. Users should not need to set this.
Returns
folder::String
: The name of the folder where the components were assembled.
Private API
pcvct.findComponentID
— MethodfindComponentID(assembly_manifest::Dict, component::PhysiCellComponent)
Find the ID of the given component in the assembly manifest.
pcvct.intracellularAssemblyManifestsEquivalent
— MethodintracellularAssemblyManifestsEquivalent(A::Dict, B::Dict)
Compare two intracellular assembly manifests to see if they are equivalent.
Two manifests may assign different IDs to the same components. This function compares the component files to see if the manifests are equivalent.
pcvct.intracellularFolder
— MethodintracellularFolder(assembly_manifest::Dict)
Get the folder that contains the intracellular assembly manifest that is equivalent to the given assembly manifest, if one exists.
If no such folder exists, return nothing.
pcvct.updateIntracellularComponentIDs!
— MethodupdateIntracellularComponentIDs!(cell_to_components_dict::Dict{String,Vector{PhysiCellComponent}}, path_to_folder::String)
Update the IDs of the components in the given dictionary to match those in the assembly manifest in the given folder.