Import
Import a project from the standard PhysiCell format into the pcvct format.
Public API
pcvct.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 pcvct 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 pcvct 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
pcvct.ImportDestFolder
— TypeImportDestFolder
A struct to hold the information about a destination folder to be created in the pcvct structure.
Used internally in the importProject
function to manage the creation of folders in the pcvct 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.
pcvct.ImportDestFolders
— TypeImportDestFolders
A struct to hold the information about the destination folders to be created in the pcvct structure.
Used internally in the importProject
function to manage the creation of folders in the pcvct 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.
pcvct.ImportSource
— TypeImportSource
A struct to hold the information about a source file or folder to be imported into the pcvct structure.
Used internally in the importProject
function to manage the import of files and folders from a user project into the pcvct 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.pcvct_name::AbstractString
: The name of the file or folder in the pcvct 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.
pcvct.ImportSources
— TypeImportSources
A struct to hold the information about the sources to be imported into the pcvct structure.
Used internally in the importProject
function to manage the import of files and folders from a user project into the pcvct 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.
pcvct.adaptConfig
— MethodadaptConfig(config::ImportDestFolder)
Adapt the config file to be used in the pcvct structure.
pcvct.adaptCustomCPP
— MethodadaptCustomCPP(path_from_inputs::AbstractString)
Adapt the custom cpp file to be used in the pcvct structure.
pcvct.adaptCustomCode
— MethodadaptCustomCode(custom_code::ImportDestFolder)
Adapt the custom code to be used in the pcvct structure.
pcvct.adaptCustomHeader
— MethodadaptCustomHeader(path_from_inputs::AbstractString)
Adapt the custom header to be used in the pcvct structure.
pcvct.adaptCustomModules
— MethodadaptCustomModules(path_from_inputs::AbstractString)
Adapt the custom modules to be used in the pcvct structure.
pcvct.adaptMain
— MethodadaptMain(path_from_inputs::AbstractString)
Adapt the main.cpp file to be used in the pcvct structure.
pcvct.adaptMakefile
— MethodadaptMakefile(path_from_inputs::AbstractString)
Adapt the Makefile to be used in the pcvct structure.
pcvct.adaptProject
— MethodadaptProject(import_dest_folders::ImportDestFolders)
Adapt the project to be used in the pcvct structure.
pcvct.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 pcvct structure.
pcvct.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.
pcvct.createInputFolder!
— MethodcreateInputFolder!(import_dest_folder::ImportDestFolder)
Create an input folder based on the provided destination folder.
pcvct.createInputFolders!
— MethodcreateInputFolders!(import_dest_folders::ImportDestFolders, project_sources::ImportSources)
Create input folders based on the provided project sources and destination folders.
pcvct.prepareIntracellularImport
— MethodprepareIntracellularImport(src::Dict, config::ImportSource, path_to_project::AbstractString)
Prepare the intracellular import source.
pcvct.prepareRulesetsCollectionImport
— MethodprepareRulesetsCollectionImport(src::Dict, path_to_project::AbstractString)
Prepare the rulesets collection import source.
pcvct.resolveProjectSource!
— MethodresolveProjectSource!(project_source::ImportSource, path_to_project::AbstractString)
Resolve the project source by checking if it exists in the project directory.
pcvct.resolveProjectSources!
— MethodresolveProjectSources!(project_sources::ImportSources, path_to_project::AbstractString)
Resolve the project sources by checking if they exist in the project directory.
pcvct.writeDescriptionToMetadata
— MethodwriteDescriptionToMetadata(path_to_metadata::AbstractString, description::AbstractString)
Write the description to the metadata file.