public string ToOutputString() { StringBuilder sb = new StringBuilder(); sb.Append(SpectraFileName); sb.Append('\t'); sb.Append(OneBasedScan); sb.Append('\t'); sb.Append(RetentionTime); sb.Append('\t'); sb.Append(MonoisotopicMass); sb.Append('\t'); sb.Append(MonoisotopicMass); sb.Append('\t'); sb.Append(Charge); sb.Append('\t'); sb.Append(string.Join(",", Peaks.Select(p => p.ExperimentalMz.ToString("F4")))); sb.Append('\t'); sb.Append(Peaks.First().ExperimentalMz.ToMass(Charge)); sb.Append('\t'); sb.Append(SignalToNoise); sb.Append('\t'); sb.Append(DeltaScore); sb.Append('\t'); sb.Append(Math.Log(Peaks.Sum(p => p.ExperimentalIntensity))); sb.Append('\t'); sb.Append(TotalScanDeconvolutedIntensity); sb.Append('\t'); sb.Append(string.Join(",", Peaks.Select(p => (Math.Log(p.ExperimentalIntensity, 2) - Math.Log(p.TheoreticalIntensity, 2)) + ";" + (p.ExperimentalIntensity - this.Baseline) / this.NoiseFwhm))); return(sb.ToString()); }