package affectors; import main.Node; import main.Globals; import main.Cell; /** Use for activation + inhibition of transcription. Activates according to an S-shaped function (Phi function) with a half maximal activation level K and a cooperativity nu. Inhibits by multiplying an upside down-S shaped inhibition function (Psi function) into both the top and bottom of the Phi function. This models a situation in which the inhibitor reduces the effectiveness of bound activator, rather than reducing the effective concentration of the activator (see TxnSiteActInhibit2Aff for this option) or throttling the activator's effect by multiplying Phi by Psi (see TxnSiteActInhibit3Aff for this option). This family is designed to work inside of a meta-affector. You should only use this Affector inside of an EnhancerRegion.

Formula
inhibit_term = 1 - [(INHIBITOR/K_inhibit)^nu_inhibit * / (1 + (INHIBITOR/K_inhibit)^nu_inhibit)]
dnodex/dt = (ACTIVATOR/K_act)^nu * inhibit_term / (1 + (ACTIVATOR/K)^nu * inhibit_term)

Parameters
Activator [ACTIVATOR] The transcriptional activator Node
Inhibitor [INHIBITOR] The transcriptional inhibitor Node
Half-max activation level of activator [K_ACTIVATORnodex] The concentration of activator at which transcription proceeds at half the maximal rate this particular "site" is capable of driving, absent inhibition
Cooperativity of activator [nu_ACTIVATORnodex] The non-linearity of the activating function. The higher the value, the sharper the curves in the S-shaped activation function
Half-max inhibition level of inhibitor [K_INHIBITORnodex] The concentration of inhibitor at which it has a half-maximal effect on effectiveness of the activator
Cooperativity of inhibitor [nu_INHIBITORnodex] The non-linearity of the inhibition function. The higher the value, the sharper the curves in the S-shaped inhibition function

Usage
&nodex

&EnhancerRegion H_nodex
&TxnSiteActivatorAff ACTIVATOR INHIBITOR K_ACTIVATORnodex nu_ACTIVATORnodex K_INHIBITORnodex nu_INHIBITORnodex
&endEnhancerRegion
&endnodex */ public class TxnSiteActInhibitAff extends Affector { /** The level of activator at which transcription proceeds half-maximally. */ int kParam, /** The "cooperativity" exponent for activation. */ nuParam, /** The level of inhibitor at which it has a half-maximal effect on effectiveness of the activator. */ kInhibitParam, /** The "cooperativity" exponent for inhibition. */ nuInhibitParam; static final String desc = "Activated transcription - use this when combining several activators and inhibitor inside meta-affectors"; static final String [] nodeDescriptions = {"Activator", "Inhibitor"}; static final String [] paramDescriptions = {"Kappa_act: half-maximal level of activator", "nu_act: cooperativity of activation", "Kappa_inhibit: half-maximal level of inhibitor", "nu_inhibit: cooperativity of inhibition"}; public TxnSiteActInhibitAff() {} protected void setLabelsAndTypes() { setDescriptions(this.desc, nodeDescriptions, paramDescriptions); this.Type[GUI_CAPABLE] = 1; this.Type[CERTIFICATION] = Affector.RETURNS_DERIV; this.Type[MATHTYPE] = Affector.FF; this.Type[TERMTYPE] = Affector.PRODUCTION; } public void setParameterNumbers(int [] param_nums) { kParam = param_nums[0]; nuParam = param_nums[1]; kInhibitParam = param_nums[2]; nuInhibitParam = param_nums[3]; } public float getValue(Node which_node) { float inhibition = Psi(Nodes[1].getIntegrationValue(), params[kInhibitParam], params[nuInhibitParam]); float activation = (float)Math.pow((Nodes[0].getIntegrationValue() / params[kParam]), params[nuParam] ); return activation * inhibition / (1 + (activation * inhibition)); } }