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

Method getPrecursorRTandMZ

src/openms/source/FORMAT/InspectOutfile.cpp:536–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534 }
535
536 void
537 InspectOutfile::getPrecursorRTandMZ(
538 const vector<pair<String, vector<pair<Size, Size> > > >& files_and_peptide_identification_with_scan_number,
539 vector<PeptideIdentification>& ids)
540 {
541 PeakMap experiment;
542 String type;
543
544 for (vector<pair<String, vector<pair<Size, Size> > > >::const_iterator fs_i = files_and_peptide_identification_with_scan_number.begin(); fs_i != files_and_peptide_identification_with_scan_number.end(); ++fs_i)
545 {
546 getExperiment(experiment, type, fs_i->first); // may throw an exception if the filetype could not be determined
547
548 if (experiment.size() < fs_i->second.back().second)
549 {
550 throw Exception::ParseError(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "Not enough scans in file! (" + String(experiment.size()) + " available, should be at least " + String(fs_i->second.back().second) + ")", fs_i->first);
551 }
552
553 for (vector<pair<Size, Size> >::const_iterator pi_scan_i = fs_i->second.begin(); pi_scan_i != fs_i->second.end(); ++pi_scan_i)
554 {
555 ids[pi_scan_i->first].setMZ(experiment[pi_scan_i->second - 1].getPrecursors()[0].getMZ());
556 ids[pi_scan_i->first].setRT(experiment[pi_scan_i->second - 1].getRT());
557 }
558 }
559 }
560
561 void
562 InspectOutfile::compressTrieDB(

Callers 1

Calls 11

getExperimentFunction · 0.85
backMethod · 0.80
getPrecursorsMethod · 0.80
StringClass · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
setMZMethod · 0.45
getMZMethod · 0.45
setRTMethod · 0.45
getRTMethod · 0.45

Tested by

no test coverage detected