public PeptideDocumentIndex PeptideIndexFromPoint(RTLinearRegressionGraphPane graphPane, PointF point) { var regression = ResidualsRegression; if (RTGraphController.PlotType == PlotTypeRT.correlation) { regression = null; } if (RTGraphController.PlotType == PlotTypeRT.correlation || regression != null) { int iRefined = 0, iOut = 0; for (int i = 0; i < _peptidesIndexes.Count; i++) { if (_outlierIndexes != null && _outlierIndexes.Contains(i)) { if (PointIsOverEx(graphPane, point, regression, _scoresOutliers[iOut], _timesOutliers[iOut])) { return(_peptidesIndexes[i]); } iOut++; } else if (_scoresRefined != null && _timesRefined != null) { if (PointIsOverEx(graphPane, point, regression, _scoresRefined[iRefined], _timesRefined[iRefined])) { return(_peptidesIndexes[i]); } iRefined++; } } } return(null); }
private bool PointIsOverEx(RTLinearRegressionGraphPane graphPane, PointF point, RetentionTimeRegression regression, double x, double y) { if (regression != null && regression.IsUsable) { y = GetResidual(regression, x, y); } return(graphPane.PointIsOver(point, x, y)); }
private bool PointIsOverEx(RTLinearRegressionGraphPane graphPane, PointF point, RetentionTimeRegression regression, double x, double y) { if (regression != null && regression.IsUsable) y = GetResidual(regression, x, y); return graphPane.PointIsOver(point, x, y); }
public PeptideDocumentIndex PeptideIndexFromPoint(RTLinearRegressionGraphPane graphPane, PointF point) { var regression = ResidualsRegression; if (RTGraphController.PlotType == PlotTypeRT.correlation) regression = null; if (RTGraphController.PlotType == PlotTypeRT.correlation || regression != null) { int iRefined = 0, iOut = 0; for (int i = 0; i < _peptidesIndexes.Count; i++) { if (_outlierIndexes != null && _outlierIndexes.Contains(i)) { if (PointIsOverEx(graphPane, point, regression, _scoresOutliers[iOut], _timesOutliers[iOut])) return _peptidesIndexes[i]; iOut++; } else if (_scoresRefined != null && _timesRefined != null) { if (PointIsOverEx(graphPane, point, regression, _scoresRefined[iRefined], _timesRefined[iRefined])) return _peptidesIndexes[i]; iRefined++; } } } return null; }