Read in the masses file.
#include "msparser.hpp"
#include <iostream>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if ( argc < 2 )
{
std::cout << "The location of masses file has to be specified as a parameter" << std::endl;
std::cout << "The location should either be the full path to the masses file" << std::endl;
std::cout << "or a URL to a Mascot server - e.g. http://mascot-server/mascot/cgi" << std::endl;
return 1;
}
if (argc > 2)
{
}
{
std::cout << "There are errors. Cannot continue. The last error description:" << std::endl;
return 1;
}
std::cout << "Average amino acid masses as read from 'masses' file:" << std::endl;
int i;
for(i='A'; i <= 'Z'; i++)
{
std::cout << (char)i <<
": " << file.
getResidueMass(MASS_TYPE_AVE, i) << std::endl;
}
return 0;
}
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
void setSessionID(const std::string sessionID)
Sets the Mascot security sessionID to be used for the connection.
Definition: ms_connection_settings.cpp:242
std::string getLastErrorString() const
Return the error description of the last error that occurred.
Definition: ms_errors.cpp:1488
bool isValid() const
Call this function to determine if there have been any errors.
Definition: ms_errors.cpp:1472
Reads and parses the masses file with residue and atom masses.
Definition: ms_masses.hpp:48
double getResidueMass(const matrix_science::MASS_TYPE massType, const char residue) const
Returns a mass for a given amino acid.
Definition: ms_masses.cpp:872