OpenMS
Loading...
Searching...
No Matches
ProForma.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13#include <OpenMS/OpenMSConfig.h>
14
15#include <optional>
16#include <utility>
17#include <variant>
18#include <vector>
19
20namespace OpenMS
21{
22
23 // Forward declarations
24 class ResidueModification;
25 class AASequence;
26 class MSSpectrum;
27
50 class OPENMS_DLLAPI ProForma
51 {
52 public:
53 //==========================================================================
54 // Enums
55 //==========================================================================
56
64 {
65 FAIL_ON_LOSS,
66 DROP_UNLOCALISED,
67 BEST_EFFORT
68 };
69
70
75 {
76 UNRESOLVED_MOD,
77 UNLOCALISED_MOD,
78 LABILE_MOD,
79 GLOBAL_MOD,
80 AMBIGUOUS_MOD,
81 AMBIGUOUS_REGION,
82 MODIFIED_RANGE,
83 CROSS_LINK,
84 MULTIPLE_CHAINS,
85 ALTERNATIVE_MODS,
86 UNSUPPORTED_FEATURE
87 };
88
89
96 enum class WriteMode
97 {
98 LOSSLESS,
99 CANONICAL
100 };
101
102
109 enum class CvDatabase
110 {
111 UNIMOD,
112 MOD,
113 RESID,
114 XLMOD,
115 GNO
116 };
117
118
125 enum class ErrorCode
126 {
129 UNMATCHED_BRACKET,
130 INVALID_CV_PREFIX,
131 INVALID_CV_ACCESSION,
132 INVALID_AMINO_ACID,
133 INVALID_MASS_VALUE,
135 UNKNOWN_MONOSACCHARIDE,
136 DANGLING_CROSSLINK_LABEL,
137 EMPTY_SEQUENCE,
139 INVALID_OCCURRENCE_SPECIFIER,
142 };
143
144
145 //==========================================================================
146 // Data Structures
147 //==========================================================================
148
161
162
169 struct OPENMS_DLLAPI CvAccession
170 {
173 };
174
175
183 struct OPENMS_DLLAPI NamedMod
184 {
185 std::optional<CvDatabase> cv_hint;
187 };
188
189
197 struct OPENMS_DLLAPI MassDelta
198 {
200 enum class Source
201 {
202 NONE,
203 OBS,
204 U,
205 M,
206 R,
207 X,
208 G
209 };
210
211 Source source = Source::NONE;
212 double mass;
214 };
215
216
223 struct OPENMS_DLLAPI FormulaTag
224 {
226 std::optional<int> charge;
227 };
228
229
239 struct OPENMS_DLLAPI GlycanComposition
240 {
242 using Monosaccharide = std::variant<String, FormulaTag>;
243
244 std::vector<std::pair<Monosaccharide, int>> components;
245 };
246
247
254 struct OPENMS_DLLAPI InfoTag
255 {
257 };
258
259
269 struct OPENMS_DLLAPI PositionConstraint
270 {
271 std::vector<char> residues;
272 bool n_term = false;
273 bool c_term = false;
274 };
275
276
289 using ModificationTag = std::variant<
291 NamedMod,
292 MassDelta,
295 InfoTag,
297 >;
298
299
308 struct OPENMS_DLLAPI Label
309 {
311 enum class Type
312 {
313 CROSSLINK,
314 BRANCH,
315 AMBIGUOUS
316 };
317
320 std::optional<double> score;
321 };
322
323
336 struct OPENMS_DLLAPI Modification
337 {
339 std::vector<std::pair<ModificationTag, std::optional<Label>>> alternatives;
340
343 const ResidueModification* resolved_mod = nullptr;
344 };
345
346
353 struct OPENMS_DLLAPI SequenceElement
354 {
356 std::vector<Modification> modifications;
357 };
358
359
366 struct OPENMS_DLLAPI AmbiguousRegion
367 {
368 std::vector<SequenceElement> elements;
369 };
370
371
380 struct OPENMS_DLLAPI ModifiedRange
381 {
382 std::vector<SequenceElement> elements;
383 std::vector<Modification> modifications;
384 };
385
386
395 using SequenceSection = std::variant<
399 >;
400
401
411 struct OPENMS_DLLAPI UnlocalisedMod
412 {
413 std::vector<Modification> modifications;
414 std::optional<int> occurrence;
415 };
416
417
426 struct OPENMS_DLLAPI LabileModification
427 {
429 };
430
431
440 struct OPENMS_DLLAPI GlobalModification
441 {
443 std::vector<String> locations;
444 };
445
446
455 struct OPENMS_DLLAPI IsotopeReplacement
456 {
458 };
459
460
468 using GlobalModEntry = std::variant<
471 >;
472
473
482 struct OPENMS_DLLAPI AdductIon
483 {
485 int charge;
486 std::optional<int> occurrence;
487 };
488
489
497 using ChargeState = std::variant<
498 int,
499 std::vector<AdductIon>
500 >;
501
502
515 struct OPENMS_DLLAPI Peptidoform
516 {
517 std::optional<String> name;
518 std::vector<GlobalModEntry> global_mods;
519 std::vector<UnlocalisedMod> unlocalised_mods;
520 std::vector<LabileModification> labile_mods;
521 std::vector<Modification> n_term_mods;
522 std::vector<SequenceSection> sequence;
523 std::vector<Modification> c_term_mods;
524 std::optional<ChargeState> charge;
525 };
526
527
536 struct OPENMS_DLLAPI PeptidoformIon
537 {
538 std::optional<String> name;
539 std::vector<Peptidoform> chains;
540 std::optional<ChargeState> charge;
541 bool is_chimeric = false;
542 };
543
544
553 struct OPENMS_DLLAPI CrossLinkGroup
554 {
556 std::vector<std::pair<size_t, size_t>> sites;
557 };
558
559
560 //==========================================================================
561 // ParseError Exception
562 //==========================================================================
563
588 class OPENMS_DLLAPI ParseError :
590 {
591 public:
605 const char* file,
606 int line,
607 const char* function,
608 ErrorCode error_code,
609 size_t error_position,
610 const String& input,
611 const String& message
612 ) noexcept;
613
615 ErrorCode getErrorCode() const noexcept
616 {
617 return code_;
618 }
619
621 size_t getPosition() const noexcept
622 {
623 return position_;
624 }
625
627 const String& getContextBefore() const noexcept
628 {
629 return context_before_;
630 }
631
633 const String& getContextAfter() const noexcept
634 {
635 return context_after_;
636 }
637
639 const String& getExpected() const noexcept
640 {
641 return expected_;
642 }
643
645 const String& getFound() const noexcept
646 {
647 return found_;
648 }
649
661
668 void setExpectedFound(const String& expected, const String& found);
669
670 private:
672 size_t position_;
677
688 void extractContext_(const String& input, size_t pos);
689 };
690
691
692 //==========================================================================
693 // Static Methods - Parsing
694 //==========================================================================
695
708 static Peptidoform parse(const String& input);
709
722 static PeptidoformIon parseIon(const String& input);
723
724
725 //==========================================================================
726 // Static Methods - Serialization
727 //==========================================================================
728
736 static String toString(const Peptidoform& pf,
737 WriteMode mode = WriteMode::LOSSLESS);
738
746 static String toString(const PeptidoformIon& pfi,
747 WriteMode mode = WriteMode::LOSSLESS);
748
749
750 //==========================================================================
751 // Static Methods - JSON Serialization
752 //==========================================================================
753
763 static String toJSON(const Peptidoform& pf);
764
774 static Peptidoform peptidoformFromJSON(const String& json_str);
775
785 static String toJSON(const PeptidoformIon& pfi);
786
797
798
799 //==========================================================================
800 // Static Methods - AASequence Conversion
801 //==========================================================================
802
813
825 const Peptidoform& pf,
826 ConversionPolicy policy = ConversionPolicy::FAIL_ON_LOSS);
827
838
849
859 static std::vector<ConversionIssue> getAASequenceConversionIssues(const Peptidoform& pf);
860
861
862 //==========================================================================
863 // Static Methods - Mass Calculation
864 //==========================================================================
865
877 static bool canCalculateMass(const Peptidoform& pf);
878
888 static bool canCalculateMass(const PeptidoformIon& pfi);
889
898 static std::vector<ConversionIssue> getMassCalculationIssues(const Peptidoform& pf);
899
909 static std::vector<ConversionIssue> getMassCalculationIssues(const PeptidoformIon& pfi);
910
927 static double getMonoWeight(const Peptidoform& pf);
928
940 static double getMonoWeight(const PeptidoformIon& pfi);
941
951 static double getMZ(const PeptidoformIon& pfi);
952
961 static double getMZ(const Peptidoform& pf, int charge);
962
963 // ---- Non-throwing variants (single-pass, efficient) ----
964
974 static std::optional<double> tryGetMonoWeight(const Peptidoform& pf);
975
985 static std::optional<double> tryGetMonoWeight(const Peptidoform& pf,
986 std::vector<ConversionIssue>& issues_out);
987
995 static std::optional<double> tryGetMonoWeight(const PeptidoformIon& pfi);
996
1004 static std::optional<double> tryGetMonoWeight(const PeptidoformIon& pfi,
1005 std::vector<ConversionIssue>& issues_out);
1006
1014 static std::optional<double> tryGetMZ(const Peptidoform& pf, int charge);
1015
1024 static std::optional<double> tryGetMZ(const Peptidoform& pf, int charge,
1025 std::vector<ConversionIssue>& issues_out);
1026
1033 static std::optional<double> tryGetMZ(const PeptidoformIon& pfi);
1034
1042 static std::optional<double> tryGetMZ(const PeptidoformIon& pfi,
1043 std::vector<ConversionIssue>& issues_out);
1044
1045
1046 //==========================================================================
1047 // Static Methods - Spectrum Generation
1048 //==========================================================================
1049
1059 static bool canGenerateSpectrum(const Peptidoform& pf);
1060
1070 static bool canGenerateSpectrum(const PeptidoformIon& pfi);
1071
1078 static std::vector<ConversionIssue> getSpectrumGenerationIssues(const Peptidoform& pf);
1079
1086 static std::vector<ConversionIssue> getSpectrumGenerationIssues(const PeptidoformIon& pfi);
1087
1107 const Peptidoform& pf,
1108 int min_charge = 1,
1109 int max_charge = 1,
1110 const std::string& ion_types = "by",
1111 bool add_losses = false,
1112 bool add_metainfo = true);
1113
1134 const PeptidoformIon& pfi,
1135 int min_charge = 1,
1136 int max_charge = 1,
1137 const std::string& ion_types = "by",
1138 bool add_losses = false,
1139 bool add_metainfo = true);
1140
1141
1142 //==========================================================================
1143 // Utility Functions
1144 //==========================================================================
1145
1152 static const char* errorCodeToString(ErrorCode code);
1153 }; // class ProForma
1154
1155} // namespace OpenMS
subpage TOPP_TargetedFileConverter Converts targeted feature or consensus feature files subpage TOPP_FileInfo Shows basic information about the file
Definition TOPP.doxygen:44
Representation of a peptide/protein sequence.
Definition AASequence.h:88
Parse Error exception.
Definition Exception.h:593
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
Structured parse error with context for ProForma parsing.
Definition ProForma.h:590
String found_
What was found (optional)
Definition ProForma.h:676
size_t position_
Position in input where error occurred.
Definition ProForma.h:672
const String & getExpected() const noexcept
Get what was expected (if set)
Definition ProForma.h:639
void extractContext_(const String &input, size_t pos)
Extract context snippets from input around the error position.
ParseError(const char *file, int line, const char *function, ErrorCode error_code, size_t error_position, const String &input, const String &message) noexcept
Constructs a ParseError with full context information.
const String & getContextBefore() const noexcept
Get context before error (~20 chars)
Definition ProForma.h:627
const String & getContextAfter() const noexcept
Get context after error (~20 chars)
Definition ProForma.h:633
size_t getPosition() const noexcept
Get byte position of error (0-indexed)
Definition ProForma.h:621
String context_before_
Text before the error position.
Definition ProForma.h:673
const String & getFound() const noexcept
Get what was found (if set)
Definition ProForma.h:645
String expected_
What was expected (optional)
Definition ProForma.h:675
ErrorCode code_
Machine-readable error code.
Definition ProForma.h:671
void setExpectedFound(const String &expected, const String &found)
Set expected/found information for more detailed error messages.
String context_after_
Text after the error position.
Definition ProForma.h:674
ErrorCode getErrorCode() const noexcept
Get the error code for programmatic handling.
Definition ProForma.h:615
String getFormattedMessage() const
Get formatted error message with context visualization.
ProForma v2 peptidoform notation parser and data structures.
Definition ProForma.h:51
static bool canCalculateMass(const PeptidoformIon &pfi)
Check if mass can be calculated for a PeptidoformIon.
CvDatabase database
The source database (UNIMOD, MOD, RESID, XLMOD, or GNO)
Definition ProForma.h:171
ConversionIssueType type
The type of issue.
Definition ProForma.h:157
std::optional< ChargeState > charge
Optional per-chain charge (for chimeric spectra)
Definition ProForma.h:524
ConversionPolicy
Conversion policy for transforming Peptidoform to AASequence.
Definition ProForma.h:64
std::vector< Modification > n_term_mods
N-terminal modifications: [Acetyl]-.
Definition ProForma.h:521
std::vector< LabileModification > labile_mods
Labile modifications: {Glycan:Hex}.
Definition ProForma.h:520
static Peptidoform parse(const String &input)
Parse a ProForma string into a Peptidoform AST.
static void resolveModifications(Peptidoform &pf)
Resolve all modifications in a Peptidoform using ModificationsDB.
static std::optional< double > tryGetMonoWeight(const PeptidoformIon &pfi, std::vector< ConversionIssue > &issues_out)
Try to calculate monoisotopic mass of PeptidoformIon with diagnostics.
static PeptidoformIon peptidoformIonFromJSON(const String &json_str)
Construct a PeptidoformIon from JSON string.
static std::optional< double > tryGetMonoWeight(const PeptidoformIon &pfi)
Try to calculate monoisotopic mass of a PeptidoformIon (non-throwing)
static double getMZ(const Peptidoform &pf, int charge)
Calculate m/z for a Peptidoform at a given charge state.
std::vector< std::pair< ModificationTag, std::optional< Label > > > alternatives
Each alternative is a (tag, optional_label) pair.
Definition ProForma.h:339
static std::optional< double > tryGetMZ(const Peptidoform &pf, int charge, std::vector< ConversionIssue > &issues_out)
Try to calculate m/z for a Peptidoform with diagnostics.
static std::optional< double > tryGetMonoWeight(const Peptidoform &pf)
Try to calculate monoisotopic mass of a Peptidoform (non-throwing)
static double getMZ(const PeptidoformIon &pfi)
Calculate m/z for a PeptidoformIon at its specified charge state.
static bool isRepresentableAsAASequence(const Peptidoform &pf)
Check if a Peptidoform can be fully represented as an AASequence.
std::optional< int > occurrence
Optional occurrence count from ^N suffix.
Definition ProForma.h:414
String isotope
The isotope specification (e.g., "13C", "15N", "D")
Definition ProForma.h:457
std::variant< SequenceElement, AmbiguousRegion, ModifiedRange > SequenceSection
Variant type representing a section of the sequence.
Definition ProForma.h:399
std::variant< CvAccession, NamedMod, MassDelta, FormulaTag, GlycanComposition, InfoTag, PositionConstraint > ModificationTag
Variant type representing any modification tag content.
Definition ProForma.h:297
std::vector< std::pair< Monosaccharide, int > > components
List of (monosaccharide, count) pairs.
Definition ProForma.h:244
static String toString(const PeptidoformIon &pfi, WriteMode mode=WriteMode::LOSSLESS)
Convert a PeptidoformIon AST back to ProForma string notation.
String formula_string
The chemical formula string (e.g., "C12H20O2")
Definition ProForma.h:225
ErrorCode
Error codes for programmatic handling of ProForma parse errors.
Definition ProForma.h:126
static bool canCalculateMass(const Peptidoform &pf)
Check if mass can be calculated for a Peptidoform.
static const char * errorCodeToString(ErrorCode code)
Convert error code to human-readable string.
static std::optional< double > tryGetMonoWeight(const Peptidoform &pf, std::vector< ConversionIssue > &issues_out)
Try to calculate monoisotopic mass with diagnostic information.
WriteMode
Write mode for ProForma string serialization.
Definition ProForma.h:97
std::vector< SequenceSection > sequence
The sequence with modifications.
Definition ProForma.h:522
CvDatabase
Controlled vocabulary database prefix for modification accessions.
Definition ProForma.h:110
String text
The info text content.
Definition ProForma.h:256
static std::optional< double > tryGetMZ(const PeptidoformIon &pfi)
Try to calculate m/z for a PeptidoformIon (non-throwing)
static std::vector< ConversionIssue > getSpectrumGenerationIssues(const Peptidoform &pf)
Get issues preventing spectrum generation for a Peptidoform.
static MSSpectrum generateSpectrum(const PeptidoformIon &pfi, int min_charge=1, int max_charge=1, const std::string &ion_types="by", bool add_losses=false, bool add_metainfo=true)
Generate a theoretical MS/MS spectrum for a PeptidoformIon.
std::optional< int > charge
Optional charge from :z+N suffix.
Definition ProForma.h:226
String description
Human-readable description.
Definition ProForma.h:158
size_t position
Position in sequence (SIZE_MAX if not position-specific)
Definition ProForma.h:159
std::variant< IsotopeReplacement, GlobalModification > GlobalModEntry
Variant type for global modification entries.
Definition ProForma.h:471
static bool canGenerateSpectrum(const Peptidoform &pf)
Check if a theoretical spectrum can be generated for a Peptidoform.
std::optional< CvDatabase > cv_hint
Optional CV prefix hint (U, M, R, X, G)
Definition ProForma.h:185
static PeptidoformIon parseIon(const String &input)
Parse a ProForma string into a PeptidoformIon AST.
Modification modification
The labile modification.
Definition ProForma.h:428
std::vector< String > locations
Target locations ("K", "N-term", "C-term:K", etc.)
Definition ProForma.h:443
static String toString(const Peptidoform &pf, WriteMode mode=WriteMode::LOSSLESS)
Convert a Peptidoform AST back to ProForma string notation.
static String toJSON(const PeptidoformIon &pfi)
Convert a PeptidoformIon to JSON string representation.
std::vector< Modification > modifications
Modifications at this position.
Definition ProForma.h:356
static double getMonoWeight(const Peptidoform &pf)
Calculate monoisotopic mass of a Peptidoform.
static bool canGenerateSpectrum(const PeptidoformIon &pfi)
Check if a theoretical spectrum can be generated for a PeptidoformIon.
String name
The modification name (e.g., "Oxidation", "Phospho")
Definition ProForma.h:186
static double getMonoWeight(const PeptidoformIon &pfi)
Calculate monoisotopic mass of a PeptidoformIon.
static std::vector< ConversionIssue > getMassCalculationIssues(const Peptidoform &pf)
Get issues preventing mass calculation for a Peptidoform.
String accession
The accession identifier (e.g., "35" for UNIMOD:35, full string for GNO)
Definition ProForma.h:172
std::vector< Peptidoform > chains
One or more peptide chains (separated by // or + in ProForma)
Definition ProForma.h:539
std::vector< std::pair< size_t, size_t > > sites
(chain_index, site_index) pairs
Definition ProForma.h:556
std::variant< String, FormulaTag > Monosaccharide
A monosaccharide component: either a name (String) or a custom formula (FormulaTag)
Definition ProForma.h:242
static std::vector< ConversionIssue > getSpectrumGenerationIssues(const PeptidoformIon &pfi)
Get issues preventing spectrum generation for a PeptidoformIon.
static Peptidoform fromAASequence(const AASequence &seq)
Create a Peptidoform from an OpenMS AASequence.
String formula
The adduct formula (e.g., "Na", "H", "K")
Definition ProForma.h:484
std::vector< SequenceElement > elements
The ambiguous amino acid possibilities.
Definition ProForma.h:368
static Peptidoform peptidoformFromJSON(const String &json_str)
Construct a Peptidoform from JSON string.
ConversionIssueType
Issue type for AASequence conversion problems.
Definition ProForma.h:75
static std::optional< double > tryGetMZ(const Peptidoform &pf, int charge)
Try to calculate m/z for a Peptidoform (non-throwing)
static AASequence toAASequence(const Peptidoform &pf, ConversionPolicy policy=ConversionPolicy::FAIL_ON_LOSS)
Convert a Peptidoform to an OpenMS AASequence.
static std::vector< ConversionIssue > getAASequenceConversionIssues(const Peptidoform &pf)
Get a list of all issues that would arise during AASequence conversion.
static MSSpectrum generateSpectrum(const Peptidoform &pf, int min_charge=1, int max_charge=1, const std::string &ion_types="by", bool add_losses=false, bool add_metainfo=true)
Generate a theoretical MS/MS spectrum for a Peptidoform.
int charge
The charge contribution of this adduct.
Definition ProForma.h:485
std::variant< int, std::vector< AdductIon > > ChargeState
Charge state specification.
Definition ProForma.h:500
String label
The cross-link label (e.g., XL1)
Definition ProForma.h:555
static std::optional< double > tryGetMZ(const PeptidoformIon &pfi, std::vector< ConversionIssue > &issues_out)
Try to calculate m/z for a PeptidoformIon with diagnostics.
std::optional< String > name
Optional name from (>name) v2.1 extension.
Definition ProForma.h:517
std::vector< GlobalModEntry > global_mods
Global modifications: <13C>, <[TMT6plex]@K>
Definition ProForma.h:518
std::vector< UnlocalisedMod > unlocalised_mods
Unlocalised modifications: [Phospho]?
Definition ProForma.h:519
static std::vector< ConversionIssue > getMassCalculationIssues(const PeptidoformIon &pfi)
Get issues preventing mass calculation for a PeptidoformIon.
std::vector< char > residues
List of allowed amino acid residues.
Definition ProForma.h:271
static String toJSON(const Peptidoform &pf)
Convert a Peptidoform to JSON string representation.
std::vector< Modification > c_term_mods
C-terminal modifications: -[Amidated].
Definition ProForma.h:523
char amino_acid
Single-letter amino acid code (A-Z)
Definition ProForma.h:355
Adduct ion specification for charge state.
Definition ProForma.h:483
Ambiguous amino acid region.
Definition ProForma.h:367
Description of a conversion issue from Peptidoform to AASequence.
Definition ProForma.h:156
Cross-link group connecting sites across chains.
Definition ProForma.h:554
Controlled vocabulary accession for a modification.
Definition ProForma.h:170
Chemical formula with optional charge.
Definition ProForma.h:224
Global modification applied to specific locations.
Definition ProForma.h:441
Glycan composition specification.
Definition ProForma.h:240
Info tag for arbitrary text annotations.
Definition ProForma.h:255
Isotope replacement for stable isotope labeling.
Definition ProForma.h:456
Labile modification that may be lost during fragmentation.
Definition ProForma.h:427
A modification with one or more alternative tags.
Definition ProForma.h:337
Modified sequence range with shared modifications.
Definition ProForma.h:381
Named modification with optional CV prefix hint.
Definition ProForma.h:184
A single peptidoform (one peptide chain)
Definition ProForma.h:516
A peptidoform ion (one or more chains with optional charge)
Definition ProForma.h:537
Position constraint specifying allowed residues for a modification.
Definition ProForma.h:270
A single amino acid with its modifications.
Definition ProForma.h:354
Unlocalised modification with optional occurrence count.
Definition ProForma.h:412
Representation of a modification on an amino acid residue.
Definition ResidueModification.h:55
A more convenient string class.
Definition String.h:34
@ X
x-ion (C-terminal)
@ UNEXPECTED_CHARACTER
Unexpected character encountered.
@ UNEXPECTED_END_OF_INPUT
Unexpected end of input.
@ UNCLOSED_BRACKET
Opening bracket without matching close.
@ INTERNAL_ERROR
Internal parser error.
@ INVALID_CHARGE
Invalid charge specification.
@ INVALID_FORMULA
Invalid chemical formula.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Label for cross-links, branches, or ambiguous grouping.
Definition ProForma.h:309
Type
The type of label.
Definition ProForma.h:312
std::optional< double > score
Optional localization score for ambiguous labels (e.g., 0.90)
Definition ProForma.h:320
Type type
The label type.
Definition ProForma.h:318
String identifier
The label identifier (e.g., XL1, BRANCH, g1)
Definition ProForma.h:319
Mass delta modification with optional source hint.
Definition ProForma.h:198
Source
Source hint for mass delta values.
Definition ProForma.h:201
double mass
The mass delta value in Daltons.
Definition ProForma.h:212
String original_text
Original text for lossless roundtrip (e.g., "+15.99" vs "+15.9900")
Definition ProForma.h:213