Skip to main content

Project to perform uncertainty quantification of PhysiCell models

Project description

Installation

Install the package using pip:

pip install uq_physicell

Examples

Here are some examples to help you get started with the package:

Example 1: Basic Usage

Example 2: Running PhysiCell Simulations

  • Requirements: A PhysiCell folder is required.

  • Description: Run three PhysiCell simulations associated with the key physicell_model_2 in the config file SampleModel.ini. This corresponds to the virus_macrophage example in PhysiCell's sample projects. See example 2.

    • First simulation: Demonstrates running a simulation with a predefined summary function that summarizes the final population of live and dead cells, storing results in a new folder output2.
    • Second simulation: Runs the simulation while preserving the config files and retaining the complete PhysiCell output without summarization.
    • Third simulation: Configures the execution to summarize the output and returns a DataFrame with the summary.

    Run script:

    python examples/ex2_runModel.py
    

    Alternatively, download the lastest PhysiCell version with:

    bash examples/PhysiCell.sh
    

    This will create a folder named PhysiCell-master inside examples. Populate and compile the project (Step 1 below) without modifying SampleModel.ini.

    • Step 1: Compile the virus-macrophage example in the PhysiCell folder:
      make reset && make virus-macrophage-sample && make
      
    • Step 2: Update the executable and configFile_ref paths in the physicell_model_2 model in the examples/SampleModel.ini section of SampleModel.ini.
      executable = [new path]
      configFile_ref = [new path]
      
    • Step 3: Execute the script:
      python examples/ex2_runModel.py
      

Example 3: Customizable Summary Function

  • Requirements: A PhysiCell folder is required.
  • Description: Run two simulations of physicell_model_2 using a customizable summary function to generate population time series. See example 3.
    • First simulation: Runs the simulation while preserving the config files definitions and using a custom summary function.
    • Second simulation: Similar to the first, but adjust the model for 4 OpenMP threads and returns a DataFrame instead of a summary file.
  • Run script:
    python examples/ex3_runModelCust.py
    

Example 4: Sensitivity Analysis (Single Task)

  • Requirements: A PhysiCell folder and the SALib Python package.
  • Description: Perform sensitivity analysis using the Sobol method. See example 4.
  • Run script:
    python examples/ex4_runSA_singleTask.py
    

Example 5: Sensitivity Analysis (Parallel Tasks with MPI)

  • Requirements: A PhysiCell folder, and the SALib and mpi4py Python packages.
  • Description: Perform sensitivity analysis using the Sobol method with MPI. See example 5.
  • Run script:
    mpiexec -n 2 python -m mpi4py examples/ex5_runSA_MPI.py
    

Example 6: Sensitivity Analysis with Constrained Parameters (MPI).

  • Requirements: A PhysiCell folder (SampleModel.ini assumes it is located in the examples folder) and the SALib and mpi4py Python packages. Compile the asymmetric_division example:
    make reset && make asymmetric-division-sample && make
    
  • Description: Perform sensitivity analysis (Sobol method) with MPI, handling constrained parameters. This example uses the asymmetric_division model from PhysiCell's sample_projects and includes analyzing parameters of rules. See example 6.
  • Run script:
    mpiexec -n 2 python -m mpi4py examples/ex6_runSA_AsymDiv.py
    

Feel free to explore these examples to understand the package's capabilities and how to use it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uq_physicell-1.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uq_physicell-1.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file uq_physicell-1.1.1.tar.gz.

File metadata

  • Download URL: uq_physicell-1.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for uq_physicell-1.1.1.tar.gz
Algorithm Hash digest
SHA256 49ea07ae743026bb03b6ba7dab7d6ed167628781574b1afcbc78722ffd386761
MD5 cf6c0a4a50c164da92b02601133bff86
BLAKE2b-256 3dd15c59d680358f6c2f4598881beee127e83bcd886402ecba6eeecd2be80118

See more details on using hashes here.

File details

Details for the file uq_physicell-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: uq_physicell-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for uq_physicell-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d1cb7207679fbade05088ec9401e097e22c8c5d0c063f36d46d06d7f04c6fba
MD5 d43e7592c5ccb73f215c7ce421c74a0f
BLAKE2b-256 618f41439e3e28ef71f344a947bb23f74ce282cc4a578dfec9b8b9a6fed4f21a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page