An instance of this class represents a single database definition from the Databases
section of mascot.dat
.
More...
#include <ms_databaseoptions.hpp>
Public Types | |
enum | { NUM_THREADS_AUTO_DETECT = -1 } |
Value used to indicate that the number of threads to be used should be automatically determined at runtime. More... | |
Public Member Functions | |
ms_databaseoptions () | |
Default constructor. | |
ms_databaseoptions (const ms_databaseoptions &src) | |
Copying constructor. | |
~ms_databaseoptions () | |
Destructor. | |
void | copyFrom (const ms_databaseoptions *right) |
Can be used to create a copy of another object. | |
void | defaultValues () |
Initialises the instance with default values. | |
int | getAccessionParseRuleIndex () const |
Returns the value of AccessionParseRuleIndex. | |
int | getAccessionRefParseRuleIndex () const |
Returns the value of AccessionRefParseRuleIndex. | |
int | getDBType () const |
Return the database type. | |
int | getDescriptionParseRuleIndex () const |
Returns the value of DescriptionParseRuleIndex. | |
std::string | getName () const |
Returns the value of Name. | |
int | getNumberOfThreads () const |
Returns the value of Threads. | |
std::string | getPath () const |
Return the value of Path. | |
const std::string & | getPreceedingComments () const |
Get the comment preceding this database entry. | |
int | getTaxonomyParseRuleIndex () const |
Returns the value of TaxonomyParseRuleIndex. | |
bool | isActive () const |
Returns true if the database definition is active and false otherwise. | |
bool | isLocalRefFile () const |
Returns TRUE if LocalRefFile flag is set to 1 and FALSE otherwise. | |
bool | isLockMemory () const |
Returns TRUE if MemLock flag is set to 1 and FALSE otherwise. | |
bool | isMemoryMapFiles () const |
Returns the value of MemMap. | |
ms_databaseoptions & | operator= (const ms_databaseoptions &right) |
Assignment operator for C++ client applications. | |
void | setAccessionParseRuleIndex (const int index) |
Change AccessionParseRuleIndex. | |
void | setAccessionRefParseRuleIndex (const int index) |
Change AccessionRefParseRuleIndex. | |
void | setActive (const bool value) |
Set the definition as active or inactive. | |
void | setDBType (const int type) |
Change the database type. | |
void | setDescriptionParseRuleIndex (const int index) |
Change DescriptionParseRuleIndex. | |
void | setLocalRefFile (const bool flag) |
Change LocalRefFile. | |
void | setLockMemory (const bool flag) |
Change MemLock. | |
void | setMemoryMapFiles (const bool flag) |
Change MemMap. | |
void | setName (const char *name) |
Change Name. | |
void | setNumberOfThreads (const int number) |
Change Threads. | |
void | setPath (const char *path) |
Change Path. | |
void | setPreceedingComments (const std::string &str) |
Set the comments preceding this database entry. | |
void | setTaxonomyParseRuleIndex (const int index) |
Change TaxonomyParseRuleIndex. | |
An instance of this class represents a single database definition from the Databases
section of mascot.dat
.
An instance of this class can be normally created within ms_datfile. Before using a definition you must check whether it is active or not (with isActive()). An inactive database definition is allowed to have invalid properties and, therefore, must be ignored for database searches/maintenance. An inactive definition can be made active with setActive(). Before doing so, make sure all the properties are valid.
Instances of the class can be stored in ms_databases.
anonymous enum |
Value used to indicate that the number of threads to be used should be automatically determined at runtime.
See ms_processors::getAutoDetectNumThreads() and getNumberOfThreads().
(Defined as an enum rather than static const int to support VC6)
Enumerator | |
---|---|
NUM_THREADS_AUTO_DETECT | Value used to indicate that the number of threads to be used should be automatically determined at runtime. |
int getAccessionParseRuleIndex | ( | ) | const |
Returns the value of AccessionParseRuleIndex.
Index of the regular expression in the PARSE
section that can be used to parse an accession string from a FASTA
file title line.
Default is 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
int getAccessionRefParseRuleIndex | ( | ) | const |
Returns the value of AccessionRefParseRuleIndex.
Index of the regular expression in the PARSE
section that can be used to parse an accession string from a local full text reference file. If there is no local reference file, this value is ignored.
Default is 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
int getDBType | ( | ) | const |
Return the database type.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
int getDescriptionParseRuleIndex | ( | ) | const |
Returns the value of DescriptionParseRuleIndex.
Index of the regular expression in the PARSE
section that can be used to parse a description string from a FASTA
file title line.
Default is 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
std::string getName | ( | ) | const |
Returns the value of Name.
Each database must have a unique case-sensitive name that is displayed in the search form
The name does not need to be the same as or even similar to the filename of the actual FASTA
file.
Do not use spaces, punctuation, or control characters in names.
By default this is empty.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
int getNumberOfThreads | ( | ) | const |
Returns the value of Threads.
A Mascot search can use multiple threads. If you are running in cluster mode, Threads should be set to 1. Otherwise, specify the same number of threads as processors in your system.
A value of -1 is 'AUTO' which means that the number of threads is set to the maximum possible depending on the number of cores avaiable and the size of the license.
This value has no meaning for spectral libraries
Default, from version 2.6 onwards is -1.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | N |
std::string getPath | ( | ) | const |
Return the value of Path.
FASTA
database files must be on a local disk. Mascot creates its compressed files in the same directory as the original FASTA
file. The location of the FASTA
file is defined in the Path field. This must be the fully qualified path to the FASTA
file, with a wild card in the filename. The delimiters between directories must always be forward slashes, even if Mascot is running on a Windows system.
By default this is empty.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
int getTaxonomyParseRuleIndex | ( | ) | const |
Returns the value of TaxonomyParseRuleIndex.
Index of the taxonomy rule block to be used to parse taxonomy information. If taxonomy information is not available, or is not to be used, this value should be set to 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | N |
Default is 0.
bool isActive | ( | ) | const |
Returns true if the database definition is active and false otherwise.
Inactive definitions represent the entries that can be made active by the database manager utility. In the mascot.dat file, they are simply commented out entries.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | Y |
bool isLocalRefFile | ( | ) | const |
Returns TRUE if LocalRefFile flag is set to 1 and FALSE otherwise.
Flag to indicate whether a local reference file is available (1) or not (0). For certain databases (MSDB, OWL, and SwissProt), it is possible to have a local reference file, from which full text information can be taken for a Protein View
report.
Default is 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | N |
bool isLockMemory | ( | ) | const |
Returns TRUE if MemLock flag is set to 1 and FALSE otherwise.
Flag to indicate whether a memory mapped database file should be locked in memory (1) or not (0).
Default is 0.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | N |
bool isMemoryMapFiles | ( | ) | const |
Returns the value of MemMap.
This flag is to indicate whether the database file should be memory mapped (1) or not (0). Database files should always be memory mapped. Unlike memory locking, this does not consume physical RAM.
Default is 1.
Applies to:
Amino acid fasta | Nucleic acid fasta | Spectral library |
---|---|---|
Y | Y | N |
void setAccessionParseRuleIndex | ( | const int | index | ) |
Change AccessionParseRuleIndex.
See getAccessionParseRuleIndex() for more information.
index | is the new value |
void setAccessionRefParseRuleIndex | ( | const int | index | ) |
Change AccessionRefParseRuleIndex.
See getAccessionRefParseRuleIndex() for more information.
index | is the new value |
void setActive | ( | const bool | value | ) |
Set the definition as active or inactive.
See isActive() for more information.
value | is the new value |
void setDBType | ( | const int | type | ) |
Change the database type.
See getDBType() for more information.
type | should be one of the DATABASE_TYPE enumeration values. Note that SLREF is not a supported database type for this purpose. |
void setDescriptionParseRuleIndex | ( | const int | index | ) |
Change DescriptionParseRuleIndex.
See getDescriptionParseRuleIndex() for more information.
index | is the new value |
void setLocalRefFile | ( | const bool | flag | ) |
void setLockMemory | ( | const bool | flag | ) |
void setMemoryMapFiles | ( | const bool | flag | ) |
void setName | ( | const char * | name | ) |
void setNumberOfThreads | ( | const int | number | ) |
void setPath | ( | const char * | path | ) |
void setTaxonomyParseRuleIndex | ( | const int | index | ) |
Change TaxonomyParseRuleIndex.
See getTaxonomyParseRuleIndex() for more information.
index | is the new value |