/// <summary> /// Weight version 6 /// </summary> /// <param name="quanMethod">method used to quantify</param> /// <param name="A">quantity of not labeled sample</param> /// <param name="B">quantity of labeled sample</param> /// <param name="MSQ1">Mean of the sum of squares 1</param> /// <param name="MSQ2">Mean of the sum of squares 2</param> /// <param name="MSQ3">Mean of the sum of squares 3</param> /// <param name="efficiency">labeling efficiency detected</param> /// <returns></returns> public static double calWeight(LNquantitate.quantitationStrategy qStrategy, double A, double B, double MSQ1, double MSQ2, double MSQ3, double efficiency) { double weight = 0.0; double zeroCorr = 0.00000000001; A += zeroCorr; B += zeroCorr; switch (qStrategy) { case LNquantitate.quantitationStrategy.iTRAQ: weight = A > B?Math.Pow(A, 2) : Math.Pow(B, 2); break; case LNquantitate.quantitationStrategy.SILAC: double Imax = A >= B ? A : B; weight = 1 / (MSQ1 / (Imax * Imax) + MSQ2 / (Imax * Imax)); break; case LNquantitate.quantitationStrategy.O18_ZS: double B0 = B * (1 - efficiency) * (1 - efficiency); double B1 = 2 * B * efficiency * (1 - efficiency); double B2 = B * efficiency * efficiency; double AB0 = A + B0; double B1B2 = B1 + B2; if (AB0 >= B1B2) { weight = 1 / ((MSQ1 + MSQ2) / (A * A)); } else { weight = 1 / ((MSQ3 + MSQ2) / (B * B)); } break; default: weight = 0.0; break; } return(weight); }
public void setStrategy(LNquantitate.quantitationStrategy dvStrategy) { strategy = dvStrategy; if (strategy == LNquantitate.quantitationStrategy.SILAC || strategy == LNquantitate.quantitationStrategy.SILAC_HR) { this.grpSilac.Visible = true; this.chkArgPro.Visible = true; this.lblSilacFDRq.Visible = true; this.txtSilacFdrq.Visible = true; this.txtSilacFdrq.Text = "0"; } else { this.grpSilac.Visible = false; } }
public OPviewer(LNquantitate.spectrumType spectType, LNquantitate.quantitationStrategy strategy, double widthForHR, string _workFolder) { InitializeComponent(); this.Resize += new EventHandler(OPviewer_Resize); this.GotFocus += new EventHandler(OPviewer_gotFocus); this.Disposed += new System.EventHandler(OPviewer_Disposed); this.Move += new EventHandler(OPviewer_Move); workFolder = _workFolder; methodTypeUsed = spectType; quantStrategy = strategy; width = widthForHR; }
/// <summary> /// Weight version 6 /// </summary> /// <param name="quanMethod">method used to quantify</param> /// <param name="A">quantity of not labeled sample</param> /// <param name="B">quantity of labeled sample</param> /// <param name="MSQ1">Mean of the sum of squares 1</param> /// <param name="MSQ2">Mean of the sum of squares 2</param> /// <param name="MSQ3">Mean of the sum of squares 3</param> /// <param name="efficiency">labeling efficiency detected</param> /// <returns></returns> public static double calWeight(LNquantitate.quantitationStrategy qStrategy, double A, double B, double MSQ1, double MSQ2, double MSQ3, double efficiency) { double weight = 0.0; double zeroCorr = 0.00000000001; if (A + B == 0) { return(0.0); } A += zeroCorr; B += zeroCorr; double B0 = B * (1 - efficiency) * (1 - efficiency); double B1 = 2 * B * efficiency * (1 - efficiency); double B2 = B * efficiency * efficiency; double AB0 = A + B0; double B1B2 = B1 + B2; switch (qStrategy) { case LNquantitate.quantitationStrategy.iTRAQ: // Old weight used until October 2010 //weight = A > B ? Math.Pow(A, 2) : Math.Pow(B, 2); weight = Math.Max(A, B); break; case LNquantitate.quantitationStrategy.SILAC: double Imax = A >= B ? A : B; weight = (Imax * Imax) / (MSQ1 + MSQ2); break; case LNquantitate.quantitationStrategy.O18_ZS: if (AB0 >= B1B2) { weight = A * A / (MSQ1 + MSQ2); } else { weight = B * B / (MSQ3 + MSQ2); } break; case LNquantitate.quantitationStrategy.O18_HR: if (AB0 >= B1B2) { weight = A * A / MSQ1; } else { weight = B * B / MSQ1; } break; case LNquantitate.quantitationStrategy.SILAC_HR: if (AB0 >= B1B2) { weight = A * A / MSQ1; } else { weight = B * B / MSQ1; } break; default: weight = 0.0; break; } return(weight); }