| 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 |
nothing calls this directly
no test coverage detected