CoolFace
Apppublic

zacsims/PhysiCell-Rule-Builder

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

PhysiCell Rule Builder

A Streamlit application that helps generate rules for PhysiCell agent-based models by analyzing scientific literature related to cancer biology. The app provides a user-friendly interface to query relationships between cell types, signals, and behaviors in the context of triple negative breast cancer.

Features

  • —Select from predefined cell types, signals, and behaviors
  • —Generate rules based on scientific literature
  • —View detailed justifications with citations
  • —Browse all available rule combinations
  • —Cache results for faster retrieval

Usage

  1. 1.Select a cell type from the dropdown
  2. 2.Choose a signal associated with the selected cell type
  3. 3.Select a behavior that might be affected by the signal
  4. 4.Click "Generate Rule" to analyze the literature and create a PhysiCell rule
  5. 5.View the generated rule and its justification

Requirements

  • —Python 3.11+
  • —Streamlit
  • —PaperQA 5.0+
  • —Access to papers organized by cell type

Local Development

To run the application locally:

  1. 1.Clone this repository
  2. 2.Install dependencies: pip install -r requirements.txt
  3. 3.Run the Streamlit app: streamlit run app.py

Paper Organization

The app expects papers to be organized in a directory structure like:

ohsu-immune-papers/
  ├── epithelial-tumor/
  |   ├── paper1.pdf
  |   ├── paper2.pdf
  ├── tumor/
  |   ├── paper1.pdf
  |   └── paper2.pdf
  ├── CD4+-Th2-T/
  |   └── ...
  └── ...

How It Works

The app uses PaperQA to process scientific papers, extract relevant information, and generate rules in the form:

"In [cell type], [signal] increases/decreases [behavior]."

These rules can then be used to configure PhysiCell agent-based models of cancer microenvironments.

Credits

Based on the PhysiCell framework (http://physicell.org/)