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

Method getSearchEngineAndVersion

src/openms/source/FORMAT/InspectOutfile.cpp:1121–1137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1119 }
1120
1121 bool
1122 InspectOutfile::getSearchEngineAndVersion(
1123 const String& cmd_output,
1124 ProteinIdentification& protein_identification)
1125 {
1126 protein_identification.setSearchEngine("InsPecT");
1127 protein_identification.setSearchEngineVersion("unknown");
1128 // searching for something like this: InsPecT version 20060907, InsPecT version 20100331
1129 QString response(cmd_output.toQString());
1130 QRegExp rx("InsPecT (version|vesrion) (\\d+)"); // older versions of InsPecT have typo...
1131 if (rx.indexIn(response) == -1)
1132 {
1133 return false;
1134 }
1135 protein_identification.setSearchEngineVersion(String(rx.cap(2)));
1136 return true;
1137 }
1138
1139 void
1140 InspectOutfile::readOutHeader(

Callers 2

Calls 4

setSearchEngineMethod · 0.80
StringClass · 0.50
toQStringMethod · 0.45

Tested by

no test coverage detected