NCBI C++ ToolKit
Classes | Macros | Functions
seqdb_lmdb.cpp File Reference

Implements interface to interact with LMDB files. More...

#include <ncbi_pch.hpp>
#include <objtools/blast/seqdb_reader/impl/seqdb_lmdb.hpp>
#include <objtools/blast/seqdb_reader/impl/seqdbgeneral.hpp>
#include <corelib/ncbifile.hpp>
#include <objects/seqloc/PDB_seq_id.hpp>
#include <cmath>
+ Include dependency graph for seqdb_lmdb.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.


struct  SOidSeqIdPair
class  CLookupSeqIds
class  CLookupTaxIds


#define SPEED(time, nentries)   s_FormatNum((size_t)((nentries)/(time)))


template<class T >
static string s_FormatNum (T value)
bool s_CompareIdList (vector< string > &file_idlist, vector< string > &input_idlist)
string BuildLMDBFileName (const string &basename, bool is_protein, bool use_index, unsigned int index)
 Build the canonical LMDB file name for BLAST databases. More...
string GetFileNameFromExistingLMDBFile (const string &lmdb_filename, ELMDBFileType file_type)
void DeleteLMDBFiles (bool db_is_protein, const string &filename)

Detailed Description

Implements interface to interact with LMDB files.

Definition in file seqdb_lmdb.cpp.

Macro Definition Documentation



Definition at line 42 of file seqdb_lmdb.cpp.


#define SPEED (   time,
)    s_FormatNum((size_t)((nentries)/(time)))

Definition at line 53 of file seqdb_lmdb.cpp.

Function Documentation

◆ BuildLMDBFileName()

string BuildLMDBFileName ( const string basename,
bool  is_protein,
bool  use_index = false,
unsigned int  index = 0 

Build the canonical LMDB file name for BLAST databases.

basenameBase name of the BLAST database [in]
is_proteinwhether the database contains proteins or not [in]
a file name
std::invalid_argumentin case of empty basename argument

Definition at line 749 of file seqdb_lmdb.cpp.

References basename, kEmptyStr, and NStr::UIntToString().

Referenced by BOOST_AUTO_TEST_CASE(), CWriteDB_Impl::ListFiles(), CBlastdbConvertApp::Run(), s_ConvertV4toV5(), and CWriteDB_Impl::x_Publish().

◆ DeleteLMDBFiles()

void DeleteLMDBFiles ( bool  db_is_protein,
const string filename 

Definition at line 790 of file seqdb_lmdb.cpp.

References f(), ITERATE, and SeqDB_GetLMDBFileExtensions().

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetFileNameFromExistingLMDBFile()

string GetFileNameFromExistingLMDBFile ( const string lmdb_filename,
ELMDBFileType  file_type 

◆ s_CompareIdList()

bool s_CompareIdList ( vector< string > &  file_idlist,
vector< string > &  input_idlist 

◆ s_FormatNum()

template<class T >
static string s_FormatNum ( T  value)

Definition at line 45 of file seqdb_lmdb.cpp.

References locale, and rapidjson::value.

Modified on Mon May 27 04:35:23 2024 by rev. 669887