Read in the mascot.dat file.
#include "msparser.hpp"
#include <iostream>
using namespace matrix_science;
int main(int argc, char * argv[])
{
if ( argc < 2 )
{
std::cout << "The location of mascot.dat file has to be specified as a parameter" << std::endl;
std::cout << "The location should either be the full path to the mascot.dat 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 << " databases configured:" << std::endl;
int i;
for(i=0; i < n; i++)
{
std::cout << std::endl;
}
}
else
{
std::cout << "Databases-section is missing" << std::endl;
}
std::cout << std::endl;
{
std::cout << "Parse rules configured:" << std::endl;
int i;
for(i=0; i < n; i++)
{
{
std::cout << "Rule_" << i << " : ";
std::cout << std::endl;
}
}
}
else
{
std::cout << "Parse-section is missing" << std::endl;
}
std::cout << std::endl;
{
std::cout << "There are " << n << " sequence report sources configured:" << std::endl;
int i;
for(i=0; i < n; i++)
{
std::cout << ((wwwOptions->
getEntry(i)->
getType() == WWW_SEQ) ?
"SEQ" :
"REP");
std::cout << std::endl;
}
}
else
{
std::cout << "WWW-section is missing" << std::endl;
}
std::cout << std::endl;
std::cout << "Available taxonomy sources:" << std::endl;
int taxind;
for(taxind = 1; taxind <= maxtax; taxind++)
{
{
std::cout << "TAXONOMY_" << taxind;
std::cout << std::endl;
}
}
std::cout << std::endl;
{
std::cout << "Cluster mode : ";
std::cout << (clusterParams->
isEnabled() ?
"enabled" :
"disabled");
std::cout << std::endl;
}
else
{
std::cout << "Cluster-section is missing" << std::endl;
}
std::cout << std::endl;
{
std::cout << std::endl;
}
else
{
std::cout << "Processor-section is missing" << std::endl;
}
std::cout << std::endl;
{
std::cout << "MascotCmdLine : ";
std::cout << std::endl;
}
else
{
std::cout << "Options-section is missing" << std::endl;
}
std::cout << std::endl;
{
{
std::cout << "There are " << n << " cron-jobs configured:" << std::endl;
int i;
for(i=0; i < n; i++)
{
}
}
else
{
std::cout << "Cron functionality is disabled" << std::endl;
}
}
else
{
std::cout << "Cron-section is missing" << std::endl;
}
std::cout << std::endl;
return 0;
}
An instance of this class represents all the parameters specified in the Cluster section of mascot....
Definition: ms_clusterparams.hpp:72
bool isEnabled() const
Returns TRUE if Enabled parameter is set to 1 and FALSE otherwise.
Definition: ms_clusterparams.cpp:131
bool isSectionAvailable() const
Check whether the section has been actually read from the file.
Definition: ms_clusterparams.cpp:113
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 getCommandStr() const
Returns a string that is executed by the shell (command prompt) at the specified times.
Definition: ms_cronoptions.cpp:249
Contains parameters from the cron section of mascot.dat.
Definition: ms_cronoptions.hpp:150
bool isCronEnabled() const
Returns true if parameter CronEnabled is set to 1 and false otherwise.
Definition: ms_cronoptions.cpp:452
const ms_cronjob getCronJob(const int idx) const
Returns an object describing a single cron job by its number.
Definition: ms_cronoptions.cpp:495
int getNumberOfCronJobs() const
Returns the total number of cron-jobs configured.
Definition: ms_cronoptions.cpp:475
bool isSectionAvailable() const
Returns TRUE if the section was actually read from a file.
Definition: ms_cronoptions.cpp:431
bool isActive() const
Returns true if the database definition is active and false otherwise.
Definition: ms_databaseoptions.cpp:91
std::string getName() const
Returns the value of Name.
Definition: ms_databaseoptions.cpp:123
An instance of this class represents the Databases section of mascot.dat.
Definition: ms_databaseoptions.hpp:225
const ms_databaseoptions * getDatabase(const int index) const
Returns a database definition by its number.
Definition: ms_databaseoptions.cpp:611
int getNumberOfDatabases() const
Returns the total number of database definitions including inactive (commented out) databases.
Definition: ms_databaseoptions.cpp:600
bool isSectionAvailable() const
Check if the section has been actually read form the file or have to be saved.
Definition: ms_databaseoptions.cpp:585
Encapsulates the mascot.dat file that contains the most important parameters.
Definition: ms_datfile.hpp:47
const ms_processoroptions * getProcessors() const
Returns an instance of the class representing the Processors section.
Definition: ms_datfile.cpp:2219
const ms_cronoptions * getCronOptions() const
Returns an instance of the class representing the Cron section.
Definition: ms_datfile.cpp:2256
const ms_parseoptions * getParseOptions() const
Returns an instance of the class representing the PARSE section.
Definition: ms_datfile.cpp:2145
const ms_mascotoptions * getMascotOptions() const
Returns an instance of the class representing the Options section.
Definition: ms_datfile.cpp:2071
const ms_taxonomyrules * getTaxonomyRules(const int idx) const
Returns an instance of the class representing one of the Taxonomy_XXX sections.
Definition: ms_datfile.cpp:2376
const ms_databases * getDatabases() const
Returns an instance of the class representing the Databases section.
Definition: ms_datfile.cpp:2016
const ms_clusterparams * getClusterParams() const
Returns an instance of the class representing the Cluster section.
Definition: ms_datfile.cpp:2293
const ms_wwwoptions * getWWWOptions() const
Returns an instance of the class representing the WWW section.
Definition: ms_datfile.cpp:2182
int getMaxTaxonomyRules() const
Returns a maximum possible Taxonomy section number that can be used to retrieve/set the section conte...
Definition: ms_datfile.cpp:2421
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
An instance of this class represents all the parameters specified in the Options section of mascot....
Definition: ms_mascotoptions.hpp:91
std::string getMascotCmdLine() const
Returns the value of MascotCmdLine.
Definition: ms_mascotoptions.cpp:872
bool isSectionAvailable() const
Indicates whether the section has been actually read from the file.
Definition: ms_mascotoptions.cpp:569
Represents the PARSE section of mascot.dat.
Definition: ms_parserule.hpp:102
int getNumberOfParseRules() const
Can be used to get upper limit for a parse rule number.
Definition: ms_parserule.cpp:289
const ms_parserule * getParseRule(const int index) const
Returns a parse rule by number.
Definition: ms_parserule.cpp:252
bool isSectionAvailable() const
Check whether the section has been actually read from the file.
Definition: ms_parserule.cpp:232
bool isAvailable() const
Call this member to check if this rule has been specified in the file or just a placeholder.
Definition: ms_parserule.cpp:89
std::string getRuleStr() const
Returns a string representing the rule.
Definition: ms_parserule.cpp:103
An instance of this class represents all the parameters specified in the Processors section of mascot...
Definition: ms_processoroptions.hpp:109
int getNumberOfProcessors() const
Returns a number of processors specified in the ProcessorSet parameter.
Definition: ms_processoroptions.cpp:190
bool isSectionAvailable() const
Check whether the section has been actually read from the file.
Definition: ms_processoroptions.cpp:161
std::string getIdentifier() const
Returns the value of Identifier.
Definition: ms_taxonomyrules.cpp:537
WWW_TYPE getType() const
Returns the name of the database the entry refers to.
Definition: ms_wwwoptions.cpp:90
std::string getName() const
Returns the name of the database the entry refers to.
Definition: ms_wwwoptions.cpp:69
Represents the whole WWW section.
Definition: ms_wwwoptions.hpp:157
int getNumberOfEntries() const
Returns the total number of entries in the section.
Definition: ms_wwwoptions.cpp:314
const ms_wwwentry * getEntry(const int index) const
Returns an entry by its index.
Definition: ms_wwwoptions.cpp:325
bool isSectionAvailable() const
Check whether the section has been actually read from the file.
Definition: ms_wwwoptions.cpp:294