MineBugs
MINeBugs
New SimulationGuide

Chapter 3 · Run a simulation

Set up the run

Choose the targets, the diet and the limits, then launch.

  • 5 min read
  • In the app: Simulation Configuration

In short

You need
A confirmed community.
You do
Go through five steps, targets, diet, guardrails, a name and a final check, then launch.
You get
A run waiting its turn on the computing cluster.

1Target reactions

Choose the molecules the community must keep making, or taking up: the targets.

The first step of the setup: the biological presets, the selected targets with lactose set to Consume, and the full list of targets
  1. A preset selects a ready group. SCFA Production picks butyrate, acetate and propionate, the SCFA.
  2. Selected targets lists every target you picked, from a preset or from the full list. Each one starts on Produce.
  3. Consume asks the community to take the molecule up instead. Here lactose, which comes with the diet.
  4. Explore All Targets opens the full list, with a search by name or ID.

Targets are exchange reactions: molecules moving between the cells and the gut. The community must keep making them, all together at least the share you set in the Guardrails step. With no target, the run only asks the community to grow.

A target set to Consume is a consume target. In the results its flux reads negative, and in the total it counts as positive. If even the full community cannot produce or consume a target the way you chose, the run stops and says so, rather than leaving the target out.

2Diet

The diet sets what the community can take up from the gut.

The diet step: the diet in use and the list of diets
  1. The diet in use. The setup starts on an average European diet.
  2. Inspect lists the uptake limits of a diet; the number counts them. Every diet comes from VMH, and View on VMH opens its page.
  3. Create New Custom Diet Configuration opens the editor.
Custom dietsTemplates, uptake limits, JSON import and export

Name the diet, start from a VMH template or from None (Start Empty), then change the maximum uptake of any exchange, its uptake bound. Use Configuration applies it. Export saves the diet as a JSON file, Import loads it again in a later run.

The custom diet editor
  1. The name of your diet.
  2. The template it starts from.
  3. Import and Export a diet as JSON.
Per-patient diets (cohorts)The default diet, the assignment file and the diet codes

In a cohort the Diet step has two tabs. Default diet is the screen above: every patient gets this diet unless you give them another one. Per-patient diets is where you give some patients a different diet, for example the 20 patients whose meals you know.

The quickest way is a small file with one line per patient: the patient's ID exactly as it is in your matrix, a comma, then the diet's code. Save it from a spreadsheet as CSV (commas or semicolons both work) or as tab-separated text, and load it with Upload assignment file. Patients that are not in the file keep the default diet.

patient_id,diet
P001,md
P002,vegd
P017,LowFiber_P017
P020,default

These are the codes of the diets in the catalog:

md
Mediterranean. Plenty of fresh plant foods, olive oil as the main fat, fish and poultry in moderation, little red meat.
vegd
Vegan. Plant foods only, no animal products at all.
lovd
Vegetarian. Lacto-ovo vegetarian: plant foods plus dairy and eggs.
eud
EU average. An average European diet, from an Austrian nutrition survey. The setup starts on it.
dach
DACH. The intake recommended for healthy adults in Germany, Austria and Switzerland.
hpd
High protein. The diet of strength athletes, or of many weight-loss plans.
hfibd
High fiber. More fiber than the vegan diet, with some animal products.
hflcd
High fat, low carb. Close to a ketogenic diet.
gfd
Gluten free. Based on a day of meals of a person with gluten intolerance.
t2d
Type 2 diabetes. Low in calories, rich in vitamins C and E.
uhd
Unhealthy. Little fiber, many calories, simple sugars and saturated fats.

Upper or lower case does not matter, so MD works too. The diet's full name works as well, for example EU average or EU_average. Write default to give a patient the default diet on purpose. Each code also appears next to its diet in the Default diet tab.

Your own diets go in the same tab. New custom diet opens the diet editor, and Import JSON loads one or more diet files you exported earlier. In the assignment file, write the custom diet's name instead of a code. A custom diet cannot have the name or the code of a catalog diet.

Per-patient recap, closed at first, lists every patient with their diet and where it comes from: the file, the default, or a change you made there. A change in the recap wins over the file.

When a line of the file does not fit, the page lists it with its line number and the launch waits until it is fixed. The usual causes are a patient that is not in the matrix (look at the spelling, and at zeros a spreadsheet may have dropped, like 1 for 001), a code that does not exist, or the same patient twice with two different diets.

3Guardrails

The guardrails are the limits the minimal community must respect, as a share of what the full community does.

The guardrails step: the two sliders and the advanced controls
  1. Minimum Community Growth: the minimal community must grow at least this share of the growth of the full community. Default 80%.
  2. Reaction Production Floor: it must make at least this share of what the full community makes of your targets, a consume target counting what is taken up. Default 80%.
  3. Target floor, with two targets or more: Sum of targets applies the floor to all of them added together, Each target to every one on its own.
  4. Advanced Controls holds Time Limit and Min Species Count.

With Sum of targets, the default, one target can fall below its share if the others make up for it, but none ever turns around: a target to consume is never released and a target to produce never taken up. With Each target, every target keeps its own share; that is stricter, and a run whose targets cannot all keep their share together stops with a message.

Higher values keep the minimal community closer to the full one, but they can leave no community at all: the run then ends as INFEASIBLE (chapter 4). How it works explains what the limits mean for the model.

Advanced ControlsTime Limit, Min Species Count
Time Limit
How long the solver may work on the run. Default 3600 seconds.
Min Species Count
The fewest organisms the community may keep. Default 1.

4Run details

Give the run a name you will recognise later.

Simulation Name takes up to 60 characters. Hypothesis & Notes takes up to 1,000 and is saved with the run.

5Review and launch

The last step shows everything on one page. Check it, then press Run Simulation.

The final review of the setup
  1. The community you confirmed.
  2. The targets.
  3. The guardrails and the time limit.

The next page confirms the run is queued. You can close the tab: the run goes on, and you follow it from your profile, as the next chapter shows.