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

Method loadFeatures

src/openms/source/FORMAT/FileHandler.cpp:563–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561 }
562
563 bool FileHandler::loadFeatures(const String& filename, FeatureMap& map, FileTypes::Type force_type)
564 {
565 //determine file type
566 FileTypes::Type type;
567 if (force_type != FileTypes::UNKNOWN)
568 {
569 type = force_type;
570 }
571 else
572 {
573 try
574 {
575 type = getType(filename);
576 }
577 catch ( Exception::FileNotFound& )
578 {
579 return false;
580 }
581 }
582
583 //load right file
584 if (type == FileTypes::FEATUREXML)
585 {
586 FeatureXMLFile().load(filename, map);
587 }
588 else if (type == FileTypes::TSV)
589 {
590 MsInspectFile().load(filename, map);
591 }
592 else if (type == FileTypes::PEPLIST)
593 {
594 SpecArrayFile().load(filename, map);
595 }
596 else if (type == FileTypes::KROENIK)
597 {
598 KroenikFile().load(filename, map);
599 }
600 else
601 {
602 return false;
603 }
604
605 return true;
606 }
607
608 bool FileHandler::storeFeatures(const String& filename, const FeatureMap& map)
609 {

Callers 6

testFeatureXMLFileFunction · 0.95
fileChanged_Method · 0.80
main_Method · 0.80
main_Method · 0.80
preprocessingSiriusMethod · 0.80

Calls 2

getTypeFunction · 0.85
loadMethod · 0.45

Tested by 1

testFeatureXMLFileFunction · 0.76