uq-physicell


Nameuq-physicell JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryProject to perform uncertainty quantification of PhysiCell models
upload_time2025-01-09 21:39:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords physicell uncertainty quantification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Installation
Install the package using pip:
```
pip install uq_physicell
```
## External Modules
These modules must be installed separately. Install them using `pip`:
```bash
pip install pandas numpy pcdl
```
[pcdl](https://github.com/elmbeech/physicelldataloader) is a Python package designed to load [PhysiCell](https://physicell.org) simulations in a Pythonic way.

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

## Example 1: Basic Usage
  - Description: Print information about two model structures, [physicell_model_1](examples/SampleModel.ini#l1) and [physicell_model_2](examples/SampleModel.ini#l18), as defined in the config file [examples/SampleModel.ini](examples/SampleModel.ini#l20). This operation does not run a PhysiCell simulation. See [example 1](examples/ex1_print.py).
    ```bash
    python examples/ex1_print.py
    ```

## Example 2: Running PhysiCell Simulations
  - Requirements: A PhysiCell folder is required.
  - Description: Run three PhysiCell simulations associated with the key [physicell_model_2](examples/SampleModel.ini#l18) in the config file [SampleModel.ini](examples/SampleModel.ini). This corresponds to the `virus_macrophage` example in `PhysiCell's sample projects`. See [example 2](examples/ex2_runModel.py). 
    - **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:
    ```bash
    python examples/ex2_runModel.py
    ```
    
    Alternatively, download the lastest PhysiCell version with:
    ```bash
    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](examples/SampleModel.ini).
    - Step 1: Compile the `virus-macrophage` example in the PhysiCell folder:
      ```bash
      make reset && make virus-macrophage-sample && make
      ```
    - Step 2: Update the `executable` and `configFile_ref` paths in the [physicell_model_2](examples/SampleModel.ini#l20) model in the [examples/SampleModel.ini](examples/SampleModel.ini) section of [SampleModel.ini](examples/SampleModel.ini).
      ```ini
      executable = [new path]
      configFile_ref = [new path]
      ```
    - Step 3: Execute the script:
      ```bash
      python examples/ex2_runModel.py
      ```  

## Example 3: Customizable Summary Function
  - Requirements: A PhysiCell folder is required.
  - Description: Run two simulations of [physicell_model_2](examples/SampleModel.ini#l18) using a customizable summary function to generate population time series. See [example 3](examples/ex3_runModelCust.py).
    - **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:
    ```bash
    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](examples/ex4_runSA_singletask.py).
  - Run script:
    ```bash
    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](examples/ex5_runSA_MPI.py).
  - Run script:
    ```bash
    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:
    ```bash
    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](examples/ex6_runSA_AsymDiv.py).
  - Run script:
    ```bash
    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.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "uq-physicell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "PhysiCell, uncertainty quantification",
    "author": null,
    "author_email": "\"Heber L. Rocha\" <heberonly@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/df/00/e50f2ecea091e79da603e869cd3ef19d7bae9de1409c0b59c01b66765f3e/uq_physicell-1.1.0.tar.gz",
    "platform": null,
    "description": "# Installation\nInstall the package using pip:\n```\npip install uq_physicell\n```\n## External Modules\nThese modules must be installed separately. Install them using `pip`:\n```bash\npip install pandas numpy pcdl\n```\n[pcdl](https://github.com/elmbeech/physicelldataloader) is a Python package designed to load [PhysiCell](https://physicell.org) simulations in a Pythonic way.\n\n# Examples\nHere are some examples to help you get started with the package:\n\n## Example 1: Basic Usage\n  - Description: Print information about two model structures, [physicell_model_1](examples/SampleModel.ini#l1) and [physicell_model_2](examples/SampleModel.ini#l18), as defined in the config file [examples/SampleModel.ini](examples/SampleModel.ini#l20). This operation does not run a PhysiCell simulation. See [example 1](examples/ex1_print.py).\n    ```bash\n    python examples/ex1_print.py\n    ```\n\n## Example 2: Running PhysiCell Simulations\n  - Requirements: A PhysiCell folder is required.\n  - Description: Run three PhysiCell simulations associated with the key [physicell_model_2](examples/SampleModel.ini#l18) in the config file [SampleModel.ini](examples/SampleModel.ini). This corresponds to the `virus_macrophage` example in `PhysiCell's sample projects`. See [example 2](examples/ex2_runModel.py). \n    - **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`.\n    - **Second simulation:** Runs the simulation while preserving the config files and retaining the complete PhysiCell output without summarization.\n    - **Third simulation:** Configures the execution to summarize the output and returns a DataFrame with the summary.\n    \n    Run script:\n    ```bash\n    python examples/ex2_runModel.py\n    ```\n    \n    Alternatively, download the lastest PhysiCell version with:\n    ```bash\n    bash examples/PhysiCell.sh\n    ```\n    This will create a folder named `PhysiCell-master` inside `examples`. Populate and compile the project (Step 1 below) without modifying [SampleModel.ini](examples/SampleModel.ini).\n    - Step 1: Compile the `virus-macrophage` example in the PhysiCell folder:\n      ```bash\n      make reset && make virus-macrophage-sample && make\n      ```\n    - Step 2: Update the `executable` and `configFile_ref` paths in the [physicell_model_2](examples/SampleModel.ini#l20) model in the [examples/SampleModel.ini](examples/SampleModel.ini) section of [SampleModel.ini](examples/SampleModel.ini).\n      ```ini\n      executable = [new path]\n      configFile_ref = [new path]\n      ```\n    - Step 3: Execute the script:\n      ```bash\n      python examples/ex2_runModel.py\n      ```  \n\n## Example 3: Customizable Summary Function\n  - Requirements: A PhysiCell folder is required.\n  - Description: Run two simulations of [physicell_model_2](examples/SampleModel.ini#l18) using a customizable summary function to generate population time series. See [example 3](examples/ex3_runModelCust.py).\n    - **First simulation:** Runs the simulation while preserving the config files definitions and using a custom summary function.\n    - **Second simulation:** Similar to the first, but adjust the model for 4 OpenMP threads and returns a DataFrame instead of a summary file.\n  - Run script:\n    ```bash\n    python examples/ex3_runModelCust.py\n    ```\n\n## Example 4: Sensitivity Analysis (Single Task)\n  - Requirements: A PhysiCell folder and the ``SALib`` Python package.\n  - Description: Perform sensitivity analysis using the Sobol method. See [example 4](examples/ex4_runSA_singletask.py).\n  - Run script:\n    ```bash\n    python examples/ex4_runSA_singleTask.py\n    ```\n\n## Example 5: Sensitivity Analysis (Parallel Tasks with MPI)\n  - Requirements: A PhysiCell folder, and the `SALib` and `mpi4py` Python packages.\n  - Description: Perform sensitivity analysis using the Sobol method with MPI. See [example 5](examples/ex5_runSA_MPI.py).\n  - Run script:\n    ```bash\n    mpiexec -n 2 python -m mpi4py examples/ex5_runSA_MPI.py\n    ```\n\n## Example 6: Sensitivity Analysis with Constrained Parameters (MPI).\n  - 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:\n    ```bash\n    make reset && make asymmetric-division-sample && make\n    ```\n  - 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](examples/ex6_runSA_AsymDiv.py).\n  - Run script:\n    ```bash\n    mpiexec -n 2 python -m mpi4py examples/ex6_runSA_AsymDiv.py\n    ```\n\nFeel free to explore these examples to understand the package's capabilities and how to use it.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Project to perform uncertainty quantification of PhysiCell models",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/heberlr/UQ_PhysiCell"
    },
    "split_keywords": [
        "physicell",
        " uncertainty quantification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "81c03c3796553469f2eef8957a2978f3ab6f2cc1756e4fd9fb2be458b2e0bca0",
                "md5": "bab7f6568aeb242f213984117625ddba",
                "sha256": "2251dff2da891e9edf58469e1b9a857ce0525f2dabc057b34b2900e25b2d56bb"
            },
            "downloads": -1,
            "filename": "uq_physicell-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bab7f6568aeb242f213984117625ddba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9275,
            "upload_time": "2025-01-09T21:39:16",
            "upload_time_iso_8601": "2025-01-09T21:39:16.221218Z",
            "url": "https://files.pythonhosted.org/packages/81/c0/3c3796553469f2eef8957a2978f3ab6f2cc1756e4fd9fb2be458b2e0bca0/uq_physicell-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df00e50f2ecea091e79da603e869cd3ef19d7bae9de1409c0b59c01b66765f3e",
                "md5": "fe2f70888def12bbf6a2225357d4218f",
                "sha256": "4bf73424861245ae583ae6e00cef90506844a7dfe21b72d6f30fa1dec6136538"
            },
            "downloads": -1,
            "filename": "uq_physicell-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fe2f70888def12bbf6a2225357d4218f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12466,
            "upload_time": "2025-01-09T21:39:17",
            "upload_time_iso_8601": "2025-01-09T21:39:17.205646Z",
            "url": "https://files.pythonhosted.org/packages/df/00/e50f2ecea091e79da603e869cd3ef19d7bae9de1409c0b59c01b66765f3e/uq_physicell-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-09 21:39:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "heberlr",
    "github_project": "UQ_PhysiCell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "uq-physicell"
}
        
Elapsed time: 0.51221s