From daf1f40a886863a063a3401249b6bf15e52eec63 Mon Sep 17 00:00:00 2001 From: Eran Date: Sun, 15 Oct 2023 11:22:46 -0400 Subject: [PATCH] begin work on diagrams --- jupyter_notebooks/diagrams.ipynb | 3386 ++++++++++++++++++++++++++++++ tumor_tcell/experiments/main.py | 160 +- 2 files changed, 3463 insertions(+), 83 deletions(-) create mode 100644 jupyter_notebooks/diagrams.ipynb diff --git a/jupyter_notebooks/diagrams.ipynb b/jupyter_notebooks/diagrams.ipynb new file mode 100644 index 0000000..89768b9 --- /dev/null +++ b/jupyter_notebooks/diagrams.ipynb @@ -0,0 +1,3386 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "e52e6896-c554-4724-a282-a918d7832168", + "metadata": {}, + "outputs": [], + "source": [ + "# %%capture\n", + "# #Install tumor-tcell from one directory up\n", + "# !pip install ../" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "7538b3a8-e11c-4771-87ab-d83b077b70ed", + "metadata": {}, + "outputs": [], + "source": [ + "from bigraph_viz import plot_bigraph, convert_vivarium_composite\n", + "from tumor_tcell.experiments.main import large_experiment\n", + "from vivarium.core.engine import pf\n", + "from vivarium.core.composer import Composite" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "8166389b-a006-490a-8e84-9e67e49591ed", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Initializing experiment tumor_tcell_20231015.101214\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "0it [00:00, ?it/s]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Completed in 0.00 seconds\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "data, experiment = large_experiment(\n", + " n_tcells=1,\n", + " n_tumors=1,\n", + " n_dendritic=1,\n", + " n_tcells_lymph_node=2,\n", + " tumors_state_PDL1n=0.5,\n", + " tcells_total_PD1n=8,\n", + " dendritic_state_active=0.5,\n", + " lymph_nodes=True,\n", + " total_time=0, \n", + " field_molecules=['IFNg', 'tumor_debris'],\n", + " return_experiment=True,\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "4235f64b-7518-4279-ac6e-91bfd731bfc8", + "metadata": {}, + "outputs": [], + "source": [ + "composite = Composite(\n", + " state=experiment.state.get_value(), \n", + " processes=experiment.state.get_processes(), \n", + " topology=experiment.state.get_topology(), \n", + " flow=experiment.state.get_flow(),\n", + ")\n", + "del composite['_schema']" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "981df19a-5298-4ff8-80a6-2533f97a2eeb", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'flow': {},\n", + " 'processes': { 'in_transit': { 'agents': { 'tcell_LN_0': { 't_cell': }}},\n", + " 'lymph_node': { 'agents': { 'tcell_LN_1': { 't_cell': }}},\n", + " 'lymph_node_transfer': ,\n", + " 'tumor_environment': { 'agents': { 'dendritic_0': { 'dendritic_cell': },\n", + " 'tcell_0': { 't_cell': },\n", + " 'tumor_0': { 'tumor': }},\n", + " 'clock': ,\n", + " 'diffusion_field': ,\n", + " 'neighbors_multibody': }},\n", + " 'state': { 'in_transit': { 'agents': { 'tcell_LN_0': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 0,\n", + " 'cell_state': 'PD1n',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0,\n", + " 'TCR': 50000},\n", + " 'receive': { },\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'dimensions': { 'bounds': [1, 1],\n", + " 'depth': 1,\n", + " 'n_bins': [1, 1]},\n", + " 'fields': {}},\n", + " 'lymph_node': { 'agents': { 'tcell_LN_1': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 0,\n", + " 'cell_state': 'inactive',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0,\n", + " 'TCR': 50000},\n", + " 'receive': { },\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'dimensions': { 'bounds': [1, 1],\n", + " 'depth': 1,\n", + " 'n_bins': [1, 1]},\n", + " 'fields': {}},\n", + " 'lymph_node_transfer': ( ,\n", + " { 'cells': ('tumor_environment',),\n", + " 'in_transit': ('in_transit',),\n", + " 'lymph_node': ('lymph_node',)}),\n", + " 'tumor_environment': { 'agents': { 'dendritic_0': { 'boundary': { 'cell_type': 'dendritic',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'divide_count': 0,\n", + " 'exchange': { 'tumor_debris': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'dendritic_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'cell_state': 'active',\n", + " 'cell_state_count': 0,\n", + " 'tumor_debris': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'PD1': 0.0,\n", + " 'TCR': 0.0},\n", + " 'present': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'receive': { },\n", + " 'transfer': { }}},\n", + " 'tcell_0': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 2961.42865251114,\n", + " 'cell_state': 'PD1n',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0.0,\n", + " 'TCR': 50000},\n", + " 'receive': { },\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})},\n", + " 'tumor_0': { 'boundary': { 'PDL1n_divide_count': 0,\n", + " 'cell_type': 'tumor',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0,\n", + " 'tumor_debris': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'IFNg': 0,\n", + " 'cell_state': 'PDL1p',\n", + " 'cell_state_count': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'PD1': 0.0,\n", + " 'TCR': 0.0},\n", + " 'present': { 'MHCI': 1000,\n", + " 'PDL1': 0.0},\n", + " 'receive': { 'cytotoxic_packets': 0.0},\n", + " 'transfer': { }},\n", + " 'tumor': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'clock': ( ,\n", + " { 'global_time': ( 'global_time',)}),\n", + " 'death_log': ( ,\n", + " { 'log': ('log',),\n", + " 'source': ('agents',),\n", + " 'time': ('global_time',)}),\n", + " 'diffusion_field': ( ,\n", + " { 'cells': ('agents',),\n", + " 'dimensions': ( 'dimensions',),\n", + " 'fields': ( 'fields',)}),\n", + " 'dimensions': { 'bounds': [1200, 1200],\n", + " 'depth': 15,\n", + " 'n_bins': [120, 120]},\n", + " 'fields': { 'IFNg': array([[0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " ...,\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.]]),\n", + " 'tumor_debris': array([[0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " ...,\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.]])},\n", + " 'global_time': 0.0,\n", + " 'log': { 'dendritic_0': (0.0, False),\n", + " 'tcell_0': (0.0, False),\n", + " 'tumor_0': (0.0, False)},\n", + " 'neighbors_multibody': ( ,\n", + " { 'cells': ( 'agents',)})}},\n", + " 'steps': {},\n", + " 'topology': { 'in_transit': { 'agents': { 'tcell_LN_0': { 'death': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')},\n", + " 'division': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)},\n", + " 'local_field': { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')},\n", + " 't_cell': { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}}}},\n", + " 'lymph_node': { 'agents': { 'tcell_LN_1': { 'death': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')},\n", + " 'division': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)},\n", + " 'local_field': { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')},\n", + " 't_cell': { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}}}},\n", + " 'lymph_node_transfer': { 'cells': ('tumor_environment',),\n", + " 'in_transit': ('in_transit',),\n", + " 'lymph_node': ('lymph_node',)},\n", + " 'tumor_environment': { 'agents': { 'dendritic_0': { 'death': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')},\n", + " 'dendritic_cell': { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)},\n", + " 'division': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)},\n", + " 'local_field': { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}},\n", + " 'tcell_0': { 'death': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')},\n", + " 'division': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)},\n", + " 'local_field': { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')},\n", + " 't_cell': { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}},\n", + " 'tumor_0': { 'death': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')},\n", + " 'division': { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)},\n", + " 'local_field': { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')},\n", + " 'tumor': { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}}},\n", + " 'clock': { 'global_time': ( 'global_time',)},\n", + " 'death_log': { 'log': ('log',),\n", + " 'source': ('agents',),\n", + " 'time': ('global_time',)},\n", + " 'diffusion_field': { 'cells': ( 'agents',),\n", + " 'dimensions': ( 'dimensions',),\n", + " 'fields': ( 'fields',)},\n", + " 'neighbors_multibody': { 'cells': ( 'agents',)}}}}\n" + ] + } + ], + "source": [ + "print(pf(composite))" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "f923d819-9ff5-44a2-93d2-f4023a347562", + "metadata": {}, + "outputs": [], + "source": [ + "bigraph_spec = convert_vivarium_composite(composite)" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "122b14d5-bed9-4502-94bd-1ad27ac0e16b", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "bigraph\n", + "\n", + "\n", + "\n", + "('in_transit',)\n", + "\n", + "in_transit\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents')\n", + "\n", + "agents\n", + "\n", + "\n", + "\n", + "('in_transit',)->('in_transit', 'agents')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'fields')\n", + "\n", + "fields\n", + "\n", + "\n", + "\n", + "('in_transit',)->('in_transit', 'fields')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions')\n", + "\n", + "dimensions\n", + "\n", + "\n", + "\n", + "('in_transit',)->('in_transit', 'dimensions')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')\n", + "\n", + "tcell_LN_0\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents')->('in_transit', 'agents', 'tcell_LN_0')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 't_cell')\n", + "\n", + "t_cell\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 't_cell')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors')\n", + "\n", + "neighbors\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')\n", + "\n", + "boundary\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'boundary')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'internal')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'local_field')\n", + "\n", + "local_field\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'local_field')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'division')\n", + "\n", + "division\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'division')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0')->('in_transit', 'agents', 'tcell_LN_0', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present')\n", + "\n", + "present\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept')\n", + "\n", + "accept\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'transfer')\n", + "\n", + "transfer\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'transfer')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'receive')\n", + "\n", + "receive\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'receive')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present', 'PD1')\n", + "\n", + "PD1\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present', 'PD1')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present', 'TCR')\n", + "\n", + "TCR\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'present', 'TCR')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "PDL1\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "MHCI\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'transfer')->('in_transit', 'agents', 'tcell_LN_0', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'divide')\n", + "\n", + "divide\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'divide')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'PD1n_divide_count')\n", + "\n", + "PD1n_divide_count\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'PD1n_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'PD1p_divide_count')\n", + "\n", + "PD1p_divide_count\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'PD1p_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'LN_no_migration')\n", + "\n", + "LN_no_migration\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'LN_no_migration')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'cell_type')\n", + "\n", + "cell_type\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'cell_type')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'mass')\n", + "\n", + "mass\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'mass')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'diameter')\n", + "\n", + "diameter\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'diameter')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'velocity')\n", + "\n", + "velocity\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'velocity')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'exchange')\n", + "\n", + "exchange\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'exchange')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external')\n", + "\n", + "external\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'location')\n", + "\n", + "location\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'location')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'exchange')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external')->('in_transit', 'agents', 'tcell_LN_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'cell_state')\n", + "\n", + "cell_state\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'cell_state')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'cell_state_count')\n", + "\n", + "cell_state_count\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'cell_state_count')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'refractory_count')\n", + "\n", + "refractory_count\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'refractory_count')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "total_cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'TCR_timer')\n", + "\n", + "TCR_timer\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'TCR_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal', 'velocity_timer')\n", + "\n", + "velocity_timer\n", + "\n", + "\n", + "\n", + "('in_transit', 'agents', 'tcell_LN_0', 'internal')->('in_transit', 'agents', 'tcell_LN_0', 'internal', 'velocity_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions', 'bounds')\n", + "\n", + "bounds\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions')->('in_transit', 'dimensions', 'bounds')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions', 'n_bins')\n", + "\n", + "n_bins\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions')->('in_transit', 'dimensions', 'n_bins')\n", + "\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions', 'depth')\n", + "\n", + "depth\n", + "\n", + "\n", + "\n", + "('in_transit', 'dimensions')->('in_transit', 'dimensions', 'depth')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node',)\n", + "\n", + "lymph_node\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents')\n", + "\n", + "agents\n", + "\n", + "\n", + "\n", + "('lymph_node',)->('lymph_node', 'agents')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'fields')\n", + "\n", + "fields\n", + "\n", + "\n", + "\n", + "('lymph_node',)->('lymph_node', 'fields')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions')\n", + "\n", + "dimensions\n", + "\n", + "\n", + "\n", + "('lymph_node',)->('lymph_node', 'dimensions')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')\n", + "\n", + "tcell_LN_1\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents')->('lymph_node', 'agents', 'tcell_LN_1')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 't_cell')\n", + "\n", + "t_cell\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 't_cell')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')\n", + "\n", + "neighbors\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')\n", + "\n", + "boundary\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'internal')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'local_field')\n", + "\n", + "local_field\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'local_field')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'division')\n", + "\n", + "division\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'division')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1')->('lymph_node', 'agents', 'tcell_LN_1', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present')\n", + "\n", + "present\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept')\n", + "\n", + "accept\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'transfer')\n", + "\n", + "transfer\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'transfer')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'receive')\n", + "\n", + "receive\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'receive')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present', 'PD1')\n", + "\n", + "PD1\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present', 'PD1')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present', 'TCR')\n", + "\n", + "TCR\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'present', 'TCR')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "PDL1\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "MHCI\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'transfer')->('lymph_node', 'agents', 'tcell_LN_1', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'divide')\n", + "\n", + "divide\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'divide')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'PD1n_divide_count')\n", + "\n", + "PD1n_divide_count\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'PD1n_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'PD1p_divide_count')\n", + "\n", + "PD1p_divide_count\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'PD1p_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'LN_no_migration')\n", + "\n", + "LN_no_migration\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'LN_no_migration')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'cell_type')\n", + "\n", + "cell_type\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'cell_type')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'mass')\n", + "\n", + "mass\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'mass')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'diameter')\n", + "\n", + "diameter\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'diameter')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'velocity')\n", + "\n", + "velocity\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'velocity')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'exchange')\n", + "\n", + "exchange\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'exchange')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external')\n", + "\n", + "external\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'location')\n", + "\n", + "location\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'location')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'exchange')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external')->('lymph_node', 'agents', 'tcell_LN_1', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'cell_state')\n", + "\n", + "cell_state\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'cell_state')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'cell_state_count')\n", + "\n", + "cell_state_count\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'cell_state_count')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'refractory_count')\n", + "\n", + "refractory_count\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'refractory_count')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "total_cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'TCR_timer')\n", + "\n", + "TCR_timer\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'TCR_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'velocity_timer')\n", + "\n", + "velocity_timer\n", + "\n", + "\n", + "\n", + "('lymph_node', 'agents', 'tcell_LN_1', 'internal')->('lymph_node', 'agents', 'tcell_LN_1', 'internal', 'velocity_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions', 'bounds')\n", + "\n", + "bounds\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions')->('lymph_node', 'dimensions', 'bounds')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions', 'n_bins')\n", + "\n", + "n_bins\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions')->('lymph_node', 'dimensions', 'n_bins')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions', 'depth')\n", + "\n", + "depth\n", + "\n", + "\n", + "\n", + "('lymph_node', 'dimensions')->('lymph_node', 'dimensions', 'depth')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment',)\n", + "\n", + "tumor_environment\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'neighbors_multibody')\n", + "\n", + "neighbors_multibody\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'neighbors_multibody')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents')\n", + "\n", + "agents\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'agents')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'diffusion_field')\n", + "\n", + "diffusion_field\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'diffusion_field')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'clock')\n", + "\n", + "clock\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'clock')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'global_time')\n", + "\n", + "global_time\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'global_time')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions')\n", + "\n", + "dimensions\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'dimensions')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'fields')\n", + "\n", + "fields\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'fields')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'death_log')\n", + "\n", + "death_log\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'death_log')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log')\n", + "\n", + "log\n", + "\n", + "\n", + "\n", + "('tumor_environment',)->('tumor_environment', 'log')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')\n", + "\n", + "tcell_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tcell_0')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')\n", + "\n", + "tumor_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'tumor_0')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')\n", + "\n", + "dendritic_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents')->('tumor_environment', 'agents', 'dendritic_0')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", + "\n", + "t_cell\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 't_cell')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", + "\n", + "neighbors\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'neighbors')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", + "\n", + "boundary\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'boundary')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'internal')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", + "\n", + "local_field\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'local_field')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'division')\n", + "\n", + "division\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'division')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0')->('tumor_environment', 'agents', 'tcell_0', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')\n", + "\n", + "present\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept')\n", + "\n", + "accept\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'transfer')\n", + "\n", + "transfer\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'transfer')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'receive')\n", + "\n", + "receive\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'receive')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'PD1')\n", + "\n", + "PD1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'PD1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'TCR')\n", + "\n", + "TCR\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'present', 'TCR')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "PDL1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept', 'PDL1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "MHCI\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'accept', 'MHCI')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'transfer')->('tumor_environment', 'agents', 'tcell_0', 'neighbors', 'transfer', 'cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'divide')\n", + "\n", + "divide\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'divide')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'PD1n_divide_count')\n", + "\n", + "PD1n_divide_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'PD1n_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'PD1p_divide_count')\n", + "\n", + "PD1p_divide_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'PD1p_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'LN_no_migration')\n", + "\n", + "LN_no_migration\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'LN_no_migration')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'cell_type')\n", + "\n", + "cell_type\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'cell_type')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'mass')\n", + "\n", + "mass\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'mass')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'diameter')\n", + "\n", + "diameter\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'diameter')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'velocity')\n", + "\n", + "velocity\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'velocity')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", + "\n", + "exchange\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external')\n", + "\n", + "external\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", + "\n", + "location\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'location')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external')->('tumor_environment', 'agents', 'tcell_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state')\n", + "\n", + "cell_state\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state_count')\n", + "\n", + "cell_state_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'cell_state_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'refractory_count')\n", + "\n", + "refractory_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'refractory_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "total_cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'total_cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'TCR_timer')\n", + "\n", + "TCR_timer\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'TCR_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal', 'velocity_timer')\n", + "\n", + "velocity_timer\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tcell_0', 'internal')->('tumor_environment', 'agents', 'tcell_0', 'internal', 'velocity_timer')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", + "\n", + "tumor\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'tumor')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors')\n", + "\n", + "neighbors\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'neighbors')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')\n", + "\n", + "boundary\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'boundary')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal')\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'internal')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", + "\n", + "local_field\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'local_field')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'division')\n", + "\n", + "division\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'division')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0')->('tumor_environment', 'agents', 'tumor_0', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present')\n", + "\n", + "present\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept')\n", + "\n", + "accept\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'receive')\n", + "\n", + "receive\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'receive')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'transfer')\n", + "\n", + "transfer\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'transfer')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present', 'PDL1')\n", + "\n", + "PDL1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present', 'PDL1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present', 'MHCI')\n", + "\n", + "MHCI\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'present', 'MHCI')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept', 'PD1')\n", + "\n", + "PD1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept', 'PD1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept', 'TCR')\n", + "\n", + "TCR\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'accept', 'TCR')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'receive', 'cytotoxic_packets')\n", + "\n", + "cytotoxic_packets\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'receive')->('tumor_environment', 'agents', 'tumor_0', 'neighbors', 'receive', 'cytotoxic_packets')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'divide')\n", + "\n", + "divide\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'divide')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'PDL1n_divide_count')\n", + "\n", + "PDL1n_divide_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'PDL1n_divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'cell_type')\n", + "\n", + "cell_type\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'cell_type')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'mass')\n", + "\n", + "mass\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'mass')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'diameter')\n", + "\n", + "diameter\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'diameter')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'velocity')\n", + "\n", + "velocity\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'velocity')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external')\n", + "\n", + "external\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')\n", + "\n", + "exchange\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'location')\n", + "\n", + "location\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'location')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'tumor_0', 'boundary', 'exchange', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal', 'cell_state')\n", + "\n", + "cell_state\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal')->('tumor_environment', 'agents', 'tumor_0', 'internal', 'cell_state')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal')->('tumor_environment', 'agents', 'tumor_0', 'internal', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal', 'cell_state_count')\n", + "\n", + "cell_state_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'tumor_0', 'internal')->('tumor_environment', 'agents', 'tumor_0', 'internal', 'cell_state_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", + "\n", + "dendritic_cell\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'dendritic_cell')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')\n", + "\n", + "neighbors\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')\n", + "\n", + "boundary\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'boundary')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal')\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'internal')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", + "\n", + "local_field\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'local_field')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'division')\n", + "\n", + "division\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'division')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0')->('tumor_environment', 'agents', 'dendritic_0', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present')\n", + "\n", + "present\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept')\n", + "\n", + "accept\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'transfer')\n", + "\n", + "transfer\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'transfer')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'receive')\n", + "\n", + "receive\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'receive')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present', 'PDL1')\n", + "\n", + "PDL1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present', 'PDL1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present', 'MHCI')\n", + "\n", + "MHCI\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'present', 'MHCI')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept', 'PD1')\n", + "\n", + "PD1\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept', 'PD1')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept', 'TCR')\n", + "\n", + "TCR\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept')->('tumor_environment', 'agents', 'dendritic_0', 'neighbors', 'accept', 'TCR')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'death')\n", + "\n", + "death\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'death')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'divide')\n", + "\n", + "divide\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'divide')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'divide_count')\n", + "\n", + "divide_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'divide_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'cell_type')\n", + "\n", + "cell_type\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'cell_type')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'mass')\n", + "\n", + "mass\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'mass')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'diameter')\n", + "\n", + "diameter\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'diameter')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'velocity')\n", + "\n", + "velocity\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'velocity')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external')\n", + "\n", + "external\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')\n", + "\n", + "exchange\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'location')\n", + "\n", + "location\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'location')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'external', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange')->('tumor_environment', 'agents', 'dendritic_0', 'boundary', 'exchange', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal', 'cell_state')\n", + "\n", + "cell_state\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal')->('tumor_environment', 'agents', 'dendritic_0', 'internal', 'cell_state')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal')->('tumor_environment', 'agents', 'dendritic_0', 'internal', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal', 'cell_state_count')\n", + "\n", + "cell_state_count\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'agents', 'dendritic_0', 'internal')->('tumor_environment', 'agents', 'dendritic_0', 'internal', 'cell_state_count')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions', 'bounds')\n", + "\n", + "bounds\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions')->('tumor_environment', 'dimensions', 'bounds')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions', 'n_bins')\n", + "\n", + "n_bins\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions')->('tumor_environment', 'dimensions', 'n_bins')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions', 'depth')\n", + "\n", + "depth\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'dimensions')->('tumor_environment', 'dimensions', 'depth')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'fields', 'IFNg')\n", + "\n", + "IFNg\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'fields')->('tumor_environment', 'fields', 'IFNg')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'fields', 'tumor_debris')\n", + "\n", + "tumor_debris\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'fields')->('tumor_environment', 'fields', 'tumor_debris')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log', 'tcell_0')\n", + "\n", + "tcell_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log')->('tumor_environment', 'log', 'tcell_0')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log', 'tumor_0')\n", + "\n", + "tumor_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log')->('tumor_environment', 'log', 'tumor_0')\n", + "\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log', 'dendritic_0')\n", + "\n", + "dendritic_0\n", + "\n", + "\n", + "\n", + "('tumor_environment', 'log')->('tumor_environment', 'log', 'dendritic_0')\n", + "\n", + "\n", + "\n", + "\n", + "('lymph_node_transfer',)\n", + "\n", + "lymph_node_transfer\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot_bigraph(bigraph_spec,\n", + " # dpi='500',\n", + " # out_dir='out',\n", + " # filename='tumor_tcell_bigraph',\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "8d3efe8b-d0c5-4e65-9a4a-3f2b574fe63f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'in_transit': { 'agents': { 'tcell_LN_0': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 0,\n", + " 'cell_state': 'PD1n',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0,\n", + " 'TCR': 50000},\n", + " 'receive': {},\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'dimensions': { 'bounds': [1, 1],\n", + " 'depth': 1,\n", + " 'n_bins': [1, 1]},\n", + " 'fields': {}},\n", + " 'lymph_node': { 'agents': { 'tcell_LN_1': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 0,\n", + " 'cell_state': 'inactive',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0,\n", + " 'TCR': 50000},\n", + " 'receive': {},\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'dimensions': { 'bounds': [1, 1],\n", + " 'depth': 1,\n", + " 'n_bins': [1, 1]},\n", + " 'fields': {}},\n", + " 'lymph_node_transfer': ( ,\n", + " { 'cells': ('tumor_environment',),\n", + " 'in_transit': ('in_transit',),\n", + " 'lymph_node': ('lymph_node',)}),\n", + " 'tumor_environment': { 'agents': { 'dendritic_0': { 'boundary': { 'cell_type': 'dendritic',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'divide_count': 0,\n", + " 'exchange': { 'tumor_debris': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'dendritic_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'cell_state': 'active',\n", + " 'cell_state_count': 0,\n", + " 'tumor_debris': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'PD1': 0.0,\n", + " 'TCR': 0.0},\n", + " 'present': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'receive': { },\n", + " 'transfer': { }}},\n", + " 'tcell_0': { 'boundary': { 'LN_no_migration': False,\n", + " 'PD1n_divide_count': 0,\n", + " 'PD1p_divide_count': 0,\n", + " 'cell_type': 't-cell',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'TCR_timer': 2961.42865251114,\n", + " 'cell_state': 'PD1n',\n", + " 'cell_state_count': 0,\n", + " 'refractory_count': 0,\n", + " 'total_cytotoxic_packets': 0,\n", + " 'velocity_timer': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'MHCI': 0.0,\n", + " 'PDL1': 0.0},\n", + " 'present': { 'PD1': 0.0,\n", + " 'TCR': 50000},\n", + " 'receive': {},\n", + " 'transfer': { 'cytotoxic_packets': 0.0}},\n", + " 't_cell': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})},\n", + " 'tumor_0': { 'boundary': { 'PDL1n_divide_count': 0,\n", + " 'cell_type': 'tumor',\n", + " 'death': False,\n", + " 'diameter': ,\n", + " 'divide': False,\n", + " 'exchange': { 'IFNg': 0,\n", + " 'tumor_debris': 0},\n", + " 'external': { 'IFNg': 0.0,\n", + " 'tumor_debris': 0.0},\n", + " 'location': [ ,\n", + " ],\n", + " 'mass': ,\n", + " 'velocity': },\n", + " 'death': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'trigger': ( 'boundary',\n", + " 'death')}),\n", + " 'division': ( ,\n", + " { 'agents': ( '..',\n", + " '..',\n", + " 'agents'),\n", + " 'global': ( 'boundary',)}),\n", + " 'internal': { 'IFNg': 0,\n", + " 'cell_state': 'PDL1p',\n", + " 'cell_state_count': 0},\n", + " 'local_field': ( ,\n", + " { 'dimensions': ( '..',\n", + " '..',\n", + " 'dimensions'),\n", + " 'exchanges': ( 'boundary',\n", + " 'exchange'),\n", + " 'fields': ( '..',\n", + " '..',\n", + " 'fields'),\n", + " 'location': ( 'boundary',\n", + " 'location')}),\n", + " 'neighbors': { 'accept': { 'PD1': 0.0,\n", + " 'TCR': 0.0},\n", + " 'present': { 'MHCI': 1000,\n", + " 'PDL1': 0.0},\n", + " 'receive': { 'cytotoxic_packets': 0.0},\n", + " 'transfer': { }},\n", + " 'tumor': ( ,\n", + " { 'boundary': ( 'boundary',),\n", + " 'globals': ( 'boundary',),\n", + " 'internal': ( 'internal',),\n", + " 'neighbors': ( 'neighbors',)})}},\n", + " 'clock': ( ,\n", + " {'global_time': ('global_time',)}),\n", + " 'death_log': ( ,\n", + " { 'log': ('log',),\n", + " 'source': ('agents',),\n", + " 'time': ('global_time',)}),\n", + " 'diffusion_field': ( ,\n", + " { 'cells': ('agents',),\n", + " 'dimensions': ('dimensions',),\n", + " 'fields': ('fields',)}),\n", + " 'dimensions': { 'bounds': [1200, 1200],\n", + " 'depth': 15,\n", + " 'n_bins': [120, 120]},\n", + " 'fields': { 'IFNg': array([[0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " ...,\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.]]),\n", + " 'tumor_debris': array([[0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " ...,\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.],\n", + " [0., 0., 0., ..., 0., 0., 0.]])},\n", + " 'global_time': 0.0,\n", + " 'log': { 'dendritic_0': (0.0, False),\n", + " 'tcell_0': (0.0, False),\n", + " 'tumor_0': (0.0, False)},\n", + " 'neighbors_multibody': ( ,\n", + " {'cells': ('agents',)})}}\n" + ] + } + ], + "source": [ + "print(pf(bigraph_spec))" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "b0d4e14c-138b-40bb-b182-0018d69cbe73", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tumor_environment': {'neighbors_multibody': ,\n", + " 'agents': {'tcell_0': {'t_cell': },\n", + " 'tumor_0': {'tumor': },\n", + " 'dendritic_0': {'dendritic_cell': }},\n", + " 'diffusion_field': ,\n", + " 'clock': },\n", + " 'lymph_node_transfer': ,\n", + " 'lymph_node': {'agents': {'tcell_LN_1': {'t_cell': }}},\n", + " 'in_transit': {'agents': {'tcell_LN_0': {'t_cell': }}}}" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "composite['processes']" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "972d059e-202c-403a-b731-7f5e956b49ff", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'tumor_environment': {'neighbors_multibody': {'cells': ('agents',)},\n", + " 'agents': {'tcell_0': {'t_cell': {'internal': ('internal',),\n", + " 'boundary': ('boundary',),\n", + " 'globals': ('boundary',),\n", + " 'neighbors': ('neighbors',)},\n", + " 'local_field': {'exchanges': ('boundary', 'exchange'),\n", + " 'location': ('boundary', 'location'),\n", + " 'fields': ('..', '..', 'fields'),\n", + " 'dimensions': ('..', '..', 'dimensions')},\n", + " 'division': {'global': ('boundary',), 'agents': ('..', '..', 'agents')},\n", + " 'death': {'trigger': ('boundary', 'death'),\n", + " 'agents': ('..', '..', 'agents')}},\n", + " 'tumor_0': {'tumor': {'internal': ('internal',),\n", + " 'boundary': ('boundary',),\n", + " 'globals': ('boundary',),\n", + " 'neighbors': ('neighbors',)},\n", + " 'local_field': {'exchanges': ('boundary', 'exchange'),\n", + " 'location': ('boundary', 'location'),\n", + " 'fields': ('..', '..', 'fields'),\n", + " 'dimensions': ('..', '..', 'dimensions')},\n", + " 'division': {'global': ('boundary',), 'agents': ('..', '..', 'agents')},\n", + " 'death': {'trigger': ('boundary', 'death'),\n", + " 'agents': ('..', '..', 'agents')}},\n", + " 'dendritic_0': {'dendritic_cell': {'internal': ('internal',),\n", + " 'boundary': ('boundary',),\n", + " 'globals': ('boundary',),\n", + " 'neighbors': ('neighbors',)},\n", + " 'local_field': {'exchanges': ('boundary', 'exchange'),\n", + " 'location': ('boundary', 'location'),\n", + " 'fields': ('..', '..', 'fields'),\n", + " 'dimensions': ('..', '..', 'dimensions')},\n", + " 'division': {'global': ('boundary',), 'agents': ('..', '..', 'agents')},\n", + " 'death': {'trigger': ('boundary', 'death'),\n", + " 'agents': ('..', '..', 'agents')}}},\n", + " 'diffusion_field': {'cells': ('agents',),\n", + " 'fields': ('fields',),\n", + " 'dimensions': ('dimensions',)},\n", + " 'clock': {'global_time': ('global_time',)},\n", + " 'death_log': {'time': ('global_time',),\n", + " 'source': ('agents',),\n", + " 'log': ('log',)}},\n", + " 'lymph_node_transfer': {'cells': ('tumor_environment',),\n", + " 'lymph_node': ('lymph_node',),\n", + " 'in_transit': ('in_transit',)},\n", + " 'lymph_node': {'agents': {'tcell_LN_1': {'t_cell': {'internal': ('internal',),\n", + " 'boundary': ('boundary',),\n", + " 'globals': ('boundary',),\n", + " 'neighbors': ('neighbors',)},\n", + " 'local_field': {'exchanges': ('boundary', 'exchange'),\n", + " 'location': ('boundary', 'location'),\n", + " 'fields': ('..', '..', 'fields'),\n", + " 'dimensions': ('..', '..', 'dimensions')},\n", + " 'division': {'global': ('boundary',), 'agents': ('..', '..', 'agents')},\n", + " 'death': {'trigger': ('boundary', 'death'),\n", + " 'agents': ('..', '..', 'agents')}}}},\n", + " 'in_transit': {'agents': {'tcell_LN_0': {'t_cell': {'internal': ('internal',),\n", + " 'boundary': ('boundary',),\n", + " 'globals': ('boundary',),\n", + " 'neighbors': ('neighbors',)},\n", + " 'local_field': {'exchanges': ('boundary', 'exchange'),\n", + " 'location': ('boundary', 'location'),\n", + " 'fields': ('..', '..', 'fields'),\n", + " 'dimensions': ('..', '..', 'dimensions')},\n", + " 'division': {'global': ('boundary',), 'agents': ('..', '..', 'agents')},\n", + " 'death': {'trigger': ('boundary', 'death'),\n", + " 'agents': ('..', '..', 'agents')}}}}}" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "composite['topology']" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5a8e2efc-34d1-486f-bd0d-03c5c42f800b", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/tumor_tcell/experiments/main.py b/tumor_tcell/experiments/main.py index 4bbc29e..b0c788e 100644 --- a/tumor_tcell/experiments/main.py +++ b/tumor_tcell/experiments/main.py @@ -35,7 +35,6 @@ from tumor_tcell.plots.snapshots import plot_snapshots, format_snapshot_data from vivarium.core.emitter import deserialize_value - # tumor-tcell imports from tumor_tcell.composites.tumor_agent import TumorAgent from tumor_tcell.composites.t_cell_agent import TCellAgent @@ -62,7 +61,7 @@ TRANSIT_ID = 'in_transit' # parameters for toy experiments -MEDIUM_BOUNDS = [90*units.um, 90*units.um] +MEDIUM_BOUNDS = [90 * units.um, 90 * units.um] # plotting TAG_COLORS = { @@ -89,25 +88,25 @@ def get_tcells( if total_pd1n: assert isinstance(total_pd1n, int) return { - f'{TCELL_ID}{added_identifier}_{n}': { - 'type': 'tcell', - 'cell_state': 'PD1n' if n < total_pd1n else 'PD1p', - 'TCR_timer': random.uniform(0, 5400), - 'velocity_timer': 0, - 'velocity': 10.0 * units.um/units.min, - 'diameter': 7.5 * units.um, - } for n in range(number)} + f'{TCELL_ID}{added_identifier}_{n}': { + 'type': 'tcell', + 'cell_state': 'PD1n' if n < total_pd1n else 'PD1p', + 'TCR_timer': random.uniform(0, 5400), + 'velocity_timer': 0, + 'velocity': 10.0 * units.um / units.min, + 'diameter': 7.5 * units.um, + } for n in range(number)} else: assert relative_pd1n <= 1.0 return { - f'{TCELL_ID}{added_identifier}_{n}': { - 'type': 'tcell', - 'cell_state': 'PD1n' if random.uniform(0, 1) < relative_pd1n else 'PD1p', - 'TCR_timer': random.uniform(0, 5400), - 'velocity_timer': 0, - 'velocity': 10.0 * units.um/units.min, - 'diameter': 7.5 * units.um, - } for n in range(number)} + f'{TCELL_ID}{added_identifier}_{n}': { + 'type': 'tcell', + 'cell_state': 'PD1n' if random.uniform(0, 1) < relative_pd1n else 'PD1p', + 'TCR_timer': random.uniform(0, 5400), + 'velocity_timer': 0, + 'velocity': 10.0 * units.um / units.min, + 'diameter': 7.5 * units.um, + } for n in range(number)} def get_tumors(number=1, relative_pdl1n=0.5): @@ -129,7 +128,7 @@ def get_dendritic(number=1, dendritic_state_active=0.0): '{}_{}'.format(DENDRITIC_ID, n): { 'type': 'dendritic', 'cell_state': 'active' if random.uniform(0, 1) < dendritic_state_active else 'inactive', - 'diameter': 10.0 * units.um, # TODO -- don't hardcode this! + 'diameter': 10.0 * units.um, # TODO -- don't hardcode this! } for n in range(number)} @@ -137,7 +136,7 @@ def convert_to_hours(data): """Convert seconds to hours""" times = list(data.keys()) for time in times: - hour = time/3600 + hour = time / 3600 data[hour] = data.pop(time) return data @@ -172,35 +171,36 @@ def fill_initial_cell_state(state): # The main simulation function def tumor_tcell_abm( - bounds=BOUNDS, - n_bins=NBINS, - depth=DEPTH, - field_molecules=['IFNg'], - n_tumors=30, - n_tcells=30, - n_dendritic=0, - n_tcells_lymph_node=3, - tumors=None, # @Eran - is this necessary? - tcells=None, # @Eran - is this necessary? - dendritic_cells=None, # @Eran - is this necessary? - tumors_state_PDL1n=0.5, - tcells_state_PD1n=None, - tcells_total_PD1n=9, - dendritic_state_active=0.5, - total_time=60000, - sim_step=10*TIMESTEP, # simulation increments at which halt_threshold is checked - halt_threshold=300, # stop simulation at this number - time_step=TIMESTEP, - emit_step=10*TIMESTEP, - emitter='timeseries', - parallel=False, - tumors_distance=None, - tcells_distance=None, - tumors_excluded_distance=None, - tcells_excluded_distance=None, - tumors_center=None, - tcell_center=None, - lymph_nodes=True, #TODO @John - change back to False + bounds=None, + n_bins=None, + depth=DEPTH, + field_molecules=['IFNg'], + n_tumors=30, + n_tcells=30, + n_dendritic=0, + n_tcells_lymph_node=3, + tumors=None, + tcells=None, + dendritic_cells=None, + tumors_state_PDL1n=0.5, + tcells_state_PD1n=None, + tcells_total_PD1n=9, + dendritic_state_active=0.5, + total_time=60000, + sim_step=10 * TIMESTEP, # simulation increments at which halt_threshold is checked + halt_threshold=300, # stop simulation at this number + time_step=TIMESTEP, + emit_step=10 * TIMESTEP, + emitter='timeseries', + parallel=False, + tumors_distance=None, + tcells_distance=None, + tumors_excluded_distance=None, + tcells_excluded_distance=None, + tumors_center=None, + tcell_center=None, + lymph_nodes=False, + return_experiment=False, ): """ Tumor-Tcell simulation @@ -219,6 +219,7 @@ def tumor_tcell_abm( * tcells (dict): specifies precisely the initial t cell state. If not provided, the function `get_tcells` is used to generate an initial state based in n_tcells and tcells_state_PD1n or tcells_total_PD1n. + * dendritic_cells (dict): specifies precisely the initial dendritic state. * tumors_state_PDL1n (float): probability that initial tumors that are PDL1n * tcells_state_PD1n (float): probability that initial tcells that are PD1n * total_time (float): total simulation time in seconds. @@ -241,11 +242,9 @@ def tumor_tcell_abm( Return: Simulation output data (dict) - - Note: - * the `lymph_nodes` option has not been thoroughly tested. - TODO -- This should allow t cells to port in/out of the tumor, rather than having a descignated LN location. When in the T cell they present an antigen to recruite more T Cells. """ + bounds = bounds or BOUNDS + n_bins = n_bins or NBINS ############################ # Create the configuration # @@ -292,7 +291,6 @@ def tumor_tcell_abm( environment_config['ln_id'] = LN_ID environment_composer = TumorAndLymphNodeEnvironment(environment_config) - ####################################### # Initialize the composite simulation # ####################################### @@ -307,7 +305,6 @@ def tumor_tcell_abm( composite_model.merge(composite=logger, path=(TUMOR_ENV_ID,)) # Make the cells - tcells = {} tcells_lymph_node = {} if not tcells: tcells = get_tcells( @@ -373,7 +370,7 @@ def tumor_tcell_abm( excluded_distance_from_center=tcells_excluded_distance, )), 'diameter': state.get('diameter', 7.5 * units.um), - 'velocity': state.get('velocity', 10.0 * units.um/units.min)}, + 'velocity': state.get('velocity', 10.0 * units.um / units.min)}, 'internal': { 'cell_state': state.get('cell_state', None), 'velocity_timer': state.get('velocity_timer', 0), @@ -396,7 +393,7 @@ def tumor_tcell_abm( distance_from_center=tumors_distance, excluded_distance_from_center=tumors_excluded_distance)), 'diameter': state.get('diameter', 15 * units.um), - 'velocity': state.get('velocity', 0.0 * units.um/units.min)}, + 'velocity': state.get('velocity', 0.0 * units.um / units.min)}, 'neighbors': { 'present': { 'PDL1': state.get('PDL1', None), @@ -414,17 +411,17 @@ def tumor_tcell_abm( center=tumors_center, distance_from_center=tumors_distance, excluded_distance_from_center=tumors_excluded_distance)), - 'diameter': state.get('diameter', 10 * units.um), #TODO - @Eran this should not be required - 'velocity': state.get('velocity', 3.0 * units.um/units.min) + 'diameter': state.get('diameter', 10 * units.um), # TODO - this should not be required + 'velocity': state.get('velocity', 3.0 * units.um / units.min) }, } for agent_id, state in dendritic_cells.items()} # combine all the initial states together under the tumor environment initial_state[TUMOR_ENV_ID]['agents'].update({ - **initial_t_cells, - **initial_tumors, - **initial_dendritic - }) + **initial_t_cells, + **initial_tumors, + **initial_dendritic + }) if lymph_nodes: initial_t_cells_transit = {} @@ -492,10 +489,14 @@ def tumor_tcell_abm( # return the data data = experiment.emitter.get_data_deserialized() data = convert_to_hours(data) + if return_experiment: + return data, experiment return data -FULL_BOUNDS = [1200*units.um, 1200*units.um] +FULL_BOUNDS = [1200 * units.um, 1200 * units.um] + + def large_experiment( n_tcells=12, n_tumors=1200, @@ -510,12 +511,15 @@ def large_experiment( tumors_distance=260 * units.um, # sqrt(n_tumors)*15(diameter)/2 tcells_distance=250 * units.um, # in or out (None) of the tumor tcells_excluded_distance=240 * units.um, # for creating a ring around tumor - field_molecules=['IFNg'], + field_molecules=None, + return_experiment=False, ): """ Configurable large environment that has many tumors and t cells. Calls tumor_tcell_abm with a few key parameters. """ + if field_molecules is None: + field_molecules = ['IFNg'] return tumor_tcell_abm( n_tcells=n_tcells, n_tumors=n_tumors, @@ -527,8 +531,8 @@ def large_experiment( dendritic_state_active=dendritic_state_active, total_time=total_time, time_step=TIMESTEP, - sim_step=100*TIMESTEP, - emit_step=10*TIMESTEP, + sim_step=100 * TIMESTEP, + emit_step=10 * TIMESTEP, bounds=FULL_BOUNDS, n_bins=[120, 120], # 10 um bin size, usually 120 by 120 halt_threshold=4000, # 5000, #sqrt(halt_threshold)*15