Skip to content

A visual tool for defining cellular populations through boolean spatial functions and generating MorpheusML-compatible xml output

License

Notifications You must be signed in to change notification settings

Domino2357/CellMapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CellMapper

A visual tool for defining cellular populations through boolean spatial functions and generating MorpheusML-compatible XML output.

What is it for?

CellMapper solves the problem of initializing equally-sized cells within geometrically defined regions and outputting them as a CellPopulation for Morpheus models.

How to use it

Use the GUI to define up to 3 different spatial equations that can be combined using standard set operators (union, intersection, difference).

Important: Equations must use valid Python syntax (e.g., x**2 + y**2 > 30).

The output is a valid CellPopulation XML that can be copied directly into a Morpheus model using the 'Copy to Clipboard' button. A real-time visualization shows each cell cluster in a different color for instant verification.

Here is a screenshot of how the program looks like:

Usage example

How it works

CellMapper addresses the challenge of creating connected cell populations with roughly equal sizes and user-specified cell counts. This is an instance of the graph clustering problem, which is NP-hard .

We use the established METIS library and its Python wrapper pymetis to solve the cell initialization problem through intelligent graph partitioning.

Built with:

Current limitations

  • 3D support - Currently limited to 2D grids
  • Code consistency - Formatting and style need standardization
  • Error handling - Needs robust validation for user input
  • Grid types - Only supports rectangular grids (hexagonal grids planned)

Installation & Usage

Fork or download the contents of the repo and then run:

# Navigate to the project directory
cd cellmapper

# Install required dependencies
pip install PySide6 lxml pymetis numpy clipboard

# Run the application
python main.py

Note on the usage of LLMs

LLMs were used in this project to:

  • help translate the GUI from pysimplegui to PySide6.
  • to debug the visualization of the cells.
  • to clean up and optimize the README

About

A visual tool for defining cellular populations through boolean spatial functions and generating MorpheusML-compatible xml output

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages