Example program for retrieving general search information.
#include "msparser.hpp"
#include <iostream>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if (argc == 2)
{
{
searchInformation(file);
}
else
}
else
std::cout << "Must supply the name of a .dat file as a command line argument" << std::endl;
return 0;
}
{
struct tm * t1 = localtime(&t);
std::cout << "Search information from ms_mascotresfilebase" << std::endl;
std::cout << "========================================" << std::endl;
std::cout <<
"Number of queries : " << file.
getNumQueries() << std::endl;
std::cout <<
"Number of sequences : " << file.
getNumSeqs() << std::endl;
<< std::endl;
std::cout <<
"Number of residues : " << file.
getNumResidues() << std::endl;
std::cout <<
"Execution time : " << file.
getExecTime() << std::endl;
std::cout <<
"Date (seconds) : " << file.
getDate() << std::endl;
std::cout << "Date : " << asctime(t1);
std::cout <<
"Mascot version : " << file.
getMascotVer() << std::endl;
std::cout <<
"Fasta version : " << file.
getFastaVer() << std::endl;
std::cout <<
"Is PMF? : " << file.
isPMF() << std::endl;
std::cout <<
"Is MSMS? : " << file.
isMSMS() << std::endl;
std::cout <<
"Is SQ? : " << file.
isSQ() << std::endl;
std::cout <<
"Any PMF? : " << file.
anyPMF() << std::endl;
std::cout <<
"Any MSMS? : " << file.
anyMSMS() << std::endl;
std::cout <<
"Any SQ? : " << file.
anySQ() << std::endl;
<< 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
virtual int getExecTime() const =0
Returns the time taken for the search.
std::string getLastErrorString() const
Return the last error number - or an empty string.
Definition: ms_mascotresfilebase.cpp:824
virtual bool anyFastaMatches(const bool isDecoy=false) const =0
Returns true if there are any FASTA matches.
virtual int getDate() const =0
Returns the date and time of the search in seconds since midnight January 1st 1970.
virtual double getNumResidues(const int idx=0) const =0
Returns the number of residues in the FASTA file(s) searched.
virtual int getNumSeqs(const int idx=0) const =0
Returns the number of sequences in the FASTA file(s) searched.
virtual int getNumSeqsAfterTax(const int idx=0) const =0
Returns the number of sequences that passed the taxonomy filter in the FASTA file(s) searched.
virtual bool anyMSMS() const =0
Returns true if any of the queries in the search contain ions data.
virtual bool isPMF() const =0
Returns true if the search was a PMF search (SEARCH=PMF).
virtual std::string getMascotVer() const =0
Returns the version of Mascot used to perform the search.
virtual bool isMSMS() const =0
Returns true if the search was an MSMS search (SEARCH=MIS).
virtual bool isErrorTolerant() const =0
Returns true if the search was an error tolerant search.
virtual bool isSQ() const =0
Returns true if the search was a sequence query search (SEARCH=SQ).
virtual std::string getFastaVer(int idx=1) const =0
Returns the FASTA file version.
virtual bool anyPMF() const =0
Returns true if any of the queries in the search just contain a single peptide mass.
virtual int getNumQueries(const int resfileID=0) const =0
Returns the number of queries (peptide masses or ms-ms spectra).
virtual bool anySQ() const =0
Returns true if any of the queries in the search contain seq or comp commands.