Definition in file gene_info_reader.cpp.
#include <ncbi_pch.hpp>
#include <corelib/env_reg.hpp>
#include <objtools/blast/gene_info_reader/gene_info_reader.hpp>
#include <objtools/blast/gene_info_reader/file_utils.hpp>
#include <algorithm>
Include dependency graph for gene_info_reader.cpp:

Go to the source code of this file.
Functions | |
| int & | s_GetField (CGeneInfoFileReader::STwoIntRecord &record, int iField) |
| Returns the field of a record given its index. | |
| template<int k_nFields> | |
| int & | s_GetField (CGeneInfoFileReader::SMultiIntRecord< k_nFields > &record, int iField) |
| Returns the field of a record given its index. | |
| template<typename TRecordType> | |
| bool | s_SearchSortedArray (TRecordType *pRecs, int nRecs, int n1, int &iFirstIndex) |
| Searches an array of records sorted by the first field. | |
| void | s_SortAndFilter (list< int > &listVals, bool bRemoveZeros) |
| Sorts and filters a list of integers. | |
| template<typename TRecordType> | |
| static bool | s_SearchSortedArray (TRecordType *pRecs, int nRecs, int n1, int iField, list< int > &listFieldVals, bool bRemoveZeros) |
| Searches an array of records sorted by the first field. | |
| template<typename TRecordType> | |
| static bool | s_GetMemFilePtrAndLength (CMemoryFile *pMemFile, TRecordType *&pRecs, int &nRecs) |
| Interprets a memory file as a record array. | |
| static string | s_FindPathToGeneInfoFiles (void) |
| Find the path to the gene info files, first checking the environment variable GENE_INFO_PATH, then the section BLAST, label GENE_INFO_PATH in the NCBI configuration file. | |
Variables | |
| static char const | rcsid [] = "$Id: gene_info_reader.cpp 140909 2008-09-22 18:25:56Z ucko $" |
| static const int | k_iRNAGiField = 1 |
| Index of the RNA Gi field in the Gene ID to Gi records. | |
| static const int | k_iProteinGiField = 2 |
| Index of the Protein Gi field in the Gene ID to Gi records. | |
| static const int | k_iGenomicGiField = 3 |
| Index of the Genomic Gi field in the Gene ID to Gi records. | |
|
|
Find the path to the gene info files, first checking the environment variable GENE_INFO_PATH, then the section BLAST, label GENE_INFO_PATH in the NCBI configuration file. If not found in either location, try the $BLASTDB/features directory. If all fails return the current working directory
Definition at line 400 of file gene_info_reader.cpp. References CDirEntry::ConcatPath(), CEnvironmentRegistry::ePriority_Max, CCompoundRWRegistry::ePriority_MaxUser, IRegistry::fWithNcbirc, GENE_INFO_PATH_ENV_VARIABLE, CDir::GetCwd(), kEmptyCStr, kEmptyStr, NStr::ReplaceInPlace(), and NStr::StartsWith(). Referenced by CGeneInfoFileReader::CGeneInfoFileReader(). |
|
||||||||||||||||
|
Returns the field of a record given its index.
Definition at line 86 of file gene_info_reader.cpp. |
|
||||||||||||
|
Returns the field of a record given its index.
Definition at line 69 of file gene_info_reader.cpp. |
|
||||||||||||||||||||
|
Interprets a memory file as a record array.
Definition at line 207 of file gene_info_reader.cpp. References CMemoryFile::GetPtr(), and CMemoryFile::GetSize(). Referenced by CGeneInfoFileReader::x_GeneIdToGi(), CGeneInfoFileReader::x_GeneIdToOffset(), CGeneInfoFileReader::x_GiToGeneId(), and CGeneInfoFileReader::x_GiToOffset(). |
|
||||||||||||||||||||||||||||||||
|
Searches an array of records sorted by the first field. The function returns the list of values of a given field of all the records whose first field matches the key. The list of values is sorted, filtered, and all the zeros are removed (i.e. returns unique sorted positive integers).
Definition at line 175 of file gene_info_reader.cpp. References s_GetField(), s_SearchSortedArray(), and s_SortAndFilter(). |
|
||||||||||||||||||||||||
|
Searches an array of records sorted by the first field. The function implements a variety of binary search that will locate the first record in the array whose first field matches the input key.
Definition at line 110 of file gene_info_reader.cpp. References s_GetField(). Referenced by s_SearchSortedArray(), CGeneInfoFileReader::x_GeneIdToGi(), CGeneInfoFileReader::x_GeneIdToOffset(), CGeneInfoFileReader::x_GiToGeneId(), and CGeneInfoFileReader::x_GiToOffset(). |
|
||||||||||||
|
Sorts and filters a list of integers.
Definition at line 139 of file gene_info_reader.cpp. Referenced by s_SearchSortedArray(). |
|
|
Index of the Genomic Gi field in the Gene ID to Gi records.
Definition at line 57 of file gene_info_reader.cpp. Referenced by CGeneInfoFileReader::GetGenomicGisForGeneId(). |
|
|
Index of the Protein Gi field in the Gene ID to Gi records.
Definition at line 55 of file gene_info_reader.cpp. Referenced by CGeneInfoFileReader::GetProteinGisForGeneId(). |
|
|
Index of the RNA Gi field in the Gene ID to Gi records.
Definition at line 53 of file gene_info_reader.cpp. Referenced by CGeneInfoFileReader::GetRNAGisForGeneId(). |
|
|
Definition at line 34 of file gene_info_reader.cpp. |
1.4.6
Modified on Mon Dec 07 16:22:06 2009 by modify_doxy.py rev. 173732