Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_databaseoptions Class Reference

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_databaseoptionsoperator= (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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

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.

Member Function Documentation

◆ getAccessionParseRuleIndex()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
the index for the parse rule.

◆ getAccessionRefParseRuleIndex()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
the index for the parse rule.

◆ getDBType()

int getDBType ( ) const

Return the database type.

Applies to:

Amino acid fastaNucleic acid fastaSpectral library
YYY
Returns
One of the DATABASE_TYPE enumeration values. Note that the returned type is never SLREF.

◆ getDescriptionParseRuleIndex()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
the index for the parse rule.

◆ getName()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
the name of the database
Examples
config_mascotdat.cpp.

◆ getNumberOfThreads()

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 fastaNucleic acid fastaSpectral library
YYN
Returns
the number of threads

◆ getPath()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
the path with wild card

◆ getTaxonomyParseRuleIndex()

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 fastaNucleic acid fastaSpectral library
YYN

Default is 0.

Returns
Index of the taxonony rule

◆ isActive()

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 fastaNucleic acid fastaSpectral library
YYY
Returns
true if the database definition is active
Examples
config_mascotdat.cpp.

◆ isLocalRefFile()

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 fastaNucleic acid fastaSpectral library
YYN
Returns
true if the database has a local reference file

◆ isLockMemory()

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.

See also
isMemoryMapFiles()

Applies to:

Amino acid fastaNucleic acid fastaSpectral library
YYN
Returns
true if the database should be locked in memory

◆ isMemoryMapFiles()

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.

See also
isLockMemory()

Applies to:

Amino acid fastaNucleic acid fastaSpectral library
YYN
Returns
true if the database is to be memory mapped

◆ setAccessionParseRuleIndex()

void setAccessionParseRuleIndex ( const int  index)

Change AccessionParseRuleIndex.

See getAccessionParseRuleIndex() for more information.

Parameters
indexis the new value

◆ setAccessionRefParseRuleIndex()

void setAccessionRefParseRuleIndex ( const int  index)

Change AccessionRefParseRuleIndex.

See getAccessionRefParseRuleIndex() for more information.

Parameters
indexis the new value

◆ setActive()

void setActive ( const bool  value)

Set the definition as active or inactive.

See isActive() for more information.

Parameters
valueis the new value

◆ setDBType()

void setDBType ( const int  type)

Change the database type.

See getDBType() for more information.

Parameters
typeshould be one of the DATABASE_TYPE enumeration values. Note that SLREF is not a supported database type for this purpose.

◆ setDescriptionParseRuleIndex()

void setDescriptionParseRuleIndex ( const int  index)

Change DescriptionParseRuleIndex.

See getDescriptionParseRuleIndex() for more information.

Parameters
indexis the new value

◆ setLocalRefFile()

void setLocalRefFile ( const bool  flag)

Change LocalRefFile.

See isLocalRefFile() for more information.

Parameters
flagis the new value

◆ setLockMemory()

void setLockMemory ( const bool  flag)

Change MemLock.

See isLockMemory() for more information.

Parameters
flagis the new value

◆ setMemoryMapFiles()

void setMemoryMapFiles ( const bool  flag)

Change MemMap.

See isMemoryMapFiles() for more information.

Parameters
flagis the new value

◆ setName()

void setName ( const char *  name)

Change Name.

See getName() for more information.

Parameters
nameis the new value

◆ setNumberOfThreads()

void setNumberOfThreads ( const int  number)

Change Threads.

See getNumberOfThreads() for more information.

Parameters
numberis the new value

◆ setPath()

void setPath ( const char *  path)

Change Path.

See getPath() for more information.

Parameters
pathis the new value

◆ setTaxonomyParseRuleIndex()

void setTaxonomyParseRuleIndex ( const int  index)

Change TaxonomyParseRuleIndex.

See getTaxonomyParseRuleIndex() for more information.

Parameters
indexis the new value

The documentation for this class was generated from the following files: