Import
Import a project from the standard PhysiCell format into the PhysiCellModelManager.jl format.
Public API
PhysiCellModelManager.importProject
— FunctionimportProject(path_to_project::AbstractString[, src=Dict(), dest=Dict()])
Import a project from the structured in the format of PhysiCell sample projects and user projects into the PhysiCellModelManager.jl structure.
Arguments
path_to_project::AbstractString
: Path to the project to import. Relative paths are resolved from the current working directory where Julia was launched.src::Dict
: Dictionary of the project sources to import. If absent, tries to use the default names.
The following keys are recognized: config
, main
, makefile
, custom_modules
, rulesets_collection
, intracellular
, ic_cell
, ic_substrate
, ic_ecm
, and ic_dc
.
dest::Dict
: Dictionary of the inputs folders to create in the PhysiCellModelManager.jl structure. If absent, taken from the project name.
The following keys are recognized: config
, custom_code
, rules
, intracellular
, ic_cell
, ic_substrate
, ic_ecm
, and ic_dc
.
Private API
PhysiCellModelManager.ImportDestFolder
— TypeImportDestFolder
A struct to hold the information about a destination folder to be created in the PhysiCellModelManager.jl structure.
Used internally in the importProject
function to manage the creation of folders in the PhysiCellModelManager.jl structure.
Fields
path_from_inputs::AbstractString
: The path to the destination folder relative to the inputs folder.created::Bool
: Indicates if the folder was created during the import process.description::AbstractString
: A description of the folder.
PhysiCellModelManager.ImportDestFolders
— TypeImportDestFolders
A struct to hold the information about the destination folders to be created in the PhysiCellModelManager.jl structure.
Used internally in the importProject
function to manage the creation of folders in the PhysiCellModelManager.jl structure.
Fields
config::ImportDestFolder
: The config folder to be created.custom_code::ImportDestFolder
: The custom code folder to be created.rules::ImportDestFolder
: The rules folder to be created.intracellular::ImportDestFolder
: The intracellular folder to be created.ic_cell::ImportDestFolder
: The intracellular cell folder to be created.ic_substrate::ImportDestFolder
: The intracellular substrate folder to be created.ic_ecm::ImportDestFolder
: The intracellular ECM folder to be created.ic_dc::ImportDestFolder
: The intracellular DC folder to be created.
PhysiCellModelManager.ImportSource
— TypeImportSource
A struct to hold the information about a source file or folder to be imported into the PhysiCellModelManager.jl structure.
Used internally in the importProject
function to manage the import of files and folders from a user project into the PhysiCellModelManager.jl structure.
Fields
src_key::Symbol
: The key in the source dictionary.input_folder_key::Symbol
: The key in the destination dictionary.path_from_project::AbstractString
: The path to the source file or folder relative to the project.pcmm_name::AbstractString
: The name of the file or folder in the PhysiCellModelManager.jl structure.type::AbstractString
: The type of the source (e.g., file or folder).required::Bool
: Indicates if the source is required for the project.found::Bool
: Indicates if the source was found during import.
PhysiCellModelManager.ImportSources
— TypeImportSources
A struct to hold the information about the sources to be imported into the PhysiCellModelManager.jl structure.
Used internally in the importProject
function to manage the import of files and folders from a user project into the PhysiCellModelManager.jl structure.
Fields
config::ImportSource
: The config file to be imported.main::ImportSource
: The main.cpp file to be imported.makefile::ImportSource
: The Makefile to be imported.custom_modules::ImportSource
: The custom modules folder to be imported.rulesets_collection::ImportSource
: The rulesets collection to be imported.intracellular::ImportSource
: The intracellular components to be imported.ic_cell::ImportSource
: The cell definitions to be imported.ic_substrate::ImportSource
: The substrate definitions to be imported.ic_ecm::ImportSource
: The extracellular matrix definitions to be imported.ic_dc::ImportSource
: The DC definitions to be imported.
PhysiCellModelManager.adaptConfig
— MethodadaptConfig(config::ImportDestFolder)
Adapt the config file to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptCustomCPP
— MethodadaptCustomCPP(path_from_inputs::AbstractString)
Adapt the custom cpp file to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptCustomCode
— MethodadaptCustomCode(custom_code::ImportDestFolder)
Adapt the custom code to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptCustomHeader
— MethodadaptCustomHeader(path_from_inputs::AbstractString)
Adapt the custom header to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptCustomModules
— MethodadaptCustomModules(path_from_inputs::AbstractString)
Adapt the custom modules to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptMain
— MethodadaptMain(path_from_inputs::AbstractString)
Adapt the main.cpp file to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptMakefile
— MethodadaptMakefile(path_from_inputs::AbstractString)
Adapt the Makefile to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.adaptProject
— MethodadaptProject(import_dest_folders::ImportDestFolders)
Adapt the project to be used in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.copyFilesToFolders
— MethodcopyFilesToFolders(path_to_project::AbstractString, project_sources::ImportSources, import_dest_folders::ImportDestFolders)
Copy files from the project directory to the destination folders in the PhysiCellModelManager.jl structure.
PhysiCellModelManager.createComponentDestFilename
— MethodcreateComponentDestFilename(src_lines::Vector{String}, component::PhysiCellComponent)
Create a file name for the component file to be copied to. If a file exists with the same name and content, it will not be copied again. If a file exists with the same name but different content, a new file name will be created by appending a number to the base name.
PhysiCellModelManager.createInputFolder!
— MethodcreateInputFolder!(import_dest_folder::ImportDestFolder)
Create an input folder based on the provided destination folder.
PhysiCellModelManager.createInputFolders!
— MethodcreateInputFolders!(import_dest_folders::ImportDestFolders, project_sources::ImportSources)
Create input folders based on the provided project sources and destination folders.
PhysiCellModelManager.prepareIntracellularImport
— MethodprepareIntracellularImport(src::Dict, config::ImportSource, path_to_project::AbstractString)
Prepare the intracellular import source.
PhysiCellModelManager.prepareRulesetsCollectionImport
— MethodprepareRulesetsCollectionImport(src::Dict, path_to_project::AbstractString)
Prepare the rulesets collection import source.
PhysiCellModelManager.resolveProjectSource!
— MethodresolveProjectSource!(project_source::ImportSource, path_to_project::AbstractString)
Resolve the project source by checking if it exists in the project directory.
PhysiCellModelManager.resolveProjectSources!
— MethodresolveProjectSources!(project_sources::ImportSources, path_to_project::AbstractString)
Resolve the project sources by checking if they exist in the project directory.
PhysiCellModelManager.writeDescriptionToMetadata
— MethodwriteDescriptionToMetadata(path_to_metadata::AbstractString, description::AbstractString)
Write the description to the metadata file.