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

Method loadObservations_

src/openms/source/FORMAT/OMSFileLoad.cpp:394–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394 void OMSFileLoad::loadObservations_(IdentificationData& id_data)
395 {
396 if (!db_->tableExists("ID_Observation")) return;
397
398
399 SQLite::Statement query(*db_, "SELECT * FROM ID_Observation");
400 SQLite::Statement subquery_info(*db_, "");
401 bool have_meta_info = prepareQueryMetaInfo_(subquery_info,
402 "ID_Observation");
403
404 while (query.executeStep())
405 {
406 auto input_file_id = query.getColumn("input_file_id");
407 ID::Observation obs(query.getColumn("data_id").getString(),
408 input_file_refs_[input_file_id.getInt64()]);
409 auto rt = query.getColumn("rt");
410 if (!rt.isNull()) obs.rt = rt.getDouble();
411 auto mz = query.getColumn("mz");
412 if (!mz.isNull()) obs.mz = mz.getDouble();
413 Key id = query.getColumn("id").getInt64();
414 if (have_meta_info) handleQueryMetaInfo_(subquery_info, obs, id);
415 ID::ObservationRef ref = id_data.registerObservation(obs);
416 observation_refs_[id] = ref;
417 }
418 }
419
420
421 void OMSFileLoad::loadParentSequences_(IdentificationData& id_data)

Callers

nothing calls this directly

Calls 4

tableExistsMethod · 0.80
getStringMethod · 0.80
registerObservationMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected