Compiler

Obtaining model and experimental data

Cello is a genetic circuit compiler. It compiles circuits written in a hardare description language (a sublanguage of Verilog) into NOR and NOT gates, to then finally generate DNA with the genetic circuit in it. Check out the paper by Nielsen et al. for a description of the compiler.

We will use modeling and experimental data from the Cello v2 compiler in the form of a UCF file. Let's load it into a variable so that we can work with it.

And check out what is inside. It is a list that starts with a header that includes general information from the used bacteria to experimental conditions under which data was obtained:

To get an overview on all the elements stored in the UCF file, let's see the collection names.

A NOR gate from the library

The library contains several gates as can be seen in the collection variables. Le us study one such gate: the S3_SrpR.

In fact all gates are NOR gates as we can check:

Structure of the gate

It's structure, i.e., the genetic design, is obtained as follows:

Model of the gate

It's model is obtained by

It says that a Hill response is used as a model with the additional specification that the inputs are composed linearly. We will check this out in a second as follows:

Measurements

Intrestingly there are even measurments that give much greater detail. Remember that the steady state input-output behavior is deterministic with Hill functions. In fact, measurments show that there is significant noise on output behavior.

To see this, let's look at measurements: The measurements are (normalized) histograms of steady-state input-output measurements in terms of Relative Promotor Units (RPUs). Details are described in the supplementary material of Nielsen et al.. For example, Figure S30 shows how distributions are probagated and Section VII.C.9. “gate_cytometry” states that RPUs in UCFs are measured on the same RPU scale to allow for propagation between gates.

Let's plot the response distribution for 3 inputs to such a component.

The simplified input-output behavior

Using what we learned in Lecture 3, we plot the steady state input-output function of the NOR gate.

Model based on experimental data

To simplify this undertaking, we only model the expected input-output behavior.

We are now ready to use it as a NOR model. Mind that we do not have experimental data on the individual inputs, so we go for the linear combination as proposed in the Cello v2 model of the NOR.

Tasks

  1. Plot all deterministic Hill functions for all NOR gates in log-log plots and discuss what you see. You can plot them for a single input value and not two.

  2. Propagate determinsitic input-output values from inputs to an output. Write a function that allows us to call progagate(circuit,i) where circuit is a linear circuit of NOR gates but with a single input (INV gates). The circuit may, e.g., be a list of str with NOR names. Argument i is an input value in RPUs. The output of the function is the output of the circuit in RPUs.

  3. Do the same (1. and 2.), but with distributions as the output based on the measurements in the UCFs. For 1', you can take a look at seaborn.violinplot.

  4. Write a compiler that, given a length of the INV chain, returns a "good" circuit (in the above sense). Explain what you chose as a criterion for "good" and why.