Example program for retrieving input spectrum data.
#include "msparser.hpp"
#include <iostream>
#include <vector>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if (argc == 2)
{
{
inputData(file);
}
else
}
else
std::cout << "Must supply the name of a .dat file as a command line argument" << std::endl;
return 0;
}
{
for (int i = 1; i <= 1 ; i++)
{
std::cout << "Input data for query number " << i << std::endl;
std::cout << "=========================================" << std::endl;
std::cout << " title : " << q.getStringTitle(1).c_str()<< std::endl;
std::cout << " mass_min : " << q.getMassMin() << std::endl;
std::cout << " mass_max : " << q.getMassMax() << std::endl;
std::cout << " int_min : " << q.getIntMin() << std::endl;
std::cout << " int_max : " << q.getIntMax() << std::endl;
std::cout << " num_vals : " << q.getNumVals() << std::endl;
std::cout << " num_used1 : " << q.getNumUsed() << std::endl;
std::cout << " ions1 : " << q.getStringIons1().c_str() << std::endl;
std::cout << " ions2 : " << q.getStringIons2().c_str() << std::endl;
std::cout << " ions3 : " << q.getStringIons3().c_str() << std::endl;
std::cout << " peptol : " << q.getPepTol() << std::endl;
std::cout << " peptol units: " << q.getPepTolUnits().c_str() << std::endl;
std::cout << " peptol str : " << q.getPepTolString().c_str()<< std::endl;
std::cout << " INSTRUMENT : " << q.getINSTRUMENT().c_str() << std::endl;
std::cout << " RULES : " << q.getRULES().c_str() << std::endl;
std::cout << " IT_MODS : " << q.getIT_MODS().c_str() << std::endl;
std::vector< std::pair< double, double > > tmp = q.getPeakList(1);
for (unsigned int j=0; j < tmp.size(); j++)
{
std::cout << tmp[j].first << ", " << tmp[j].second << std::endl;
}
}
std::cout << std::endl;
}
bool isValid() const
Call this function to determine if there have been any errors.
Definition: ms_errors.cpp:1472
Abstract base class of ms_mascotresfile_dat and ms_mascotresfile_msr.
Definition: ms_mascotresfilebase.hpp:72
std::string getLastErrorString() const
Return the last error number - or an empty string.
Definition: ms_mascotresfilebase.cpp:824
virtual std::string getRepeatSearchString(const int query, const bool fullQuery=false) const =0
To perform a repeat search need to build up appropriate string.