Import

Import a project from the standard PhysiCell format into the PhysiCellModelManager.jl format.

Public API

PhysiCellModelManager.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 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.

source

Private API

PhysiCellModelManager.ImportDestFolderType
ImportDestFolder

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

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

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

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.
source
PhysiCellModelManager.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 PhysiCellModelManager.jl structure.

source
PhysiCellModelManager.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