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

Method readOutHeader

src/openms/source/FORMAT/SequestOutfile.cpp:734–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732 }
733
734 void SequestOutfile::readOutHeader(
735 const String& result_filename,
736 DateTime& datetime,
737 double& precursor_mz_value,
738 Int& charge,
739 Size& precursor_mass_type,
740 Size& ion_mass_type,
741 Size& displayed_peptides,
742 String& sequest,
743 String& sequest_version,
744 String& database_type,
745 Int& number_column,
746 Int& rank_sp_column,
747 Int& id_column,
748 Int& mh_column,
749 Int& delta_cn_column,
750 Int& xcorr_column,
751 Int& sp_column,
752 Int& sf_column,
753// Int& P_column,
754 Int& ions_column,
755 Int& reference_column,
756 Int& peptide_column,
757 Int& score_column,
758 Size& number_of_columns)
759 {
760 charge = 0;
761 precursor_mz_value = 0.0;
762 precursor_mass_type = ion_mass_type = 0;
763
764 // open the result
765 ifstream result_file(result_filename.c_str());
766 if (!result_file)
767 {
768 throw Exception::FileNotFound(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, result_filename);
769 }
770
771 String line, buffer;
772 vector<String> substrings;
773
774 // get the date and time
775 DateTime datetime_empty;
776 datetime.clear();
777 datetime_empty.clear();
778
779 while (getline(result_file, line))
780 {
781 if (!line.empty() && (line[line.length() - 1] < 33))
782 {
783 line.resize(line.length() - 1);
784 }
785 line.trim();
786 line.split(',', substrings);
787
788 if (line.hasSuffix(".out")) // next line is the sequest version
789 {
790 // \\bude\langwisc\temp\Inspect_Sequest.mzXML.13.1.d.out
791 // TurboSEQUEST v.27 (rev. 12), (c) 1998-2005

Callers

nothing calls this directly

Calls 15

hasSubstringMethod · 0.80
substrMethod · 0.80
toUpperMethod · 0.80
toFloatMethod · 0.80
toIntMethod · 0.80
setDateMethod · 0.80
setTimeMethod · 0.80
StringClass · 0.50
clearMethod · 0.45
emptyMethod · 0.45
resizeMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected