NCBI C++ ToolKit
Classes | Functions
seqdb.hpp File Reference

Defines BLAST database access classes. More...

#include <objtools/blast/seqdb_reader/seqdbcommon.hpp>
#include <objtools/blast/seqdb_reader/seqdbblob.hpp>
#include <objects/blastdb/Blast_def_line.hpp>
#include <objects/blastdb/Blast_def_line_set.hpp>
#include <objects/blastdb/defline_extra.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/blastdb/Blast_db_metadata.hpp>
#include <objects/blastdb/Blast_db_mask_info.hpp>
#include <util/sequtil/sequtil.hpp>
#include <util/range.hpp>
#include <set>
#include <objmgr/bioseq_handle.hpp>
+ Include dependency graph for seqdb.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.


class  CSeqDBIter
 CSeqDBIter. More...
class  CSeqDB
 CSeqDB. More...
struct  CSeqDB::TOffsetPair
 Structure to represent a range. More...
struct  CSeqDB::TSequenceRanges
 List of sequence offset ranges. More...
struct  SSeqDBInitInfo
 Structure to define basic information to initialize a BLAST DB. More...
class  CSeqDBSequence
 CSeqDBSequence –. More...


 USING_SCOPE (objects)
 Include definitions from the objects namespace. More...
vector< SSeqDBInitInfoFindBlastDBs (const string &path, const string &dbtype, bool recurse, bool include_alias_files=false, bool remove_redundant_dbs=false)
 Find BLAST DBs in the directory specified. More...
CSeqDB::ESeqType ParseMoleculeTypeString (const string &str)
 Convert a string to a CSeqDB ESeqType object. More...
bool DeleteBlastDb (const string &dbpath, CSeqDB::ESeqType seq_type)
 Deletes all files associated with a BLAST database. More...

Detailed Description

Defines BLAST database access classes.

Defines classes: CSeqDB CSeqDBSequence

Implemented for: UNIX, MS-Windows

Definition in file seqdb.hpp.

Function Documentation

◆ DeleteBlastDb()

bool DeleteBlastDb ( const string dbpath,
CSeqDB::ESeqType  seq_type 

Deletes all files associated with a BLAST database.

dbpathBLAST database file path [in]
seq_typeSequence type [in]
true if relevant files were deleted, else false

Definition at line 1542 of file seqdb.cpp.

References eBDB_Version4, CSeqDB::eProtein, f(), CSeqDB::FindVolumePaths(), Info(), NStr::IntToString(), ITERATE, LOG_POST, CDirEntry::Remove(), SeqDB_GetFileExtensions(), and SeqDB_GetLMDBFileExtensions().

Referenced by BOOST_AUTO_TEST_CASE(), CBuildDatabase::CBuildDatabase(), CBlastdbConvertApp::Run(), BlastdbCopyApplication::Run(), and s_DeleteMakeprofileDb().

◆ FindBlastDBs()

vector<SSeqDBInitInfo> FindBlastDBs ( const string path,
const string dbtype,
bool  recurse,
bool  include_alias_files = false,
bool  remove_redundant_dbs = false 

Find BLAST DBs in the directory specified.

pathdirectory to search BLAST DBs [in]
dbtypeBLAST DB molecule type, allowed values are 'prot', 'nucl', and 'guess' (which means any) [in]
recursewhether BLAST DBs should be found recursively or not [in]
include_alias_filesShould alias files be included also? [in]
remove_redundant_dbsShould BLASTDBs that are referenced by other alias files in the return value be removed? [in]

Definition at line 1429 of file seqdb.cpp.

References fFF_File, fFF_Recursive, FindFilesInDir(), flags, CBlastDbFinder::m_DBs, s_RemoveAliasComponents(), and ct::sort().

Referenced by CDirTest::Test().

◆ ParseMoleculeTypeString()

CSeqDB::ESeqType ParseMoleculeTypeString ( const string str)

Convert a string to a CSeqDB ESeqType object.

strstring containing the molecule type (e.g.: prot, nucl, guess)

Definition at line 1527 of file seqdb.cpp.

References _ASSERT, NStr::eNocase, CSeqDB::eNucleotide, CSeqDB::eProtein, CSeqDB::eUnknown, and NStr::StartsWith().

Referenced by CBuildDatabase::CBuildDatabase(), CBlastdbConvertApp::Run(), BlastdbCopyApplication::Run(), CDbTest::Test(), CBlastDBCmdApp::x_InitBlastDB(), and CBlastDBCmdApp::x_InitBlastDB_TaxIdList().


USING_SCOPE ( objects  )

Include definitions from the objects namespace.

Modified on Mon May 20 05:05:55 2024 by rev. 669887