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

Method storeFeatures

src/openms/source/FORMAT/FileHandler.cpp:608–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606 }
607
608 bool FileHandler::storeFeatures(const String& filename, const FeatureMap& map)
609 {
610 //determine file type
611 FileTypes::Type type;
612 try
613 {
614 type = getType(filename);
615 }
616 catch ( Exception::FileNotFound& )
617 {
618 return false;
619 }
620
621 //store right file
622 if (type == FileTypes::FEATUREXML)
623 {
624 FeatureXMLFile().store(filename, map);
625 }
626 else if (type == FileTypes::TSV)
627 {
628 MsInspectFile().store(filename, map);
629 }
630 else if (type == FileTypes::PEPLIST)
631 {
632 SpecArrayFile().store(filename, map);
633 }
634 else if (type == FileTypes::KROENIK)
635 {
636 KroenikFile().store(filename, map);
637 }
638 else
639 {
640 OPENMS_LOG_WARN << "Can not store features to " << filename << ". Unknown file extension" << endl;
641 return false;
642 }
643
644 return true;
645 }
646
647 bool FileHandler::storeConsensusFeatures(const String& filename, const ConsensusMap& map)
648 {

Callers 6

main_Method · 0.80
computeMethod · 0.80
postProcess_Method · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 2

getTypeFunction · 0.85
storeMethod · 0.45

Tested by

no test coverage detected