package affectors; import main.Node; import main.Globals; /** Use for multiplicative inhibition of transcription. Formula is 1 minus our standard activation s-shaped curve, giving an upside-down s-shaped curve (our Psi function) with a half-maximal inhibition at K and the degree of non-linearity controlled by nu. This Affector is designed to work inside of a ProductAff. It inhibits if multiplied by another term - the value of this affector is positive, so it will not inhibit if you add it to another term. You should only use this Affector inside of an EnhancerRegion.
 Formula
dnodex/dt = INHIBITOR^nu / (K^nu + INHIBITOR^nu)
Parameters
| Inhibitor [INHIBITOR] | The inhibitor Node. | 
| Half-maximal inhibition level [K_INHIBITORnodex] | The concentration of inhibitor at which transcription is reduced by half. | 
| Cooperativity [nu_INHIBITORnodex] | The non-linearity of the inhibiting function. The higher the value, the sharper the curves in the S-shaped inhibition function. | 
 Usage
*/
public class TxnSiteInhibitorAff extends Affector	{		
	/** The level of inhibition at which transcription inhibited half-maximally. */
	int		kParam, 
	/** The "cooperativity" exponent for inhibition. */
			nuParam;
	static final String		desc = "Multiplicative inhibition of transcription - use for multiplying several activators and inhibitor inside Product";
	static final String	[]	nodeDescriptions = {"Inhibitor"};
	static final String	[]	paramDescriptions = {"Kappa: half-maximal level of inhibitor",
										"nu: cooperativity of inhibition"};
	public TxnSiteInhibitorAff()	{	}
	
	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];
	}
	
	public float getValue(Node which_node)	{
		return Psi(Nodes[0].getIntegrationValue(),params[kParam],params[nuParam]);
	}
}
&nodex
   &EnhancerRegionAff	H_nodex
&endnodex	&ProductAff
			  &endEnhancerRegion  		&TxnSiteActivatorAff	ACTIVATOR	K_ACTIVATORnodex	nu_ACTIVATORnodex
				 	&TxnSiteInhibitorAff	INHIBITOR	K_INHIBITORnodex	nu_INHIBITORnodex
				&endProductAff