19#ifndef MS_TAXONOMYRULES_HPP 
   20#define MS_TAXONOMYRULES_HPP 
   27namespace matrix_science {
 
   46        TAX_SPECIES_FORMAT_COUNT        
 
   82        std::string getFileName() 
const;
 
   85        void setFileName(
const char* name);
 
   89        std::string         filename_;
 
   91        std::string getStringValue() 
const;
 
  124        void defaultValues();
 
  140        std::string getFileName() 
const;
 
  143        void setFileName(
const char* name);
 
  147        std::string     filename_;
 
  148        std::string getStringValue() 
const;
 
  164            TAX_CHOP_PREFIX = 0x0001, 
 
  165            TAX_CHOP_SUFFIX = 0x0002, 
 
  166            TAX_CHOP_WORDS  = 0x0004  
 
  182        void defaultValues();
 
  210        std::string getNameOfDB() 
const;
 
  213        void setNameOfDB(
const char* name);
 
  219        std::string         nameOfDb_;
 
  220        std::string getStringValue() 
const;
 
  261        void defaultValues();
 
  271        bool isSectionAvailable() 
const;
 
  274        void setSectionAvailable(
const bool value);
 
  277        bool isEnabled() 
const;
 
  280        void setEnabled(
const bool flag);
 
  283        std::string getIdentifier() 
const;
 
  286        void setIdentifier(
const char* str);
 
  289        int getErrorLevel() 
const;
 
  292        void setErrorLevel(
const int value);
 
  295        bool isFromRefFile() 
const;
 
  298        void setFromRefFile(
const bool flag);
 
  301        bool isConcatRefFileLines() 
const;
 
  304        void setConcatRefFileLines(
const bool flag);
 
  307        char getDescriptionLineSep() 
const;
 
  310        void setDescriptionLineSep(
const char value);
 
  313        int getNumberOfNoBreakDescLineIf() 
const;
 
  316        std::string getNoBreakDescLineIf(
const int index) 
const;
 
  319        void clearNoBreakDescLineIf();
 
  322        void appendNoBreakDescLineIf(
const char* str);
 
  325        int getNumberOfSpeciesFiles() 
const;
 
  331        void clearSpeciesFiles();
 
  337        int getNumberOfStrFiles() 
const;
 
  341        void clearStrFiles();
 
  351        int getNumberOfNodesFiles() 
const;
 
  357        void clearNodesFiles();
 
  363        int getNumberOfGencodeFiles() 
const;
 
  369        void clearGencodeFiles();
 
  381        int getNumberOfPrefixRemoves() 
const;
 
  384        std::string getPrefixRemove(
const int index) 
const;
 
  387        void clearPrefixRemoves();
 
  390        void appendPrefixRemove(
const char * item);
 
  393        int getNumberOfSuffixRemoves() 
const;
 
  396        std::string getSuffixRemove(
const int index) 
const;
 
  399        void clearSuffixRemoves();
 
  402        void appendSuffixRemove(
const char * item);
 
  411        int getNumberOfPerDbSrcRules() 
const;
 
  417        void clearPerDbSrcRules();
 
  435        std::string getQuickRefSearch() 
const;
 
  438        void setQuickRefSearch(
const char* str);
 
  441        int getDBLevelTaxId() 
const;
 
  444        void setDBLevelTaxId(
const int value);
 
  447        bool isDBLevelTaxId() 
const;
 
  450        void clearDBLevelTaxId();
 
  453        bool isMitochondrialTranslation() 
const;
 
  456        void setMitochondrialTranslation(
const bool flag);
 
  464#ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE 
  465#include "suppress_ms_customproperty.hpp" 
  469        bool                sectionAvailable_;
 
  471        std::string         identifier_;
 
  474        bool                concatRefFileLines_;
 
  475        char                descriptionLineSep_;
 
  477        std::vector< std::string > noBreakDescLineIf_;
 
  478        std::vector< ms_taxspeciesfiles* > speciesFiles_;
 
  479        std::vector< ms_taxspeciesfiles* > strStrFiles_;
 
  480        std::vector< ms_taxnodesfiles* > nodesFiles_;
 
  481        std::vector< ms_taxnodesfiles* > gencodeFiles_;
 
  482        std::vector< ms_parserule_plus* > perDbSrcRules_;
 
  483        std::vector< std::string > prefixRemoves_;
 
  484        std::vector< std::string > suffixRemoves_;
 
  485        std::vector< std::string > speciesFormatRegex_;
 
  493        std::string         quickRefSearch_;
 
  495        bool                mitochondrialTranslation_;
 
  545                        const char * taxonomyDirectory = 
"../taxonomy",
 
  546                        const bool useIndex = 
true,
 
  547                        const bool createList = 
false,
 
  548                        const char * preparingDirectory = 
"../taxonomy/preparing",
 
  549                        const char * oldDirectory = 
"../taxonomy/old");
 
  564        struct TAX_TREE_NODE {
 
  568        typedef std::vector<TAX_TREE_NODE> TAX_TREE_NODES;
 
  571        TAX_TREE_NODES * getTaxIDArray();
 
  575        bool usingIndex() 
const; 
 
  578        std::string getTaxonomyAndIndexFiles() 
const;
 
  581        bool isSpeciesDescendantOf(
const int parentID, 
const int id) 
const;
 
  585        bool getParent(
const int id, 
int & ttParent, 
int & ttGenTable) 
const;
 
  587        bool getParent(
const int id, 
int & OUTPUT, 
int & OUTPUT) 
const;
 
  595        std::vector<ms_taxnodesfiles> files_;
 
  596        TAX_TREE_NODES nodes_;
 
  597        std::vector<std::string> fileNames_;
 
  598        std::vector<ms_tinycdb *> cdbFiles_;
 
  600        bool readFile(
const std::string & filename,
 
  601                      const bool isMitochondrialTranslation);
 
The class is used as a base for property-containing classes, such as ms_mascotoptions.
Definition: ms_customproperty.hpp:91
 
Encapsulates the mascot.dat file that contains the most important parameters.
Definition: ms_datfile.hpp:47
 
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
 
Represents regular expression parse rule plus some additional parameters.
Definition: ms_taxonomyrules.hpp:153
 
unsigned int TAX_CHOP_SRC
Data type used for the parameter specifying how to chop a source line. This will be zero or more of t...
Definition: ms_taxonomyrules.hpp:170
 
TAX_CHOP_TYPES
Constants used for combining TAX_CHOP_SRC values.
Definition: ms_taxonomyrules.hpp:163
 
Represents a single regular expression parsing rule.
Definition: ms_parserule.hpp:38
 
Filenames and formats for taxonomy nodes or genetic codes files.
Definition: ms_taxonomyrules.hpp:109
 
The class represents a single taxonomy choice entry in the taxonomy file.
Definition: ms_taxonomyfile.hpp:49
 
This class represents a single Taxonomy_XXX section in mascot.dat.
Definition: ms_taxonomyrules.hpp:247
 
The complete taxonomy tree as built from one or more files such as nodes.dmp.
Definition: ms_taxonomyrules.hpp:541
 
An instance of this class describes one entry of taxonomy species files.
Definition: ms_taxonomyrules.hpp:51
 
Wrapper for the public domain tinycdb package http://www.corpit.ru/mjt/tinycdb.html by Michael Tokare...
Definition: ms_tinycdb.hpp:124
 
TAX_SPECIES_FORMAT
Definition: ms_taxonomyrules.hpp:39
 
TAX_NODE_FORMAT
Definition: ms_taxonomyrules.hpp:100
 
@ TAX_SPECIES_NCBI
NCBI names.dmp taxonomy species files.
Definition: ms_taxonomyrules.hpp:40
 
@ TAX_SPECIES_GI2TAXID
GI2TAXID.
Definition: ms_taxonomyrules.hpp:43
 
@ TAX_SPECIES_EXPLICIT
No lookup required, because the ID is given in the description line. For example: >IPI:IPI00000001....
Definition: ms_taxonomyrules.hpp:45
 
@ TAX_SPECIES_PDB
PDB.
Definition: ms_taxonomyrules.hpp:42
 
@ TAX_SPECIES_SWISSPROT
SwissProt.
Definition: ms_taxonomyrules.hpp:41
 
@ TAX_SPECIES_ACC2TAXID
Simple 'accession taxID' (any whitespace).
Definition: ms_taxonomyrules.hpp:44
 
@ TAX_NODE_GENCODE
NCBI gencode.dmp format.
Definition: ms_taxonomyrules.hpp:102
 
@ TAX_NODE_NCBI
NCBI nodes.dmp format.
Definition: ms_taxonomyrules.hpp:101