MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / startElement

Method startElement

src/openms/source/FORMAT/PepXMLFileMascot.cpp:66–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 void PepXMLFileMascot::startElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname, const xercesc::Attributes & attributes)
67 {
68 String element = sm_.convert(qname);
69
70 //cout << "Start: " << element << "\n";
71
72 //SEARCH PARAMETERS
73 if (element == "aminoacid_modification")
74 {
75 String temp_string = attributeAsString_(attributes, "variable");
76 if (temp_string == "Y")
77 {
78 variable_modifications_.emplace_back(attributeAsString_(attributes, "description"),
79 attributeAsDouble_(attributes, "mass"));
80 }
81 else
82 {
83 fixed_modifications_.push_back(attributeAsString_(attributes, "description"));
84 }
85 }
86
87 // <terminal_modification terminus="n" massdiff="+108.05" mass="109.06" variable="N" protein_terminus="" description="dNIC (N-term)"/>
88 if (element == "terminal_modification")
89 {
90 String temp_string = attributeAsString_(attributes, "variable");
91 if (temp_string == "Y")
92 {
93 variable_modifications_.emplace_back(attributeAsString_(attributes, "description"),
94 attributeAsDouble_(attributes, "mass"));
95
96 }
97 else
98 {
99 fixed_modifications_.push_back(attributeAsString_(attributes, "description"));
100 }
101 }
102 //PEPTIDES
103 else if (element == "spectrum_query")
104 {
105 actual_title_ = attributeAsString_(attributes, "spectrum");
106 }
107 else if (element == "search_hit")
108 {
109 actual_sequence_ = attributeAsString_(attributes, "peptide");
110 }
111 else if (element == "mod_aminoacid_mass")
112 {
113 String temp_description = "";
114 UInt modification_position = attributeAsInt_(attributes, "position");
115 double modification_mass = attributeAsDouble_(attributes, "mass");
116
117 matchModification_(modification_mass, temp_description);
118
119 // the modification position is 1-based
120 actual_modifications_.emplace_back(temp_description, modification_position);
121 }
122 }
123

Callers

nothing calls this directly

Calls 6

attributeAsString_Function · 0.85
attributeAsDouble_Function · 0.85
attributeAsInt_Function · 0.85
emplace_backMethod · 0.80
convertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected