private static string ReportFeatureEvaluation(StandardImsPeak peak, PeakScores scores, bool verbose, IImsTarget target, bool badScanRange, bool lowAbsoluteIntensity, bool lowRelativeIntensity, bool badPeakShape, bool lowIsotopicAffinity)
{
Trace.WriteLine(string.Format(" Candidate feature found at [centerMz = {0:F4}, drift time = {1:F2} ms(#{2})] ", peak.PeakApex.MzCenterInDalton, peak.PeakApex.DriftTimeCenterInMs, peak.PeakApex.DriftTimeCenterInScanNumber));
Trace.WriteLine(string.Format(" IntensityScore: {0:F4}", scores.IntensityScore));
if (!lowAbsoluteIntensity)
{
Trace.WriteLine(string.Format(" peakShapeScore: {0:F4}", scores.PeakShapeScore));
if (target.HasCompositionInfo)
{
Trace.WriteLine(string.Format(" isotopicScore: {0:F4}", scores.IsotopicScore));
}
}
string rejectionReason = badScanRange ? "[Bad scan range] " :
lowAbsoluteIntensity ? "[Low Absolute Intensity] " :
badPeakShape ? "[Bad Peak Shape] " :
lowIsotopicAffinity ? "[Different Isotopic Profile] " :
lowRelativeIntensity ? "[Low Relative Intensity] " : string.Empty;
bool rejected = badScanRange || lowAbsoluteIntensity || lowIsotopicAffinity || badPeakShape || lowRelativeIntensity;
if (verbose)
{
if (rejected)
{
Trace.WriteLine(" " + rejectionReason);
}
else
{
Trace.WriteLine(" [PASS]");
}
Trace.WriteLine(string.Empty);
}
return rejectionReason;
}