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

Method loadParentSequences_

src/openms/source/FORMAT/OMSFileLoad.cpp:421–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420
421 void OMSFileLoad::loadParentSequences_(IdentificationData& id_data)
422 {
423 if (!db_->tableExists("ID_ParentSequence")) return;
424
425
426 SQLite::Statement query(*db_, "SELECT * FROM ID_ParentSequence");
427 // @TODO: can we combine handling of meta info and applied processing steps?
428 SQLite::Statement subquery_info(*db_, "");
429 bool have_meta_info = prepareQueryMetaInfo_(subquery_info,
430 "ID_ParentSequence");
431 SQLite::Statement subquery_step(*db_, "");
432 bool have_applied_steps =
433 prepareQueryAppliedProcessingStep_(subquery_step, "ID_ParentSequence");
434
435 while (query.executeStep())
436 {
437 String accession = query.getColumn("accession").getString();
438 ID::ParentSequence parent(accession);
439 int molecule_type_index = query.getColumn("molecule_type_id").getInt() - 1;
440 parent.molecule_type = ID::MoleculeType(molecule_type_index);
441 parent.sequence = query.getColumn("sequence").getString();
442 parent.description = query.getColumn("description").getString();
443 parent.coverage = query.getColumn("coverage").getDouble();
444 parent.is_decoy = query.getColumn("is_decoy").getInt();
445 Key id = query.getColumn("id").getInt64();
446 if (have_meta_info)
447 {
448 handleQueryMetaInfo_(subquery_info, parent, id);
449 }
450 if (have_applied_steps)
451 {
452 handleQueryAppliedProcessingStep_(subquery_step, parent, id);
453 }
454 ID::ParentSequenceRef ref = id_data.registerParentSequence(parent);
455 parent_sequence_refs_[id] = ref;
456 }
457 }
458
459
460 void OMSFileLoad::loadParentGroupSets_(IdentificationData& id_data)

Callers

nothing calls this directly

Calls 4

tableExistsMethod · 0.80
getStringMethod · 0.80
MoleculeTypeEnum · 0.50

Tested by

no test coverage detected