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

Method loadAndCleanupIDFile_

src/topp/ProteomicsLFQ.cpp:772–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770 }
771
772 ExitCodes loadAndCleanupIDFile_(
773 const String& id_file_abs_path,
774 const String& mz_file,
775 const String& in_db,
776 const Size& fraction_group,
777 const Size& fraction,
778 vector<ProteinIdentification>& protein_ids,
779 vector<PeptideIdentification>& peptide_ids,
780 set<String>& fixed_modifications, // adds to
781 set<String>& variable_modifications) // adds to
782 {
783
784 const String& mz_file_abs_path = File::absolutePath(mz_file);
785 IdXMLFile().load(id_file_abs_path, protein_ids, peptide_ids);
786
787 ExitCodes e = checkSingleRunPerID_(protein_ids, id_file_abs_path);
788 if (e != EXECUTION_OK) return e;
789
790 // Re-index
791 if (!in_db.empty())
792 {
793 PeptideIndexing indexer;
794 Param param_pi = indexer.getParameters();
795 param_pi.setValue("missing_decoy_action", "silent");
796 param_pi.setValue("write_protein_sequence", "true");
797 param_pi.setValue("write_protein_description", "true");
798 indexer.setParameters(param_pi);
799
800 // stream data in fasta file
801 FASTAContainer<TFI_File> fasta_db(in_db);
802 PeptideIndexing::ExitCodes indexer_exit = indexer.run(fasta_db, protein_ids, peptide_ids);
803
804 picked_decoy_string_ = indexer.getDecoyString();
805 picked_decoy_prefix_ = indexer.isPrefix();
806 if ((indexer_exit != PeptideIndexing::EXECUTION_OK) &&
807 (indexer_exit != PeptideIndexing::PEPTIDE_IDS_EMPTY))
808 {
809 if (indexer_exit == PeptideIndexing::DATABASE_EMPTY)
810 {
811 return INPUT_FILE_EMPTY;
812 }
813 else if (indexer_exit == PeptideIndexing::UNEXPECTED_RESULT)
814 {
815 return UNEXPECTED_RESULT;
816 }
817 else
818 {
819 return UNKNOWN_ERROR;
820 }
821 }
822 }
823
824 e = switchScoreType_(peptide_ids, id_file_abs_path);
825 if (e != EXECUTION_OK) return e;
826
827 // TODO we could think about removing this limitation but it gets complicated quickly
828 IDFilter::keepBestPeptideHits(peptide_ids, false); // strict = false
829

Callers

nothing calls this directly

Calls 15

setParametersMethod · 0.80
isPrefixMethod · 0.80
hasSubstringMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
StringClass · 0.50
loadMethod · 0.45
emptyMethod · 0.45
getParametersMethod · 0.45
setValueMethod · 0.45
runMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected