Core
Core functionality for PhysiCellModelManager.jl.
ModelManager.initializeModelManager — Method
initializeModelManager()
initializeModelManager(path_to_project_dir::AbstractString)
initializeModelManager(path_to_physicell::AbstractString, path_to_data::AbstractString)Initialize the PhysiCellModelManager.jl project model manager, identifying the data folder, PhysiCell folder, and loading the central database.
If no arguments are provided, it assumes that the PhysiCell and data directories are inside the current working directory.
Arguments
path_to_project_dir::AbstractString: Path to the project directory. Must contain thePhysiCellanddatasubdirectories.path_to_physicell::AbstractString: Path to the PhysiCell directory.path_to_data::AbstractString: Path to the data directory.
PhysiCellModelManager.PCMMException — Type
PCMMExceptionAbstract supertype of every exception PhysiCellModelManager.jl raises on its own behalf.
Catch this to handle any PCMM-specific failure, or a concrete subtype to handle one condition. Errors raised by Julia itself or by a dependency are not part of this hierarchy.
Examples
try
runStudio(1)
catch e
e isa PCMMException || rethrow() # a PCMM refusal, not a bug
@info "PCMM could not do that" reason=sprint(showerror, e)
endPhysiCellModelManager.PCMMMissingProject — Type
PCMMMissingProject(msg::String)A PhysiCellModelManager.jl project could not be found.
Raised by initializeModelManager when neither the given nor the inferred paths hold a PhysiCell directory and a data directory. Auto-initialization on using PhysiCellModelManager catches this one and prints guidance instead of failing.
Fields
msg::String: which paths were searched.
Examples
try
initializeModelManager("not-a-project")
catch e
e isa PCMMMissingProject && @info "no project there"
endPhysiCellModelManager.PCMMStudioLaunchError — Type
PCMMStudioLaunchError(cmd::Cmd, cause::Exception)PhysiCell Studio could not be launched, or exited with an error.
Carries the command that was run and the underlying exception, which differs by failure mode: Base.IOError when the Python executable itself could not be spawned (a wrong PCMM_PYTHON_PATH), and ProcessFailedException when Studio ran and exited non-zero (a wrong PCMM_STUDIO_PATH, or a Studio-side error). Inspect cause to tell those apart.
Fields
cmd::Cmd: the command PCMM ran.cause::Exception: the exception raised byrun.
Examples
try
runStudio(1)
catch e
e isa PCMMStudioLaunchError || rethrow()
e.cause isa Base.IOError ? @warn("check PCMM_PYTHON_PATH") : @warn("Studio itself failed")
end