Example program for retrieving search parameter data.
#include "msparser.hpp"
#include <iostream>
#include <iomanip>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if (argc == 2)
{
{
searchParameters(file);
}
else
}
else
std::cout << "Must supply the name of a .dat file as a command line argument" << std::endl;
return 0;
}
{
std::cout << "Search parameters from ms_searchparams" << std::endl;
std::cout << "=========================================" << std::endl;
std::cout << "License : " << p.getLICENSE() << std::endl;
std::cout << "Search title : " << p.getCOM() << std::endl;
std::cout << "SEG mass : " << p.getSEG() << std::endl;
std::cout << "Peptide tol : " << p.getTOL() << std::endl;
std::cout << "Peptide tol units : " << p.getTOLU() << std::endl;
std::cout << "Fragment tol : " << p.getITOL() << std::endl;
std::cout << "Fragment tol units : " << p.getITOLU() << std::endl;
std::cout << "Missed cleavages : " << p.getPFA() << std::endl;
std::cout << "Database : " << p.getDB() << std::endl;
std::cout << "Static mods : " << p.getMODS() << std::endl;
std::cout << "Average/monoisotopic: " << p.getMASS() << std::endl;
std::cout << "Enzyme : " << p.getCLE() << std::endl;
std::cout << "Raw data file name : " << p.getFILENAME() << std::endl;
std::cout << "Input data : " << p.getQUE() << std::endl;
std::cout << "Type of search : " << p.getSEARCH() << std::endl;
std::cout << "User name : " << p.getUSERNAME() << std::endl;
std::cout << "User email : " << p.getUSEREMAIL() << std::endl;
std::cout << "Charge state : " << p.getCHARGE() << std::endl;
std::cout << "Repeat search file : " << p.getINTERMEDIATE() << std::endl;
std::cout << "Num hits to display : " << p.getREPORT() << std::endl;
std::cout << "Show overview : " << p.getOVERVIEW() << std::endl;
std::cout << "Data file format : " << p.getFORMAT() << std::endl;
std::cout << "Form version : " << p.getFORMVER() << std::endl;
std::cout << "Variable mods : " << p.getIT_MODS() << std::endl;
for (int u=0; u <=12; u++)
std::cout << "User"
<< std::setw(2) << std::setfill('0') << u
<< " : " << p.getUSERField(u) << std::endl;
std::cout << "Precursor mass : " << p.getPRECURSOR() << std::endl;
std::cout << "Taxonomy filter : " << p.getTAXONOMY() << std::endl;
std::cout << "Type of report : " << p.getREPTYPE() << std::endl;
std::cout << "Accessions to search: " << p.getACCESSION() << std::endl;
std::cout << "Subcluster used : " << p.getSUBCLUSTER() << std::endl;
std::cout << "ICAT search? : " << p.getICAT() << std::endl;
std::cout << "Instrument type : " << p.getINSTRUMENT() << std::endl;
std::cout << "Error tolerant? : " << p.getERRORTOLERANT() << std::endl;
std::cout << "Rules (ions series) : " << p.getRULES() << std::endl;
std::cout << "Quantitation method : " << p.getQUANTITATION() << std::endl;
std::cout << "Peptide isotope err : " << p.getPEP_ISOTOPE_ERROR() << std::endl;
std::cout << "Decoy database : " << p.getDECOY() << std::endl;
for (char ch='A'; ch <= 'Z'; ch++)
{
std::cout << "Residue " << ch << " : "
<< p.getResidueMass(ch)
<< std::endl;
}
std::cout << "C terminus mass : " << p.getCTermMass() << std::endl;
std::cout << "N terminus mass : " << p.getNTermMass() << std::endl;
std::cout << "Mass of hydrogen : " << p.getHydrogenMass() << std::endl;
std::cout << "Mass of oxygen : " << p.getOxygenMass() << std::endl;
std::cout << "Mass of carbon : " << p.getCarbonMass() << std::endl;
std::cout << "Mass of nitrogen : " << p.getNitrogenMass() << std::endl;
std::cout << "Mass of electron : " << p.getElectronMass() << std::endl;
int i = 1;
while (p.getVarModsName(i).length())
{
std::cout << "Variable mod name : " << p.getVarModsName(i) << std::endl;
std::cout << "Variable mod delta : " << p.getVarModsDelta(i) << std::endl;
std::cout << "Variable mod neutral: " << p.getVarModsNeutralLoss(i)<< std::endl;
i++;
}
std::cout << std::endl << 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
This class encapsulates the search parameters in the Mascot results file.
Definition: ms_searchparams.hpp:47