m_OIDStart (start_oid),
42vector<string> tmp_name;
43vector<TOid> tmp_num_oids;
44 TOidtotal_num_oids_lmdb = 0;
47vector<string>::const_iterator itr = vol_names.begin();
48 if(vol_names.size() > tmp_name.size()) {
52 for(
unsigned int i=0;
i< tmp_name.size();
i++) {
55total_num_oids_lmdb += tmp_num_oids[
i];
56v.
max_oid= total_num_oids_lmdb;
57 if((itr != vol_names.end()) && (*itr == v.
vol_name)) {
70 if(
m_OIDEnd!= total_num_oids_lmdb) {
84 for(
unsigned int i=0;
i< oids.size();
i++) {
92 for(
unsigned int i=0;
i< oids.size();
i++) {
94 TOidskipped_oids = 0;
95 for(
unsigned intj=0;j <
m_VolInfo.size(); j++) {
97skipped_oids +=
m_VolInfo[j].skipped_oids;
118 for(
unsigned int i=0;
i< oids.size();
i++) {
125 for(
unsigned int i=0;
i< oids.size();
i++) {
126 TOidskipped_oids = 0;
127 for(
unsigned intj=0;j <
m_VolInfo.size(); j++) {
129skipped_oids +=
m_VolInfo[j].skipped_oids;
186 TOidskipped_oids = 0;
188 for(
unsigned int i=0;
i< oids.size();
i++) {
191skipped_oids +=
m_VolInfo[j].skipped_oids;
195 tmp.push_back(oids[
i] + skipped_oids) ;
216vector<string> lmdb_vol_names;
217 boolversion5 =
true;
230 if(version5 ==
false) {
238 stringvol_lmdb_full_name;
242lmdb_full_name = vol_lmdb_full_name;
245 if(vol_lmdb_full_name == lmdb_full_name) {
246lmdb_vol_names.push_back(vol_name);
253lmdb_vol_names.clear();
254 if(entry->GetOIDEnd() < 0) {
258lmdb_full_name = vol_lmdb_full_name;
259lmdb_vol_names.push_back(vol_name);
266lmdb_vol_names.clear();
267 if(entry->GetOIDEnd() < 0) {
282oids.insert(oids.end(),
tmp.begin(),
tmp.end());
293vector <TOid>
tmp(accs.size(), 0);
296 for(
unsigned intj=0; j < oids.size(); j++) {
308vector <TOid>
tmp(ids.size(), 0);
310rv.insert(rv.end(),
tmp.begin(),
tmp.end());
317vector<TTaxId> tax_ids_found;
320rv_tax_ids.
insert(tax_ids_found.begin(), tax_ids_found.end());
324rv.insert(rv.end(),
tmp.begin(),
tmp.end());
325 if(rv_tax_ids.
size() < tax_ids.
size()) {
326rv_tax_ids.
insert(tax_ids_found.begin(), tax_ids_found.end());
329 if(rv.size() == 0) {
332tax_ids.
swap(rv_tax_ids);
337vector<TTaxId> tax_ids_found;
339 m_LMDBEntrySet[0]->NegativeTaxIdsToOids(tax_ids, rv, tax_ids_found);
340rv_tax_ids.
insert(tax_ids_found.begin(), tax_ids_found.end());
344rv.insert(rv.end(),
tmp.begin(),
tmp.end());
345 if(rv_tax_ids.
size() < tax_ids.
size()) {
346rv_tax_ids.
insert(tax_ids_found.begin(), tax_ids_found.end());
349 if(rv.size() == 0) {
353tax_ids.
swap(rv_tax_ids);
360tax_ids.
insert(
t.begin(),
t.end());
364tax_ids.
insert(
t.begin(),
t.end());
374 for(
unsigned int i=0;
i< oids.size();
i++){
411 stringactual_db_list;
414 stringshort_name , dir_part, out_name;
417 if( with_dir_path ) {
418out_name = dir_part + short_name ;
421out_name = short_name;
423 if( !actual_db_list.empty() ) actual_db_list.append(
" ");
424actual_db_list.append( out_name ) ;
426 returnactual_db_list ;
void GetTaxIdsForOids(const vector< blastdb::TOid > &oids, set< TTaxId > &tax_ids) const
void x_AdjustOidsOffset(vector< TOid > &oids) const
void GetDBTaxIds(vector< TTaxId > &tax_ids) const
CSeqDBLMDBEntry(const string &name, TOid start_oid, const vector< string > &vol_names)
Constructor.
void NegativeTaxIdsToOids(const set< TTaxId > &tax_ids, vector< blastdb::TOid > &rv, vector< TTaxId > &tax_ids_found) const
void AccessionsToOids(const vector< string > &accs, vector< TOid > &oids) const
void TaxIdsToOids(const set< TTaxId > &tax_ids, vector< blastdb::TOid > &rv, vector< TTaxId > &tax_ids_found) const
void x_AdjustOidsOffset_TaxList(vector< TOid > &oids) const
TOid m_OIDEnd
The end of the OID range.
TOid m_OIDStart
The start of the OID range.
void NegativeSeqIdsToOids(const vector< string > &ids, vector< blastdb::TOid > &rv) const
void AccessionToOids(const string &acc, vector< TOid > &oids) const
vector< SVolumeInfo > m_VolInfo
CRef< CSeqDBLMDB > m_LMDB
The underlying volume object.
CSeqDBLMDBSet()
Default Constructor.
vector< CRef< CSeqDBLMDBEntry > > m_LMDBEntrySet
void AccessionToOids(const string &acc, vector< TOid > &oids) const
void NegativeTaxIdsToOids(set< TTaxId > &tax_ids, vector< blastdb::TOid > &rv) const
std::string GetDBFileNames(bool with_dir_path=false) const
~CSeqDBLMDBSet()
Destructor.
void NegativeSeqIdsToOids(const vector< string > &ids, vector< blastdb::TOid > &rv) const
void GetTaxIdsForOids(const vector< blastdb::TOid > &oids, set< TTaxId > &tax_ids) const
void GetLMDBFileNames(vector< string > &lmdb_list) const
void AccessionsToOids(const vector< string > &accs, vector< TOid > &oids) const
void GetDBTaxIds(set< TTaxId > &tax_ids) const
void TaxIdsToOids(set< TTaxId > &tax_ids, vector< blastdb::TOid > &rv) const
void GetOids(const vector< string > &accessions, vector< blastdb::TOid > &oids) const
Get OIDs for a vector of string accessions.
void GetOid(const string &accession, vector< blastdb::TOid > &oids, const bool allow_dup=false) const
Get OIDs for single string accession.
void GetTaxIdsForOids(const vector< blastdb::TOid > &oids, set< TTaxId > &tax_ids) const
Get Tax Ids for oid list.
void GetOidsForTaxIds(const set< TTaxId > &tax_ids, vector< blastdb::TOid > &oids, vector< TTaxId > &tax_ids_found) const
Get Oids for Tax Ids list, idenitcal Oids are merged.
void NegativeSeqIdsToOids(const vector< string > &ids, vector< blastdb::TOid > &rv) const
Get Oids excluded from a vector of input accessions An oid only get exlcuded if all its seqids are fo...
void NegativeTaxIdsToOids(const set< TTaxId > &ids, vector< blastdb::TOid > &rv, vector< TTaxId > &tax_ids_found) const
Get Oids to exclude for Tax ids @parm ids Input tax ids to exclude /Output tax ids found.
void GetVolumesInfo(vector< string > &vol_names, vector< blastdb::TOid > &vol_num_oids)
Return info for all volumes.
void GetDBTaxIds(vector< TTaxId > &tax_ids) const
Get All Unique Tax Ids for db @parma tax_ids Return all unique tax ids found in db.
const CSeqDBVol * GetVol(int i) const
Find a volume by index.
int GetNumVols() const
Get the number of volumes.
const string & GetVolName() const
Get the volume name.
string GetLMDBFileName() const
Get sqlite file name associated with this volume Empty string if version 4.
CSeqDB_Substring FindDirName() const
Returns the portion of this path containing the directory.
CSeqDB_Substring FindBaseName() const
Returns the portion of this path containing the base name.
void GetString(string &s) const
Return the data by assigning it to a string.
iterator_bool insert(const value_type &val)
const_iterator begin() const
const_iterator end() const
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)
Split a path string into its basic components.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
const blastdb::TOid kSeqDBEntryNotFound
void SeqDB_CombinePath(const CSeqDB_Substring &path, const CSeqDB_Substring &file, const CSeqDB_Substring *extn, string &outp)
Combine a filesystem path and file name.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4