| 153 | } |
| 154 | |
| 155 | void FragmentMassError::calculateVariance_(FragmentMassError::Statistics& result, const PeptideIdentification& pep_id, const UInt num_ppm) |
| 156 | { |
| 157 | if (pep_id.getHits().empty()) |
| 158 | { |
| 159 | OPENMS_LOG_WARN << "There is a Peptideidentification(RT: " << pep_id.getRT() << ", MZ: " << pep_id.getMZ() << ") without PeptideHits. " |
| 160 | << "\n"; |
| 161 | return; |
| 162 | } |
| 163 | for (const auto& ppm : (pep_id.getHits()[0].getMetaValue("fragment_mass_error_ppm")).toDoubleList()) |
| 164 | { |
| 165 | double tmp = ppm - result.average_ppm; |
| 166 | result.variance_ppm += (tmp * tmp / num_ppm); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void FragmentMassError::compute(FeatureMap& fmap, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum, ToleranceUnit tolerance_unit, double tolerance) |
| 171 | { |
nothing calls this directly
no test coverage detected