Import

Import a project from the standard PhysiCell format into the pcvct format.

Public API

pcvct.importProjectFunction
importProject(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.

source

Private API

pcvct.ImportDestFolderType
ImportDestFolder

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.
source
pcvct.ImportDestFoldersType
ImportDestFolders

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.
source
pcvct.ImportSourceType
ImportSource

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.
source
pcvct.ImportSourcesType
ImportSources

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.
source
pcvct.adaptConfigMethod
adaptConfig(config::ImportDestFolder)

Adapt the config file to be used in the pcvct structure.

source
pcvct.adaptCustomCPPMethod
adaptCustomCPP(path_from_inputs::AbstractString)

Adapt the custom cpp file to be used in the pcvct structure.

source
pcvct.adaptCustomCodeMethod
adaptCustomCode(custom_code::ImportDestFolder)

Adapt the custom code to be used in the pcvct structure.

source
pcvct.adaptCustomHeaderMethod
adaptCustomHeader(path_from_inputs::AbstractString)

Adapt the custom header to be used in the pcvct structure.

source
pcvct.adaptCustomModulesMethod
adaptCustomModules(path_from_inputs::AbstractString)

Adapt the custom modules to be used in the pcvct structure.

source
pcvct.adaptMainMethod
adaptMain(path_from_inputs::AbstractString)

Adapt the main.cpp file to be used in the pcvct structure.

source
pcvct.adaptMakefileMethod
adaptMakefile(path_from_inputs::AbstractString)

Adapt the Makefile to be used in the pcvct structure.

source
pcvct.adaptProjectMethod
adaptProject(import_dest_folders::ImportDestFolders)

Adapt the project to be used in the pcvct structure.

source
pcvct.copyFilesToFoldersMethod
copyFilesToFolders(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.

source
pcvct.createComponentDestFilenameMethod
createComponentDestFilename(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.

source
pcvct.createInputFolder!Method
createInputFolder!(import_dest_folder::ImportDestFolder)

Create an input folder based on the provided destination folder.

source
pcvct.createInputFolders!Method
createInputFolders!(import_dest_folders::ImportDestFolders, project_sources::ImportSources)

Create input folders based on the provided project sources and destination folders.

source
pcvct.resolveProjectSource!Method
resolveProjectSource!(project_source::ImportSource, path_to_project::AbstractString)

Resolve the project source by checking if it exists in the project directory.

source
pcvct.resolveProjectSources!Method
resolveProjectSources!(project_sources::ImportSources, path_to_project::AbstractString)

Resolve the project sources by checking if they exist in the project directory.

source