TumourVisualizer uses Unity to visualize data generated by a modified version of TumourSimulator version 1.2.3, included in this repository. There are currently two visualizations available for viewing. The first one uses the default cell colouring as determined by TumourSimulator, whereas the second one colours cells that all share a specific driver mutation (id 277) green, and all other cells red.
To make changes to the project, or build for other platforms, clone this repository and open the root directory in your Unity editor.
To run the Windows build, clone this repository and run the executeable located in the BuildWindows
directory.
While moving the mouse, click and hold the left mouse button to pan the camera, or click and hold and the right mouse button to strafe the camera. Hold the spacebar and move the mouse forwards and backwards to zoom. Use the up and down arrow keys to cycle through visualizations.
The visualizer accepts the files pointcloud_10000.pcd
and out.csv
as input; at the root project directory while running the Unity editor, and in the same directory as the executeable when running a Unity build. pointcloud_10000.pcd
is generated by TumourSimulator, and can be modified by compiling and running the code found in the TumourSimulator_1.2.3
directory. out.csv
has been doctored by pandas, and is not outputted natively by TumourSimulator_1.2.3
.
Use g++ simulation.cpp main.cpp functions.cpp -w -O3 -I include/ -o cancer.exe
to compile the TumourSimulator code on Linux and Mac. On Windows, please run with the "Windows Subsytem for Linux" and accompanying Linux install (tested with Ubuntu). Current installation directions for these tools can be found here.
After compiling the code found in the TumourSimulator_1.2.3
directory, more information about the specifiable parameters with which the simulation can be run is viewable by running ./cancer.exe -h
in a terminal. More information about these parameters is also available in this paper, which describes the model of tumour growth that TumourSimulator attempts to simulate.
The modified TumourSimulator included in this repository outputs 3 files containing tables of data, called cell_table_10000.pcd
, genotype_table_10000.pcd
, and mutation_table_10000.pcd
. Each row in the cell and genotype tables represents a single cell in the simulation, and each group of adjacent rows in the mutation table with the same genotype_id
also represents a single cell.
cell_id
: integer identifier; each cell has a unique one
x
: integer x-coordinate for the cell's position in a visual representation
y
: integer y-coordinate for the cell's position in a visual representation
z
: integer z-coordinate for the cell's position in a visual representation
genotype_id
: integer identifier that categorizes cells; the colour of a cell in the visualization is determined by its genotype information
genotype_id
: same as in cell_table_10000.pcd
mother_genotype_id
: the genotype_id
belonging to the cell's direct ancestor; if a cell has a mother_genotype_id
of -1
, that means it has no ancestors
genotype_id
: same as in cell_table_10000.pcd
and genotype_table_10000.pcd
mutation_id
: integer identifier; each one represents a mutation belonging to a cell
is_driver
: boolean value; states if the mutation in question is a driver mutation or not
is_resistant
: boolean value; states if the mutation in question is a resistant mutation or not
More information about driver and resistant mutations can be found here.
I'm interested in potentially modifying the visualizer to update in real time and/or have the ability to step through different states, by providing multiple outputs from TumourSimulator.