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 the S-shaped activation function (Phi function) by an upside down-S shaped inhibition function (Psi). This is identical to what you would get by multiplying Txn1Aff times TxnSiteInhibitorAff, except that it is designed to work inside of a meta-affector, and models the situation in which the inhibitor squelches the transcriptional-activating effect independent of activator concentration, rather than reducing the effectiveness of bound activator (see TxnSiteActInhibitAff for this option) or reducing the effective concentration of the activator (see TxnSiteActInhibit2Aff 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 / (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 transcription proceeds at half its rate without inhibitor
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 TxnSiteActInhibit3Aff 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 transcription is cut in half. */ 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 TxnSiteActInhibit3Aff() {} 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]); return Phi(Nodes[0].getIntegrationValue(), params[kParam], params[nuParam]) * inhibition; } }