This class encapsulates a complete unigene file. More...
|ms_unigene (ms_mascotresfile &resfile, const char *filename)|
|The constructor for a unigene object. |
|const ms_unigene_entry *||findEntry (const char *id)|
|Given an accession, return a pointer to the relevant unigene entry. |
|std::string||getUnigeneForAccession (const std::string accession, const int index)|
|Return the Unigene 'accession' (ID) for a given EST accession. |
This class encapsulates a complete unigene file.
Creating one of these objects reads in the unigene file, creating a number of ms_unigene_entry objects. The gi and EMBL accessions are all indexed.
The constructor for a unigene object.
This is used from within the library but can also be called directly.
For details of how Unigene is configured within Mascot, see: http://www.matrixscience.com/help/seq_db_setup_EMBLEST.html
If a cache directory is specified for the ms_mascotresfile object, as returned by ms_mascotresfile::getCacheDirectory(), then this constructor will attempt to use a cache file for fast indexing. See Specifying cache file directory for details of the cache file location which will typically be in the same directory tree as the results cache files. The size and last modified date/time of the unigene file are used to determine if a new cache file needs to be produced. The cache filename for example, for Mm.data will be Mm.data.cdb. If the cache file does not exist and the constructor is unable to create the cache directory, then it will report the error: ms_mascotresfile::ERR_FAIL_MK_CACHE_DIR and continue without the cache.
If cache files are not used, the constructor loads the whole file into memory.
|resfile||is required for error reporting. Any errors are added to the resfile object. The cache directory (if any) is obtained by calling ms_mascotresfile::getCacheDirectory()|
|filename||is the path to the unigene file.|
|const ms_unigene_entry * findEntry||(||const char *||id )|
Given an accession, return a pointer to the relevant unigene entry.
|id||is the unigene id - for example Hs.1234|
|std::string getUnigeneForAccession||(||const std::string||accession,|
Return the Unigene 'accession' (ID) for a given EST accession.
Each accession can belong to zero or more unigene entries. This function must be called multiple times to return all the unigene entries that contain the accession.
The returned string can be passed to findEntry() to return the complete unigene entry.
|accession||is the gi number or EBI accession|
|index||is a 1 based index. Increment this value until the function returns an empty string.|
|Copyright © 2016 Matrix Science Ltd. All Rights Reserved. Generated on Fri Jun 2 2017 01:44:55|