Read in the enzymes file.
#include "msparser.hpp"
#include <iostream>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if ( argc < 2 )
{
std::cout << "The location of enzymes file has to be specified as a parameter" << std::endl;
std::cout << "The location should either be the full path to the enzymes 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 << "There are " << n << " enzymes definitions available" << std::endl;
int i;
for(i=0; i < n ; i++)
{
std::cout << enzyme->
getTitle() <<
": ";
std::cout << "nTerm - ";
} else {
std::cout << "cTerm - ";
}
std::cout << "; ";
}
std::cout << std::endl;
}
std::cout << "Deleted the enzyme V8-DE " << std::endl;
}
if (strncmp("http:", argv[1], 5) != 0) {
std::string filename = argv[1];
filename += ".new";
}
std::cout <<
"There are now " << file.
getNumberOfEnzymes() <<
" enzymes definitions available" << 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
Represent a single entry in the enzymes file.
Definition: ms_enzyme.hpp:67
int getNumberOfCutters() const
Returns the number of cutters.
Definition: ms_enzyme.cpp:454
std::string getCleave(const int cutterNum) const
Returns the list of cleavage points for a cutter.
Definition: ms_enzyme.cpp:593
std::string getRestrict(const int cutterNum) const
Returns the list of restriction points for a cutter.
Definition: ms_enzyme.cpp:632
ms_enzyme::cuttertype getCutterType(const int cutterNum) const
Return the number of cutters that make up the enzyme definition.
Definition: ms_enzyme.cpp:573
@ NTERM_CUTTER
N Terminus cutter - cuts before the specified residue(s).
Definition: ms_enzyme.hpp:78
std::string getTitle() const
Returns a name of the enzyme as appears in the file.
Definition: ms_enzyme.cpp:318
void setSemiSpecific(const bool value)
Sets a new value for the semi specific flag.
Definition: ms_enzyme.cpp:380
Reads and parses the enzymes file that contains multiple enzyme definitions.
Definition: ms_enzyme.hpp:194
void save_file()
Stores enzyme definitions in a file.
Definition: ms_enzyme.cpp:1442
int getNumberOfEnzymes() const
Returns a number of enzymes successfully read from the file.
Definition: ms_enzyme.cpp:910
bool updateEnzymeByNumber(const int num, const ms_enzyme enzyme)
Update the information for a specific enzyme.
Definition: ms_enzyme.cpp:936
void setFileName(const char *filename)
Call this member before reading the file if you want to specify a non-default name.
Definition: ms_enzyme.cpp:868
const ms_enzyme * getEnzymeByNumber(const int num) const
Returns a pointer to an internally stored enzyme.
Definition: ms_enzyme.cpp:921
bool deleteEnzymeByName(const char *name)
Remove an enzyme from the list in memory.
Definition: ms_enzyme.cpp:1016
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