ImsInformed.Workflows.CrossSectionExtraction.CrossSectionWorkfow.ReportFeatureEvaluation C# (CSharp) Method

ReportFeatureEvaluation() private static method

The report feature evaluation.
private static ReportFeatureEvaluation ( StandardImsPeak peak, PeakScores scores, bool verbose, IImsTarget target, bool badScanRange, bool lowAbsoluteIntensity, bool lowRelativeIntensity, bool badPeakShape, bool lowIsotopicAffinity ) : string
peak StandardImsPeak /// The peak. ///
scores ImsInformed.Scoring.PeakScores /// The scores. ///
verbose bool /// The verbose. ///
target IImsTarget /// The target. ///
badScanRange bool /// The bad scan range. ///
lowAbsoluteIntensity bool /// The low intensity. ///
lowRelativeIntensity bool
badPeakShape bool /// The bad peak shape. ///
lowIsotopicAffinity bool /// The low isotopic affinity. ///
return string
        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;
        }