1 /*
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the authors in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Authors: Lewis Y. Geer
27 *
28 * File Description:
29 * code to do mass spec scoring
30 *
31 * ===========================================================================
32 */
33
34 //
35 //
36 //
37 // Please keep this file clear of NCBI toolkit dependent code as it
38 // is meant to be used externally from the toolkit.
39 //
40 // NCBI dependent code can go into omssascore.hpp
41 //
42 //
43 //
44
45
46 #ifndef MSSCORE__HPP
47 #define MSSCORE__HPP
48
49 #include <vector>
50 #include <map>
51
52 #ifdef BEGIN_OMSSA_SCOPE
53 BEGIN_OMSSA_SCOPE
54 #endif
55
56 // ncbi toolkit specific define for dll export
57 #ifndef NCBI_XOMSSA_EXPORT
58 #define NCBI_XOMSSA_EXPORT
59 #endif
60
61 /**
62 * enumeration of ion series
63 *
64 * should overlap with EMSIonType in omssa object loaders
65 *
66 */
67
68 enum EMSIonSeries {
69 eMSIonTypeA,
70 eMSIonTypeB,
71 eMSIonTypeC,
72 eMSIonTypeX,
73 eMSIonTypeY,
74 eMSIonTypeZ,
75 eMSIonParent,
76 eMSIonInternal,
77 eMSIonImmonium,
78 eMSIonTypeUnknown,
79 eMSIonTypeAdot,
80 eMSIonTypeXCO2,
81 eMSIonTypeACO2,
82 eMSIonTypeMax
83 };
84
85 /** ion direction. 1 = N->C, -1 = C->N */
86 const int kIonDirection[] = { 1, 1, 1, -1, -1, -1, 1, 1, 1, 0, 1 , -1, 1 };
87
88
89 /** pair of ion series, charge */
90 typedef pair <TMSCharge, EMSIonSeries> TSeriesChargePair;
91
92 /** set of ion series specifiers */
93 typedef std::vector <EMSIonSeries> TIonSeriesSet;
94
95
96 /**
97 * minimal information about a peak
98 */
99 class NCBI_XOMSSA_EXPORT CMSBasicPeak {
100 public:
101
102 CMSBasicPeak(void);
103
104 /** return the intensity of the peak */
105 const TMSIntensity GetIntensity(void) const;
106
107 /** set the intensity of the peak */
108 TMSIntensity& SetIntensity(void);
109
110 /** get the m/z value of the peak */
111 const TMSMZ GetMZ(void) const;
112
113 /** set the m/z value of the peak */
114 TMSMZ& SetMZ(void);
115
116 private:
117
118 /** intensity */
119 TMSIntensity Intensity;
120
121 /** m/z */
122 TMSMZ MZ;
123 };
124
125 inline
CMSBasicPeak(void)126 CMSBasicPeak::CMSBasicPeak(void):
127 Intensity(0),
128 MZ(0)
129 {
130 }
131
132 inline
GetIntensity(void) const133 const TMSIntensity CMSBasicPeak::GetIntensity(void) const
134 {
135 return Intensity;
136 }
137
138 inline
SetIntensity(void)139 TMSIntensity& CMSBasicPeak::SetIntensity(void)
140 {
141 return Intensity;
142 }
143
144 inline
GetMZ(void) const145 const TMSMZ CMSBasicPeak::GetMZ(void) const
146 {
147 return MZ;
148 }
149
150 inline
SetMZ(void)151 TMSMZ& CMSBasicPeak::SetMZ(void)
152 {
153 return MZ;
154 }
155
156
157 /**
158 * information about a matched peak.
159 * Intended for use in omssa hitlist
160 */
161 class NCBI_XOMSSA_EXPORT CMSBasicMatchedPeak: public CMSBasicPeak {
162 public:
163
164 CMSBasicMatchedPeak(void);
165
166 /**
167 * copy constructor from basic class
168 */
169 CMSBasicMatchedPeak(const CMSBasicPeak& BasicPeak);
170
171 /** Get the ion type */
172 const TMSIonSeries GetIonSeries(void) const;
173
174 /** Set the ion type */
175 TMSIonSeries& SetIonSeries(void);
176
177 /** Get the ion charge */
178 const TMSCharge GetCharge(void) const;
179
180 /** Set the ion charge */
181 TMSCharge& SetCharge(void);
182
183 /** Get the ion series number */
184 const TMSNumber GetNumber(void) const;
185
186 /** Set the ion series number */
187 TMSNumber& SetNumber(void);
188
189 /** Get the mass delta */
190 const TMSMZ GetDelta(void) const;
191
192 /** Set the mass delta */
193 TMSMZ& SetDelta(void);
194
195 /**
196 * is a particular series forward going?
197 *
198 * @param Series the series
199 * @return 1 = yes, 0 = no, -1 = indeterminate
200 */
201 static const int IsForwardSeries(EMSIonSeries Series);
202
203
204 private:
205 TMSCharge Charge;
206 TMSIonSeries Series;
207 TMSNumber Number;
208 TMSMZ Delta;
209 };
210
211 inline
CMSBasicMatchedPeak(void)212 CMSBasicMatchedPeak::CMSBasicMatchedPeak(void):
213 Charge(-1),
214 Series(eMSIonType_unknown),
215 Number(-1),
216 Delta(0)
217 {
218 }
219
220 inline
CMSBasicMatchedPeak(const CMSBasicPeak & BasicPeak)221 CMSBasicMatchedPeak::CMSBasicMatchedPeak(const CMSBasicPeak& BasicPeak):
222 Charge(-1),
223 Series(eMSIonType_unknown),
224 Number(-1),
225 Delta(0)
226 {
227 SetMZ() = BasicPeak.GetMZ();
228 SetIntensity() = BasicPeak.GetIntensity();
229 }
230
231 inline
GetIonSeries(void) const232 const TMSIonSeries CMSBasicMatchedPeak::GetIonSeries(void) const
233 {
234 return Series;
235 }
236
237 inline
SetIonSeries(void)238 TMSIonSeries& CMSBasicMatchedPeak::SetIonSeries(void)
239 {
240 return Series;
241 }
242
243 inline
GetCharge(void) const244 const TMSCharge CMSBasicMatchedPeak::GetCharge(void) const
245 {
246 return Charge;
247 }
248
249 inline
SetCharge(void)250 TMSCharge& CMSBasicMatchedPeak::SetCharge(void)
251 {
252 return Charge;
253 }
254
255 inline
GetNumber(void) const256 const TMSNumber CMSBasicMatchedPeak::GetNumber(void) const
257 {
258 return Number;
259 }
260
261 inline
SetNumber(void)262 TMSNumber& CMSBasicMatchedPeak::SetNumber(void)
263 {
264 return Number;
265 }
266
267 inline
GetDelta(void) const268 const TMSMZ CMSBasicMatchedPeak::GetDelta(void) const
269 {
270 return Delta;
271 }
272
273 inline
SetDelta(void)274 TMSMZ& CMSBasicMatchedPeak::SetDelta(void)
275 {
276 return Delta;
277 }
278
279
280 /**
281 * enumeration to denote the type of match
282 */
283 enum EMSMatchType {
284 eMSMatchTypeUnknown, /**< unknown if there is a match or not, i.e. default state */
285 eMSMatchTypeNotTyped, /**< there is a match but the type is unknown */
286 eMSMatchTypeIndependent, /**< the match is statistically independent */
287 eMSMatchTypeSemiIndependent, /**< the match is independent to first order */
288 eMSMatchTypeDependent, /**< the match is statistically dependent */
289 eMSMatchTypeNoSearch, /**< the peak was not searched, e.g. b1 */
290 eMSMatchTypeNoMatch, /**< peak was searched, but no match */
291 eMSMatchTypeTerminus /**< statistically biased terminal match */
292 };
293
294 /**
295 * holds match of a spectrum peak to a theoretical m/z value
296 */
297 class NCBI_XOMSSA_EXPORT CMSMatchedPeak : public CMSBasicMatchedPeak {
298 public:
299 CMSMatchedPeak(void);
300
~CMSMatchedPeak()301 virtual ~CMSMatchedPeak() {}
302
303 /** virtual assignment operator */
304 virtual void Assign(CMSMatchedPeak *in);
305
306 /** fill in using base class */
307 void Assign(CMSBasicMatchedPeak *in);
308
309 /** Get the experimental mass tolerance of the peak */
310 const TMSMZ GetMassTolerance(void) const;
311
312 /** Set the experimental mass tolerance of the peak */
313 TMSMZ& SetMassTolerance(void);
314
315 /** Get the exp ions per unit mass */
316 const TMSExpIons GetExpIons() const;
317
318 /** Set the exp ions per unit mass */
319 TMSExpIons& SetExpIons();
320
321 /** Get the type of match */
322 const EMSMatchType GetMatchType(void) const;
323
324 /** Set the type of match */
325 EMSMatchType& SetMatchType(void);
326
327 private:
328 TMSMZ MassTolerance;
329 TMSExpIons ExpIons;
330 EMSMatchType MatchType;
331 };
332
333
334 inline
GetMassTolerance(void) const335 const TMSMZ CMSMatchedPeak::GetMassTolerance(void) const
336 {
337 return MassTolerance;
338 }
339
340 inline
SetMassTolerance(void)341 TMSMZ& CMSMatchedPeak::SetMassTolerance(void)
342 {
343 return MassTolerance;
344 }
345
346 inline
GetExpIons(void) const347 const TMSExpIons CMSMatchedPeak::GetExpIons(void) const
348 {
349 return ExpIons;
350 }
351
352 inline
SetExpIons(void)353 TMSExpIons& CMSMatchedPeak::SetExpIons(void)
354 {
355 return ExpIons;
356 }
357
358 inline
GetMatchType(void) const359 const EMSMatchType CMSMatchedPeak::GetMatchType(void) const
360 {
361 return MatchType;
362 }
363
364 inline
SetMatchType(void)365 EMSMatchType& CMSMatchedPeak::SetMatchType(void)
366 {
367 return MatchType;
368 }
369
370 /** container typedef for a set of matches */
371 typedef std::vector <CMSMatchedPeak *> TMatchedPeakSet;
372
373 /**
374 * container for a set of matches
375 */
376 class NCBI_XOMSSA_EXPORT CMSMatchedPeakSet {
377 public:
378 CMSMatchedPeakSet(void);
379 virtual ~CMSMatchedPeakSet();
380
381 /**
382 * Get the match info
383 */
384 const TMatchedPeakSet& GetMatchedPeakSet(void) const;
385
386 /**
387 * Set the match info
388 */
389 TMatchedPeakSet& SetMatchedPeakSet(void);
390
391 /**
392 * initialize the MatchInfo array
393 * delete any existing array
394 *
395 * @param SizeIn number of peaks
396 */
397 virtual void CreateMatchedPeakSet(int SizeIn);
398
399 /**
400 * delete the MatchInfo array
401 */
402 void DeleteMatchedPeakSet(void);
403
404 /**
405 * compare to another CMSMatchedPeakSet
406 * and set MatchType accordingly if there is a correlation
407 *
408 * @param Other the other mass peak list
409 * @param SameDirection is the other mass peak list in the same direction?
410 */
411 void Compare(CMSMatchedPeakSet *Other, bool SameDirection);
412
413 /**
414 * Get Size of ion series
415 */
416 const int GetSize(void) const;
417
418 /**
419 * Set Size of ion series
420 */
421 int& SetSize(void);
422
423
424 private:
425 /**
426 * list of matched peak info
427 */
428 TMatchedPeakSet MatchedPeakSet;
429
430 /** Size of ion series */
431 int Size;
432
433 };
434
435 inline
GetMatchedPeakSet(void) const436 const TMatchedPeakSet& CMSMatchedPeakSet::GetMatchedPeakSet(void) const
437 {
438 return MatchedPeakSet;
439 }
440
441 inline
SetMatchedPeakSet(void)442 TMatchedPeakSet& CMSMatchedPeakSet::SetMatchedPeakSet(void)
443 {
444 return MatchedPeakSet;
445 }
446
447 inline
GetSize(void) const448 const int CMSMatchedPeakSet::GetSize(void) const
449 {
450 return Size;
451 }
452
453 inline
SetSize(void)454 int& CMSMatchedPeakSet::SetSize(void)
455 {
456 return Size;
457 }
458
459 /** map from an ion series to a set of matched peak sets */
460 typedef std::map <int, CMSMatchedPeakSet *> TIonSeriesMatchMap;
461
462 /**
463 * contains a map of charge and series to a set of matches
464 */
465 class CMSMatchedPeakSetMap {
466 public:
467 /** c'tor */
468 CMSMatchedPeakSetMap(void);
469
470 /** d'tor */
471 ~CMSMatchedPeakSetMap();
472
473 /**
474 * create a new ion series
475 * if the series exists and is the same size, it will reuse old array
476 *
477 * @param Charge charge of ion series
478 * @param Series which ion series
479 * @param Size length of ion series
480 * @param Maxproductions the actual number of ions computed
481 *
482 */
483 CMSMatchedPeakSet * CreateSeries(
484 TMSCharge Charge,
485 TMSIonSeries Series,
486 int Size,
487 int Maxproductions);
488
489 /**
490 * get a series for modification
491 *
492 * @param Charge charge of ion series
493 * @param Series which ion series
494 */
495 CMSMatchedPeakSet * SetSeries(
496 TMSCharge Charge,
497 TMSIonSeries Series);
498
499 /** Get the Map */
500 const TIonSeriesMatchMap& GetMatchMap(void) const;
501
502 /** Set the Map */
503 TIonSeriesMatchMap& SetMatchMap(void);
504
505 /** convert a charge and series to a map key */
506 static const int
507 ChargeSeries2Key(TMSCharge Charge, TMSIonSeries Series);
508
509 /**
510 * convert a key into a charge
511 *
512 * @param Key the key to convert
513 * @return the charge contained in the key
514 */
515 static const TMSCharge
516 Key2Charge(int Key);
517
518 /**
519 * convert a key into a series type
520 *
521 * @param Key the key to convert
522 * @return the series type contained in the key
523 */
524 static const TMSIonSeries
525 Key2Series(int Key);
526
527 private:
528 /** the map itself */
529 TIonSeriesMatchMap MatchMap;
530
531 };
532
533
534 inline
GetMatchMap(void) const535 const TIonSeriesMatchMap& CMSMatchedPeakSetMap::GetMatchMap(void) const
536 {
537 return MatchMap;
538 }
539
540 inline
SetMatchMap(void)541 TIonSeriesMatchMap& CMSMatchedPeakSetMap::SetMatchMap(void)
542 {
543 return MatchMap;
544 }
545
546
547 /**
548 * is the peptide statistically biased in any way on either end?
549 */
550 enum EMSTerminalBias {
551 eMSNoTerminalBias,
552 eMSNTerminalBias,
553 eMSCTerminalBias,
554 eMSBothTerminalBias
555 };
556
557 /**
558 * container for match between a spectrum and a mass ladder
559 *
560 * base class for omssa CMSHit
561 */
562 class NCBI_XOMSSA_EXPORT CMSSpectrumMatch {
563 public:
564
565 /** c'tor */
566 CMSSpectrumMatch(void);
567
568 /**
569 * d'tor
570 *
571 * deletes the HitInfo Array
572 */
573 virtual ~CMSSpectrumMatch();
574
575 /** Get the experimental m/z of the spectrum */
576 const TMSMZ GetExpMass(void) const;
577
578 /** Set the experimental mass of the spectrum */
579 TMSMZ& SetExpMass(void);
580
581 /** return theoretical mass of the hit */
582 const TMSMZ GetTheoreticalMass(void) const;
583
584 /** set the theoretical mass of the hit */
585 TMSMZ& SetTheoreticalMass(void);
586
587 /** get the charge */
588 const TMSCharge GetCharge(void) const;
589
590 /** set the charge */
591 TMSCharge& SetCharge();
592
593 /** Get the sum of ranks */
594 const int GetSum(void) const;
595
596 /** Set the sum of ranks */
597 int& SetSum(void);
598
599 /** Get the number of matched peaks */
600 const int GetM(void) const;
601
602 /** Set the number of matched peaks */
603 int& SetM(void);
604
605 /** Get the number of experimental peaks */
606 const int GetN(void) const;
607
608 /** Set the number of experimental peaks */
609 int& SetN(void);
610
611 /** return the size of the HitInfo array */
612 const int GetHits(void) const;
613
614 /** set the size of the HitInfo array */
615 int& SetHits(void);
616
617 /**
618 * Get the hit info at array position n
619 *
620 * @param n array position
621 */
622 const CMSBasicMatchedPeak& GetHitInfo(int n) const;
623
624 /**
625 * Set the hit info at array position n
626 *
627 * note: there is an implicit assumption in the scoring code
628 * that ions of the same species are grouped together
629 * and that the ions within the species are in order
630 *
631 * @param n array position
632 */
633 CMSBasicMatchedPeak& SetHitInfo(int n);
634
635 /**
636 * initialize the HitInfo array
637 * delete any existing array
638 * size is determined by GetHits()
639 *
640 */
641 void CreateHitInfo(void);
642
643 /**
644 * find a peak within HitInfo
645 *
646 * @param Number number of the peak, starting with 0
647 * @param ChargeIn charge of peak
648 * @param Series the series to search
649 * @return found peak (0 if not found)
650 */
651 CMSBasicMatchedPeak * Find(TMSNumber Number, TMSCharge ChargeIn, TMSIonSeries Series);
652
653 /**
654 * get map from ion series to CMSMatchedPeakSet *
655 */
656 const CMSMatchedPeakSetMap& GetIonSeriesMatchMap(void) const;
657
658 /**
659 * Set map from ion series to CMSMatchedPeakSet *
660 */
661 CMSMatchedPeakSetMap& SetIonSeriesMatchMap(void);
662
663 /**
664 * copies hit array into match array
665 * fills in missing peaks
666 * does not fill in exp peak values. This has to be done by the calling algorithm.
667 *
668 * @param ChargeIn charge of the ion series to fill
669 * @param Series ion series
670 * @param size length of the ion series
671 * @param MinIntensity the minimum intensity of the peak to consider it as a match
672 * @param Skipb1 should the first forward going ion be ignored?
673 * @param TerminalIon is either of the terminal ions statistically biased, e.g. only K or R at Cterm?
674 * @param Maxproductions the number of ions in the ions series actually calculated
675 * @param Sequence the sequence (used for proline rule)
676 * @param NoProline no n term proline cleavage
677 */
678 void FillMatchedPeaks(
679 TMSCharge ChargeIn,
680 TMSIonSeries Series,
681 unsigned Size,
682 TMSIntensity MinIntensity,
683 bool Skipb1,
684 EMSTerminalBias TerminalIon,
685 int Maxproductions
686 //#if 0
687 ,
688 string &Sequence,
689 bool NoProline
690 //#endif
691 );
692
693 /**
694 * calculate the mean value of the poisson distribution for this match
695 *
696 * @param ProbTerminal the probability of a terminal peak
697 * @param NumTerminalMasses the number of terminal masses searched (2 for trypsin)
698 * @param ProbDependent the probability of a peak following a peak
699 * @param NumUniqueMasses the number of unique masses searched (19 with no modifications)
700 * @param ToleranceAdjust the fraction to adjust mass tolerance
701 * > 0 and <=1
702 *
703 * @return mean of poisson
704 */
705 const double CalcPoissonMean(double ProbTerminal=0.0L,
706 int NumTerminalMasses=2,
707 double ProbDependent=0.0L,
708 int NumUniqueMasses=19,
709 double ToleranceAdjust = 1.0L) const;
710
711 /**
712 * calulate the poisson distribution
713 *
714 * @param Mean mean value of poisson
715 * @param i counts
716 * @return value of poisson at i
717 */
718 const double CalcPoisson(double Mean, int i) const;
719
720 /**
721 * calculates the poisson times the top n hit probability
722 *
723 * @param Mean mean value of poisson
724 * @param i counts
725 * @param TopHitProb probability for top n hits
726 * @return value of poisson times top hit prob at i
727 */
728 const double CalcPoissonTopHit(double Mean, int i, double TopHitProb) const;
729
730 /**
731 * calculate the p-value using poisson distribution
732 *
733 * @param Mean mean value of poisson
734 * @param HitsIn number of hits
735 * @return p-value
736 */
737 const double CalcPvalue(double Mean, int HitsIn) const;
738
739 /**
740 * integrate CalcPoissonTopHit over all i
741 *
742 * @param Mean mean value of poisson
743 * @param TopHitProb probability for top n hits
744 * @return integral
745 */
746 const double CalcNormalTopHit(double Mean, double TopHitProb) const;
747
748 /**
749 * calculate the p-value using poisson distribution and the top hit prob
750 *
751 * @param Mean mean value of poisson
752 * @param HitsIn number of hits
753 * @param Normal the integral of the distribution, used to normalize
754 * @param TopHitProb the probability of a top n hit.
755 * @return p-value
756 */
757 const double CalcPvalueTopHit(double Mean, int HitsIn, double Normal, double TopHitProb) const;
758
759 /**
760 * calculate the rank score
761 *
762 * @return probability of given ranks
763 */
764 const double CalcRankProb(void) const;
765
766 /**
767 * Calc mean delta
768 */
769 const TMSMZ GetMeanDelta(void) const;
770
771 /**
772 * Calc std dev of delta
773 */
774 const TMSMZ GetStdDevDelta(void) const;
775
776 /**
777 * calc max abs difference between experimental and theoretical
778 * mass values
779 *
780 * @return const TMSMZ
781 */
782 const TMSMZ GetMaxDelta(void) const;
783
784 private:
785 // disallow copy
CMSSpectrumMatch(const CMSSpectrumMatch & in)786 CMSSpectrumMatch(const CMSSpectrumMatch& in) {}
787
788 /**
789 * list of matched peaks
790 * ideally, this would be an array of pointers to
791 * allow each element to be virtual, but efficiency requires that it
792 * be an array. this assertion should be tested.
793 */
794 CMSBasicMatchedPeak* HitInfo;
795
796 /** size of HitInfo array */
797 int Hits;
798
799 /** the experimental mass */
800 TMSMZ ExpMass;
801
802 /** theoretical mass */
803 TMSMZ TheoreticalMass;
804
805 /** the charge of the hit */
806 TMSCharge Charge;
807
808 /** Sum of Ranks */
809 int Sum;
810
811 /** Number of matched peaks */
812 int M;
813
814 /** Number of exp peaks */
815 int N;
816
817 /** map from ion series to matched peak sets */
818 CMSMatchedPeakSetMap IonSeriesMatchMap;
819 };
820
821 inline
GetExpMass(void) const822 const TMSMZ CMSSpectrumMatch::GetExpMass(void) const
823 {
824 return ExpMass;
825 }
826
827 inline
SetExpMass(void)828 TMSMZ& CMSSpectrumMatch::SetExpMass(void)
829 {
830 return ExpMass;
831 }
832
833 inline
GetTheoreticalMass(void) const834 const TMSMZ CMSSpectrumMatch::GetTheoreticalMass(void) const
835 {
836 return TheoreticalMass;
837 }
838
839 inline
SetTheoreticalMass(void)840 TMSMZ& CMSSpectrumMatch::SetTheoreticalMass(void)
841 {
842 return TheoreticalMass;
843 }
844
845 inline
GetCharge(void) const846 const TMSCharge CMSSpectrumMatch::GetCharge(void) const
847 {
848 return Charge;
849 }
850
851 inline
SetCharge()852 TMSCharge& CMSSpectrumMatch::SetCharge()
853 {
854 return Charge;
855 }
856
857 inline
GetSum(void) const858 const int CMSSpectrumMatch::GetSum(void) const
859 {
860 return Sum;
861 }
862
863 inline
SetSum(void)864 int& CMSSpectrumMatch::SetSum(void)
865 {
866 return Sum;
867 }
868
869 inline
GetM(void) const870 const int CMSSpectrumMatch::GetM(void) const
871 {
872 return M;
873 }
874
875 inline
SetM(void)876 int& CMSSpectrumMatch::SetM(void)
877 {
878 return M;
879 }
880
881 inline
GetN(void) const882 const int CMSSpectrumMatch::GetN(void) const
883 {
884 return N;
885 }
886
887 inline
SetN(void)888 int& CMSSpectrumMatch::SetN(void)
889 {
890 return N;
891 }
892
893 inline
GetHits(void) const894 const int CMSSpectrumMatch::GetHits(void) const
895 {
896 return Hits;
897 }
898
899 inline
SetHits(void)900 int& CMSSpectrumMatch::SetHits(void)
901 {
902 return Hits;
903 }
904
905 inline
GetHitInfo(int n) const906 const CMSBasicMatchedPeak& CMSSpectrumMatch::GetHitInfo(int n) const
907 {
908 return HitInfo[n];
909 }
910
911 inline
SetHitInfo(int n)912 CMSBasicMatchedPeak& CMSSpectrumMatch::SetHitInfo(int n)
913 {
914 return HitInfo[n];
915 }
916
917 inline
GetIonSeriesMatchMap(void) const918 const CMSMatchedPeakSetMap& CMSSpectrumMatch::GetIonSeriesMatchMap(void) const
919 {
920 return IonSeriesMatchMap;
921 }
922
923 inline
SetIonSeriesMatchMap(void)924 CMSMatchedPeakSetMap& CMSSpectrumMatch::SetIonSeriesMatchMap(void)
925 {
926 return IonSeriesMatchMap;
927 }
928
929 #ifdef END_OMSSA_SCOPE
930 END_OMSSA_SCOPE
931 #endif
932
933 #endif
934
935