COMETS Layout File
The data blocks in this file are mostly nested within each other. The model file block encapsulates the model world and initial population blocks. The rest of the blocks are listed in the model world block.
1. Model Names
This is a single line block, NOT followed by // on a line below, but at the end of the file. This must be the first line of the layout file. It is followed by the name of at least one FBA model file.
model_file model_file_name1 model_file_name2 ... model_file_name_N
2. Model World
This is a single line block, NOT followed by // on a line below, but after several internal data blocks. This must be the first block inside the model names block. It simply opens up the data block containing the world information. Optionally, it can be followed by the name of a file containing global media information (note that this is deprecated! Global media information should be included in the layout file under the world media block).
2a. Grid Size
This is required to be the first block under the model world line. It doesn’t have a closing //, and only describes the width and height of the simulation grid.
grid_size width height
2b. World Media
The world media block contains global information of the quantity of all extracellular metabolites in the simulation. Each row in the block has two elements – the name of an extracellular metabolite (must be exactly as found in the model file) followed by the quantity of that metabolite initialized in every block in the simulation.
This block must come before the media refresh, static media, and diffusion constants blocks.
world_media metab_1 quantity_1 metab_2 quantity_2 metab_3 quantity_3 . . . metab_N quantity_N //
2c. Diffusion Constants
The diffusion constants block contains diffusion constant information for the extracellular metabolites in the simulation. The block begins with a global default value on the same line as the opening tag. Each row in the block, then, has two elements – the index of the metabolite in question, in the same order as in the world_media block above (starting from 0); and a value for the diffusion constant if it differs from the default.
diffusion_constants default_value index_1 diff_const_1 index_2 diff_const_2 index_3 diff_const_3 . . . //
2d. Media Refresh
This block describes how much each medium component should be refreshed on each simulation cycle in any given grid space. The opening line contains global refresh values for each medium component, in the same order as presented in the world media block.
Each proceeding row contains the amount of media to refresh for each grid space where there is a nonzero refresh value. That is, the only rows that should be present in this block should contain some amount of medium to be refreshed.
media_refresh global_amt_1 global_amt_2 ... global_amt_N row_1 col_1 amt_1 amt_2 amt_3 ... amt_N row_2 col_2 amt_1 amt_2 amt_3 ... amt_N row_3 col_3 amt_1 amt_2 amt_3 ... amt_N . . . row_M col_M amt_1 amt_2 amt_3 ... amt_N //
2e. Static Media
Like the media refresh block, this describes how the media in each space in the grid should be altered during the simulation. However, this block describes which media components should remain at a static value. That is, those media whose quantities should not change due to the effects of the simulation. This might represent a constant sink or source of a number of metabolites.
This block contains pairs of data elements. Each pair starts with a binary (0 or 1) element, denoting whether or not to use that pair as a static element, and a quantity to keep that element static at. This lets one build a static media set where only a few medium elements are maintained as static, while keeping the file structure similar to the media refresh block above.
static_media 0 0 1 0 1 2 0 0 //
Breaks into 4 pairs [0 0], [1 0], [1 2], [0 0]. Only components 2 and 3 have a 1 as their first element, so those medium components are kept static. Component 2 remains at 0, while component 3 stays at 2. Note that in this example, there are no exceptions, so this applies throughout the simulation. In general, it is done like this:
static_media use_1 amt_1 use_2 amt_2 use_3 amt_3 ... use_N amt_N row_1 col_1 use_1 amt_1 use_2 amt_2 ... use_N amt_N row_2 col_2 use_1 amt_1 use_2 amt_2 ... use_N amt_N row_3 col_3 use_1 amt_1 use_2 amt_2 ... use_N amt_N . . . row_M col_M use_1 amt_1 use_2 amt_2 ... use_N amt_N //
2f. Barrier Coordinates
Simple enough, this block describes those grid coordinates that contain barriers (i.e., no media, biomass, or diffusion can occur here).
barrier row_1 col_1 row_2 col_2 row_3 col_3 . . . row_N col_N //
3. Initial Biomass Population
This final block describes the initial biomass population in the layout, and has many options.
In the default biomass layout style, there is just
initial_pop left alone as the header, followed by one row for each grid space containing biomass. There must be one quantity for each metabolic model in the system.
initial_pop row_1 col_1 biomass_1 biomass_2 ... biomass_N row_2 col_2 biomass_1 biomass_2 ... biomass_N row_3 col_3 biomass_1 biomass_2 ... biomass_N . . . row_M col_M biomass_1 biomass_2 ... biomass_N //
The next set of options modify the
initial_pop line itself, and contain no rows in the block, though the // on the line below must be present.
initial_pop random N1 biomass_1 N2 biomass_2 ... //
This will randomly assign
Ni spaces to have
biomass_i amount of biomass from model i. If biomass from different species is allowed to overlap, then that is allowed to happen in this case, but if different species is not allowed to overlap, then that rule is upheld.
initial_pop random_rect X Y W H N1 biomass_1 N2 biomass_2 ... //
As above, but the randomly assigned biomass spots are confined to a rectangle with its upper-left corner at grid space (X,Y), with W grid spaces wide, and H spaces tall.
initial_pop filled biomass_1 biomass_2 ... //
This will completely fill the grid with the given amount of biomass from each species.
initial_pop filled_rect X Y W H biomass_1 biomass_2 ... //
This will completely fill the rectangle (see above) with biomass from each species.
initial_pop square N1 biomass_1 N2 biomass_2 ... //
This will fill squares with radius Ni at the center of the grid with biomass_i from species i.
This block contains parameters initially loaded with the file. A list of these with their accepted values is here. Here’s the structure of the block:
parameters param_1 = value_1 param_2 = value_2 . . . param_N = value_N //
Sample Layout File
model_file ec_iAF1260.cmf model_world grid_size 100 100 world_media M1 0 M2 100 M3 100 M4 0 M5 50 // diffusion_constants 1e-6 0 1e-5 1 5e-6 4 2.5e-6 // media_refresh 0 0 0 0 0 25 20 0 10 10 0 5 30 35 0 15 15 0 0 // static_media 1 0 0 0 0 0 0 0 0 0 10 10 0 0 1 10 1 20 0 0 0 0 // // initial_pop random 20 1 // parameters timeStep = 1 numRunThreads = 10 allowCellOverlap = false // //