This class represents a single Taxonomy_XXX section in mascot.dat
.
More...
#include <ms_taxonomyrules.hpp>
Public Member Functions | |
ms_taxonomyrules () | |
Default constructor. | |
ms_taxonomyrules (const ms_taxonomyrules &src) | |
Copying constructor. | |
~ms_taxonomyrules () | |
Destructor. | |
void | appendGencodeFile (const ms_taxnodesfiles *item) |
Adds an entry into the GencodeFiles list. | |
void | appendNoBreakDescLineIf (const char *str) |
Adds an entry into the NoBreakDescLineIf list. | |
void | appendNodesFile (const ms_taxnodesfiles *item) |
Adds an entry into the NodesFiles list. | |
void | appendPerDbSrcRule (const ms_parserule_plus *item) |
Adds a new database source string into the list. | |
void | appendPrefixRemove (const char *item) |
Adds an entry into the PrefixRemoves list. | |
void | appendProperty (const char *name, const char *value, const char *delimiter, const bool bFirstPlace=false) |
Adds a new property with the given parameters. | |
void | appendSpeciesFile (const ms_taxspeciesfiles *item) |
Adds an entry into the SpeciesFiles list. | |
void | appendStrFile (const ms_taxspeciesfiles *item) |
void | appendSuffixRemove (const char *item) |
Adds an entry into the SuffixRemoves list. | |
void | appendText (const char *line, const bool bFirstPlace=false) |
Adds a new non-parsed property. | |
void | clearDBLevelTaxId () |
Deletes DBLevelTaxId; it will not be saved in the file. | |
void | clearGencodeFiles () |
Deletes all GencodeFiles entries. | |
void | clearNoBreakDescLineIf () |
Deletes all NoBreakDescLineIf entries. | |
void | clearNodesFiles () |
Deletes all NodesFiles entries. | |
void | clearPerDbSrcRules () |
Deletes all database source strings. | |
void | clearPrefixRemoves () |
Deletes all PrefixRemoves entries. | |
void | clearSpeciesFiles () |
Deletes all entries for SpeciesFiles. | |
void | clearSuffixRemoves () |
Deletes all SuffixRemoves entries. | |
void | copyFrom (const ms_customproperty *src) |
Copies all properties and comments from another instance. | |
void | copyFrom (const ms_taxonomyrules *right) |
Can be used to create a copy of another object. | |
void | defaultValues () |
Initialises the instance with default values. | |
void | delNonEmpty () |
Deletes all non-comment properties. | |
void | delProp (const char *name) |
Deletes all properties with the specified name. | |
void | delPropByNumber (const int index) |
Deletes a single property with the specified number only. | |
void | delPropStart (const char *nameBeginning) |
Deletes all properties whose names start with the given string. | |
int | findProperty (const char *name, const int startFrom=0) const |
Searches the list for a property with the given name. | |
int | findPropertyBeginning (const char *nameBeginning, const int startFrom=0) const |
Searches the list for a property with the partially matching name. | |
const ms_parserule * | getAccFromSpeciesLine () const |
Returns the value of AccFromSpeciesLine. | |
int | getDBLevelTaxId () const |
Returns the value of DBLevelTaxId. | |
std::string | getDefaultDelimiter () const |
Return current default delimiter string used for parsing/storing properties. | |
const ms_parserule_plus * | getDefaultRule () const |
Returns the value of DefaultRule. | |
std::string | getDelimiterByNumber (const int index) const |
Returns a specific delimiter used for the property. | |
char | getDescriptionLineSep () const |
Returns the value of DescriptionLineSep. | |
const ms_parserule * | getDoThisRuleFirst () const |
Returns the value of DoThisRuleFirst. | |
int | getErrorLevel () const |
Returns the value of ErrorLevel. | |
const ms_taxnodesfiles * | getGencodeFile (const int index) const |
Returns an instance of ms_taxnodesfiles describing an entry in GencodeFiles. | |
std::string | getIdentifier () const |
Returns the value of Identifier. | |
std::string | getNoBreakDescLineIf (const int index) const |
Returns a NoBreakDescLineIf entry by its number. | |
const ms_taxnodesfiles * | getNodesFile (const int index) const |
Returns an instance of ms_taxnodesfiles describing an entry in NodesFiles. | |
int | getNumberOfGencodeFiles () const |
Returns the number of file names specified in GencodeFiles. | |
int | getNumberOfNoBreakDescLineIf () const |
Returns the number of NoBreakDescLineIf entries. | |
int | getNumberOfNodesFiles () const |
Returns the number of file names specified in NodesFiles. | |
int | getNumberOfPerDbSrcRules () const |
Returns the number of database source strings. | |
int | getNumberOfPrefixRemoves () const |
Returns the number of PrefixRemoves entries. | |
int | getNumberOfProperties () const |
Returns a total number of property/comment entries. | |
int | getNumberOfSpeciesFiles () const |
Returns the number of file names specified in SpeciesFiles. | |
int | getNumberOfStrFiles () const |
int | getNumberOfSuffixRemoves () const |
Returns the number of SuffixRemoves entries. | |
const ms_parserule_plus * | getPerDbSrcRule (const int index) const |
Returns a database source string by its number. | |
std::string | getPreceedingComments () const |
Returns any comments preceeding the section. | |
std::string | getPrefixRemove (const int index) const |
Returns the PrefixRemoves string by number. | |
std::string | getPropertyName (const int index) const |
Returns a property name for a given index. | |
std::string | getPropValStringByName (const char *name) const |
Retrieves property value by name. | |
std::string | getPropValStringByNumber (const int index) const |
Retrieves property raw text values by number. | |
std::string | getQuickRefSearch () const |
Returns the value of QuickRefSearch. | |
const ms_taxspeciesfiles * | getSpeciesFile (const int index) const |
Returns an instance of ms_taxspeciesfiles describing an entry in SpeciesFiles. | |
std::string | getSpeciesFormatRegex (const TAX_SPECIES_FORMAT format) const |
Returns a regular expression, if any for the species format. | |
const ms_parserule * | getSrcDatabaseRule () const |
Returns the value of SrcDatabaseRule. | |
const ms_taxspeciesfiles * | getStrFile (const int index) const |
const ms_parserule_plus * | getStrRule () const |
std::string | getSuffixRemove (const int index) const |
Returns a SuffixRemoves string by number. | |
bool | isConcatRefFileLines () const |
Returns TRUE if ConcatRefFileLines parameter is set to 1 and FALSE otherwise. | |
bool | isDBLevelTaxId () const |
Returns TRUE if there is a database level taxonomy ID in the file. | |
bool | isEnabled () const |
Returns TRUE if Enabled parameter is set to 1 and FALSE otherwise. | |
bool | isFromRefFile () const |
Returns TRUE if FromRefFile parameter is set to 1 and FALSE otherwise. | |
bool | isMitochondrialTranslation () const |
Returns TRUE if MitochondrialTranslation parameter is set to 1 and FALSE otherwise. | |
bool | isSectionAvailable () const |
Checks whether the section has been actually read from the file. | |
ms_taxonomyrules & | operator= (const ms_taxonomyrules &right) |
Assignment operator for C++ client applications. | |
void | setAccFromSpeciesLine (const ms_parserule *src) |
Change the value of AccFromSpeciesLine. | |
void | setConcatRefFileLines (const bool flag) |
Change the value of ConcatRefFileLines. | |
void | setDBLevelTaxId (const int value) |
Change the value of DBLevelTaxId. | |
void | setDefaultDelimiter (const char *delim) |
Allows to set a specific delimiter string to be used when no property-specific delimiter is supplied. | |
void | setDefaultRule (const ms_parserule_plus *src) |
Change the value of DefaultRule. | |
void | setDescriptionLineSep (const char value) |
Change the value of DescriptionLineSep. | |
void | setDoThisRuleFirst (const ms_parserule *src) |
Change the value of DoThisRuleFirst. | |
void | setEnabled (const bool flag) |
Change the value of Enabled. | |
void | setErrorLevel (const int value) |
Change the value of ErrorLevel. | |
void | setFromRefFile (const bool flag) |
Change the value of FromRefFile. | |
void | setIdentifier (const char *str) |
Change the value of Identifier. | |
void | setMitochondrialTranslation (const bool flag) |
Set the value of MitochondrialTranslation. | |
void | setPreceedingComments (const std::string &comments) |
Sets any comments preceeding the section. | |
void | setPropertyName (const int index, const char *name) |
Changes name of the property with the given index. | |
void | setPropValBoolByName (const char *name, const bool value, const bool bFirstPlace=false) |
Changes a boolean value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValCharByName (const char *name, const char value, const bool bFirstPlace=false) |
Changes a single character value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValFloatByName (const char *name, const double value, const bool bFirstPlace=false) |
Changes an floating point value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValInt64ByName (const char *name, const INT64 value, const bool bFirstPlace=false) |
Changes a long 64-bit integer value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValIntByName (const char *name, const int value, const bool bFirstPlace=false) |
Changes an integer value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValStringByName (const char *name, const char *value, const bool bFirstPlace=false) |
Changes a string value of the first entry with the given name or creates a new property if it is not found. | |
void | setPropValStringByNumber (const int index, const char *value) |
Changes an string value of an existing property with the given index. | |
void | setQuickRefSearch (const char *str) |
Change the value of QuickRefSearch. | |
void | setSectionAvailable (const bool value) |
Changes availability of the section, i.e. whether it should be saved in a file. | |
void | setSpeciesFormatRegex (const TAX_SPECIES_FORMAT format, const std::string regex) |
Set the regular expression, if any, for the species format. | |
void | setSrcDatabaseRule (const ms_parserule *src) |
Change the value of SrcDatabaseRule. | |
void | setStrRule (const ms_parserule_plus *src) |
bool | uncommentProp (const int index, const char *delimeter=0) |
Uncomments a line in the configuration file. | |
This class represents a single Taxonomy_XXX section in mascot.dat
.
The Taxonomy section defines a set of taxonomy rules that can be selected for a database. Usage of taxonomy rules can be turned off by setting Enabled property to 0. See isEnabled() for more information.
Instances of this class are created in ms_datfile.
Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:
More functionality is described in the documentation for ms_customproperty.
void appendGencodeFile | ( | const ms_taxnodesfiles * | item | ) |
Adds an entry into the GencodeFiles list.
See getGencodeFile() for more information.
item | an item to add a copy of into the list. |
void appendNoBreakDescLineIf | ( | const char * | str | ) |
Adds an entry into the NoBreakDescLineIf list.
See getNoBreakDescLineIf() for more information.
str | an item to add a copy of into the list. |
void appendNodesFile | ( | const ms_taxnodesfiles * | item | ) |
Adds an entry into the NodesFiles list.
See getNodesFile() for more information.
item | an item to add a copy of into the list. |
void appendPerDbSrcRule | ( | const ms_parserule_plus * | item | ) |
Adds a new database source string into the list.
See getPerDbSrcRule() for more information.
item | an item to add a copy of into the list |
void appendPrefixRemove | ( | const char * | item | ) |
Adds an entry into the PrefixRemoves list.
See getPrefixRemove() for more information.
item | an item to add a copy of into the list. |
|
inherited |
Adds a new property with the given parameters.
name | a property name to use. |
value | a property value to use. |
delimiter | a specific delimiter or an empty string for a default one to be used. |
bFirstPlace | forces a new property to be put on top of the list. |
void appendSpeciesFile | ( | const ms_taxspeciesfiles * | item | ) |
Adds an entry into the SpeciesFiles list.
See getSpeciesFile() for more information.
item | an item to add a copy of into the list. |
void appendStrFile | ( | const ms_taxspeciesfiles * | item | ) |
item | pointer to a taxonomy species file |
void appendSuffixRemove | ( | const char * | item | ) |
Adds an entry into the SuffixRemoves list.
See getSuffixRemove() for more information.
item | an item to add a copy of into the list. |
|
inherited |
Adds a new non-parsed property.
All property elements will be retrieved from the first parameter. Before calling this method, a specific default delimiter can be set using setDefaultDelimiter().
l | raw text representation of the property to be parsed. |
bFirstPlace | forces a new property to be put on top of the list. |
void clearGencodeFiles | ( | ) |
Deletes all GencodeFiles entries.
See getGencodeFile() for more information.
void clearNoBreakDescLineIf | ( | ) |
Deletes all NoBreakDescLineIf entries.
See getNoBreakDescLineIf() for more information.
void clearNodesFiles | ( | ) |
Deletes all NodesFiles entries.
See getNodesFile() for more information.
void clearPerDbSrcRules | ( | ) |
Deletes all database source strings.
See getPerDbSrcRule() for more information.
void clearPrefixRemoves | ( | ) |
Deletes all PrefixRemoves entries.
See getPrefixRemove() for more information.
void clearSpeciesFiles | ( | ) |
Deletes all entries for SpeciesFiles.
See getSpeciesFile() for more information.
void clearSuffixRemoves | ( | ) |
Deletes all SuffixRemoves entries.
See getSuffixRemove() for more information.
|
inherited |
Deletes all properties with the specified name.
str | Property name to find a match and then delete. |
|
inherited |
Deletes all properties whose names start with the given string.
str | Beginning a first part of the property name to delete. |
|
inherited |
Searches the list for a property with the given name.
If no property found with the given name -1 will be returned. There may be several property entries in the list with the same name.
name | a property name to be found. |
startFrom | a minimal property index to start search from. |
|
inherited |
Searches the list for a property with the partially matching name.
If no property found with the given name part -1 will be returned. There may be several property entries in the list whose names start with the given string.
nameBeginning | first part of a property name to be found. |
startFrom | a minimal property index to start search from. |
const ms_parserule * getAccFromSpeciesLine | ( | ) | const |
Returns the value of AccFromSpeciesLine.
MSDB database explicitly associates each species line with the accession string of the primary database entry. A further rule, AccFromSpeciesLine, is used to extract this accession string.
int getDBLevelTaxId | ( | ) | const |
Returns the value of DBLevelTaxId.
Database level taxonomy ID can be specified in order to find proper NA translation table without names.dmp
and nodes.dmp
files usage.
Default is -1, which is not a valid taxonomy ID.
|
inherited |
Return current default delimiter string used for parsing/storing properties.
const ms_parserule_plus * getDefaultRule | ( | ) | const |
Returns the value of DefaultRule.
The DefaultRule describes how to find the species name in the line of text in the reference file. The string in quotes is a regular expression. All words in the PrefixRemoves and SuffixRemoves keywords should be removed before trying to do a match. For more detailed information on how to specify this parameter consult Mascot manual.
If specified, DoThisRuleFirst is applied first, and the default rule would only be used if this failed.
|
inherited |
Returns a specific delimiter used for the property.
index | Index for which to get a delimiter |
char getDescriptionLineSep | ( | ) | const |
Returns the value of DescriptionLineSep.
The line that contains the species IDs has multiple IDs, separated by a character, whose ASCII code is specified by DescriptionLineSep.
There is no default value for this parameter.
const ms_parserule * getDoThisRuleFirst | ( | ) | const |
Returns the value of DoThisRuleFirst.
See getDefaultRule().
int getErrorLevel | ( | ) | const |
Returns the value of ErrorLevel.
ErrorLevel indicates the type of warnings or errors that are found when creating the taxonomy information. Possible values and their meanings:
NoTaxonomyMatch.txt
file for every sequence where no taxonomy information is found. NoTaxonomyMatch.txt
file for every sequence that had any accession string without a match. Since some sequences in NCBI will have up to 200 gi
numbers (sources), there is a reasonable chance that some of these entries will not have species information, and this would cause the errors files to become very large. Default is 1.
const ms_taxnodesfiles * getGencodeFile | ( | const int | index | ) | const |
Returns an instance of ms_taxnodesfiles describing an entry in GencodeFiles.
The GencodeFiles file is used to find a proper NA translation table for a given taxonomy. For more detailed information on how to configure this parameter consult Mascot manual and documentation for ms_taxnodesfiles.
By default the list of files is empty.
index | file number from 0 to (getNumberOfGencodeFiles()-1). |
std::string getIdentifier | ( | ) | const |
Returns the value of Identifier.
This parameter contains a symbolic name for the taxonomy specification as seen, for instance, in the database GUI utility.
By default this is empty.
std::string getNoBreakDescLineIf | ( | const int | index | ) | const |
Returns a NoBreakDescLineIf entry by its number.
NoBreakDescLineIf specifies keywords that prevent description line from being broken into separate words.
By default this is an empty list.
index | number of entry from 0 to (getNumberOfNoBreakDescLineIf()-1). |
const ms_taxnodesfiles * getNodesFile | ( | const int | index | ) | const |
Returns an instance of ms_taxnodesfiles describing an entry in NodesFiles.
The NodesFiles file is used to traverse taxonomy hierarchy. It contains taxonomy ID nodes together with their parents IDs. For more detailed information on how to configure this parameter consult Mascot manual and documentation for ms_taxnodesfiles.
By default the list of files is empty.
index | file number from 0 to (getNumberOfNodesFiles()-1). |
int getNumberOfGencodeFiles | ( | ) | const |
Returns the number of file names specified in GencodeFiles.
See getGencodeFile() and documentation for ms_taxnodesfiles.
int getNumberOfNoBreakDescLineIf | ( | ) | const |
Returns the number of NoBreakDescLineIf entries.
See getNoBreakDescLineIf() for explanations.
int getNumberOfNodesFiles | ( | ) | const |
Returns the number of file names specified in NodesFiles.
See getNodesFile() and documentation for ms_taxnodesfiles.
int getNumberOfPerDbSrcRules | ( | ) | const |
Returns the number of database source strings.
See getPerDbSrcRule() and documentation for ms_parserule_plus.
int getNumberOfPrefixRemoves | ( | ) | const |
|
inherited |
Returns a total number of property/comment entries.
int getNumberOfSpeciesFiles | ( | ) | const |
Returns the number of file names specified in SpeciesFiles.
See getSpeciesFile() and documentation for ms_taxspeciesfiles.
int getNumberOfStrFiles | ( | ) | const |
int getNumberOfSuffixRemoves | ( | ) | const |
const ms_parserule_plus * getPerDbSrcRule | ( | const int | index | ) | const |
Returns a database source string by its number.
Database source strings contained in taxonomy section all look like RULE_XXX or OTHERRULE.
By default the list of rules is empty.
index | database source string number from 0 to (getNumberOfPerDbSrcRules()-1). |
|
inherited |
Returns any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
std::string getPrefixRemove | ( | const int | index | ) | const |
Returns the PrefixRemoves string by number.
See getDefaultRule() for information on this parameter.
By default the list of prefixes is empty.
index | number of a string specified in the parameter from 0 to (getNumberOfPrefixRemoves()-1). |
|
inherited |
Returns a property name for a given index.
index | property number from 0 to (getNumberOfProperties()-1). |
|
inherited |
Retrieves property value by name.
Don't use this method for comments as they all have empty name. Also note that there might be several entries corresponding to the same name . – only the first value will be returned. If in doubt use findProperty() and getPropValStringByNumber() instead.
name | Name for which to get a property value |
|
inherited |
Retrieves property raw text values by number.
index | Index for which to get a property value |
std::string getQuickRefSearch | ( | ) | const |
Returns the value of QuickRefSearch.
The QuickRefSearch string is used to speed up the compressing of the database. Rather than use the regular expression for each line in the .ref
file, this text is used for a fast compare to the string C;Species
. Other lines are ignored.
By default this is empty.
const ms_taxspeciesfiles * getSpeciesFile | ( | const int | index | ) | const |
Returns an instance of ms_taxspeciesfiles describing an entry in SpeciesFiles.
The SpeciesFiles file is used to convert a species name to a taxonomy ID. For more detailed information on how to configure this parameter consult Mascot manual and documentation for ms_taxspeciesfiles.
By default the list is empty.
index | file number from 0 to (getNumberOfSpeciesFiles()-1). |
std::string getSpeciesFormatRegex | ( | const TAX_SPECIES_FORMAT | format | ) | const |
Returns a regular expression, if any for the species format.
Introduced in Mascot 2.4, allows the use of a regular expression for a species file. The regular expression needs to return two values: the 'accession' or 'id' and the taxonomy_id
For example, in the Taxonomy_X section of mascot.dat, there is, for example an entry:
* SWISSPROTRegex "^\\([A-Z0-9]*\\) *[ABEV] *\\([0-9]*\\):"
which has two bracketed expressions intended to extract AADNV and 648330 from
AADNV V 648330: N=Aedes albopictus densovirus (isolate Boublik/1994)
If there is no value for SWISSPROTRegex in the mascot.dat file, then the value returned is the default as shown above.
format | can be any TAX_SPECIES_FORMAT value, although only TAX_SPECIES_SWISSPROT is currently supported in Mascot Server. |
const ms_parserule * getSrcDatabaseRule | ( | ) | const |
Returns the value of SrcDatabaseRule.
The parameter is used for finding database source string with regular expression.
const ms_taxspeciesfiles * getStrFile | ( | const int | index | ) | const |
index | file index to look for |
const ms_parserule_plus * getStrRule | ( | ) | const |
std::string getSuffixRemove | ( | const int | index | ) | const |
Returns a SuffixRemoves string by number.
See getDefaultRule() for information on this parameter.
By default the list of suffixes is empty.
index | number of a string specified in the parameter from 0 to (getNumberOfSuffixRemoves()-1). |
bool isConcatRefFileLines | ( | ) | const |
Returns TRUE if ConcatRefFileLines parameter is set to 1 and FALSE otherwise.
A value of 1 (default) means that there might be multiple lines in reference file describing the same entry of the database.
bool isEnabled | ( | ) | const |
Returns TRUE if Enabled parameter is set to 1 and FALSE otherwise.
Set Enabled parameter to 0 to disable the taxonomy. Most of the other parameters will be ignored although the taxonomy will be available for a database to select in database maintenance utility.
Default is 0.
bool isFromRefFile | ( | ) | const |
Returns TRUE if FromRefFile parameter is set to 1 and FALSE otherwise.
FromRefFile is set to 0 to indicate that the taxonomy should be found in the .fasta
file rather than in a reference file.
Default is 0.
bool isMitochondrialTranslation | ( | ) | const |
Returns TRUE if MitochondrialTranslation parameter is set to 1 and FALSE otherwise.
Two types of NA translation tables can be used: nuclear and mitochondrial. Setting this parameter to 0 indicates the first type whereas 1 indicates the second one.
Default is 0.
bool isSectionAvailable | ( | ) | const |
Checks whether the section has been actually read from the file.
By default a Taxonomy
section is unavailable until it has been set to a different state.
void setAccFromSpeciesLine | ( | const ms_parserule * | src | ) |
Change the value of AccFromSpeciesLine.
See getAccFromSpeciesLine() for more information.
src | pointer to a parser rule |
void setConcatRefFileLines | ( | const bool | flag | ) |
Change the value of ConcatRefFileLines.
See isConcatRefFileLines() for more information.
flag | boolean value to set whether there might be multiple lines for the same entry |
|
inherited |
Allows to set a specific delimiter string to be used when no property-specific delimiter is supplied.
delim | String to set the default delimiter |
void setDefaultRule | ( | const ms_parserule_plus * | src | ) |
void setDescriptionLineSep | ( | const char | value | ) |
Change the value of DescriptionLineSep.
See getDescriptionLineSep() for more information.
value | description line separator |
void setDoThisRuleFirst | ( | const ms_parserule * | src | ) |
Change the value of DoThisRuleFirst.
See getDoThisRuleFirst().
src | pointer to a parser rule for which it should do this rule first |
void setEnabled | ( | const bool | flag | ) |
Change the value of Enabled.
See isEnabled() for more information.
flag | whether the taxonomy rules are enabled or not |
void setErrorLevel | ( | const int | value | ) |
Change the value of ErrorLevel.
See getErrorLevel() for more information.
value | error level |
void setFromRefFile | ( | const bool | flag | ) |
Change the value of FromRefFile.
See isFromRefFile() for more information.
flag | boolean value to define if the taxonomy should be found in the fasta file |
void setIdentifier | ( | const char * | str | ) |
Change the value of Identifier.
For more information see getIdentifier().
str | identifier for the taxonomy |
void setMitochondrialTranslation | ( | const bool | flag | ) |
Set the value of MitochondrialTranslation.
See isMitochondrialTranslation().
flag | true if NA translation tables used are mitochondrial, false if they are nuclear |
|
inherited |
Sets any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
comments | any comments preceeding the section |
|
inherited |
Changes name of the property with the given index.
index | property number from 0 to (getNumberOfProperties()-1). |
name | new name to be given to the property. |
|
inherited |
Changes a boolean value of the first entry with the given name or creates a new property if it is not found.
A new value will be converted into 1 (for TRUE) or 0 (for FALSE) character.
name | a name of the property to find or add. |
value | a new boolean value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes a single character value of the first entry with the given name or creates a new property if it is not found.
name | a name of the property to find or add. |
value | a new single character value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes an floating point value of the first entry with the given name or creates a new property if it is not found.
name | a name of the property to find or add. |
value | a new floating point value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes a long 64-bit integer value of the first entry with the given name or creates a new property if it is not found.
name | a name of the property to find or add. |
value | a new long 64-bit integer value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes an integer value of the first entry with the given name or creates a new property if it is not found.
name | a name of the property to find or add. |
value | a new integer value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes a string value of the first entry with the given name or creates a new property if it is not found.
name | a name of the property to find or add. |
value | a new string value for the property. |
bFirstPlace | if not found a new property can be put on top of the list. |
|
inherited |
Changes an string value of an existing property with the given index.
index | an index of an existing property. |
str | String value for the property. |
void setQuickRefSearch | ( | const char * | str | ) |
Change the value of QuickRefSearch.
See getQuickRefSearch().
str | string used to speed up database compression |
void setSpeciesFormatRegex | ( | const TAX_SPECIES_FORMAT | format, |
const std::string | regex | ||
) |
Set the regular expression, if any, for the species format.
Instroduced in Mascot 2.4, allows the use of a regular expression for a species file. The regular expression needs to return two values: the 'accession' or 'id' and the taxonomy_id
For example, in the Taxonomy_X section of mascot.dat, there is, for example an entry:
* SWISSPROTRegex "^\\([A-Z0-9]*\\) *[ABEV] *\\([0-9]*\\):"
which has two bracketed expressions intended to extract AADNV and 648330 from
AADNV V 648330: N=Aedes albopictus densovirus (isolate Boublik/1994)
format | can be any TAX_SPECIES_FORMAT value, although only TAX_SPECIES_SWISSPROT is currently supported in Mascot Server. |
regex | is the new regular expression or an empty string. |
void setSrcDatabaseRule | ( | const ms_parserule * | src | ) |
Change the value of SrcDatabaseRule.
See getSrcDatabaseRule().
src | pointer to a parser rule |
void setStrRule | ( | const ms_parserule_plus * | src | ) |
src | pointer to a parser str rule |
|
inherited |
Uncomments a line in the configuration file.
Removes a # and any white space. Finds the delimeter and extracts the property name and value.
index | must be a value between 0 and getNumberOfProperties(). |
delimeter | will often be a space. If not supplied, the default delimeter will be used. |