A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/rmt__dataloader__test_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/data_loaders/blastdb/unit_test/rmt_dataloader_test.cpp Source File

82  bool

use_fixed_slice_size,

83  bool

use_remote_blast_db_loader =

false

) {

85  if

(use_remote_blast_db_loader) {

116  om

->GetRegisteredNames(loader_names);

118  om

->RevokeDataLoader(*itr);

124  om

->RevokeDataLoader(loader_name);

138  const string

db(

"nt"

);

139  const bool

is_protein(

false

);

140  const bool

use_fixed_size_slice(

true

);

141  const bool

is_remote(

true

);

143  CAutoRegistrar

reg(db, is_protein, use_fixed_size_slice, is_remote);

147

BOOST_REQUIRE_EQUAL(1U, loader_names.size());

148

BOOST_REQUIRE_EQUAL(

"REMOTE_BLASTDB_ntNucleotide"

, loader_names.front());

166

BOOST_REQUIRE(!handle2);

173  const string

db(

"9606_genomic"

);

174  const bool

is_protein(

false

);

175  const bool

is_remote(

true

);

181

BOOST_REQUIRE_EQUAL(1, loader_names.size());

182

BOOST_REQUIRE_EQUAL(

"REMOTE_BLASTDB_9606_genomicNucleotide"

,

183

loader_names.front());

193

BOOST_REQUIRE(handle1);

194  const TSeqPos

kLength(3084811);

201

kExpectedSeqData(

"ATTAACTGCAAATTACACGTATTGAGATGCATAAAAAGCCAAACCCTTGGGATAAAAATCTGAAAAGCTTTAAGAGGAAAAGTCTACCTCCTGAAATGAA"

);

204

BOOST_REQUIRE_EQUAL(kExpectedSeqData,

buffer

);

223  const string

db(

"nt"

);

224  const bool

is_protein(

false

);

225  const bool

kFixedSliceSize(

true

);

226  const bool

is_remote(

true

);

228  CAutoRegistrar

reg_prot(db, is_protein, kFixedSliceSize, is_remote);

239  typedef

pair<TGi, CSeq_inst::TLength> TGiLengthPair;

242

test_data.push_back(TGiLengthPair(

GI_CONST

(405832), 2592));

243

test_data.push_back(TGiLengthPair(

GI_CONST

(42365), 3326));

244

test_data.push_back(TGiLengthPair(

GI_CONST

(1274591754), 539));

250

BOOST_REQUIRE_EQUAL(ids.size(), test_data.size());

253

BOOST_REQUIRE_EQUAL(ids.size(), bhs.size());

255

TGiLengthVector::size_type

i

= 0;

257

BOOST_REQUIRE_EQUAL(bh->GetInst().GetLength(), test_data[

i

].second);

260

BOOST_REQUIRE_EQUAL(

i

, bhs.size());

265  const string

db(

"nr"

);

266  const bool

is_protein(

true

);

267  const bool

kFixedSliceSize(

true

);

268  const bool

is_remote(

true

);

270  CAutoRegistrar

reg_prot(db, is_protein, kFixedSliceSize, is_remote);

274

BOOST_REQUIRE_EQUAL(1, loader_names.size());

275

BOOST_REQUIRE_EQUAL(

"REMOTE_BLASTDB_nrProtein"

, loader_names.front());

277  CAutoRegistrar

reg_nucl(db, !is_protein, kFixedSliceSize, is_remote);

278

loader_names.clear();

280

BOOST_REQUIRE_EQUAL(2, loader_names.size());

281  bool

found_prot(

false

), found_nucl(

false

);

283  if

(*name ==

string

(

"REMOTE_BLASTDB_nrNucleotide"

)) {

286  if

(*name ==

string

(

"REMOTE_BLASTDB_nrProtein"

)) {

290

BOOST_REQUIRE(found_nucl);

291

BOOST_REQUIRE(found_prot);

302

BOOST_REQUIRE(handle1);

312

BOOST_REQUIRE(handle2);

325  const string dbname

(

"nr"

);

326  const bool

is_protein(

true

);

327  const bool

use_fixed_size_slice(

true

);

328  const bool

is_remote(

true

);

334

BOOST_REQUIRE_EQUAL(1, loader_names.size());

335

BOOST_REQUIRE_EQUAL(

"REMOTE_BLASTDB_nrProtein"

, loader_names.front());

344

BOOST_REQUIRE(handle1);

352

BOOST_REQUIRE(!handle2);

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

Data loader implementation that uses the blast databases remotely.

Declares the CBlastServices class.

Auxiliary class to register the BLAST database data loader of choice (information provided in the con...

static void RemoveAllDataLoaders()

CAutoRegistrar(const string &dbname, bool is_protein, bool use_fixed_slice_size, bool use_remote_blast_db_loader=false)

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

@ eNucleotide

nucleotide database

@ eProtein

protein database

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

static CSeq_id_Handle GetHandle(const CSeq_id &id)

Normal way of getting a handle, works for any seq-id.

TLoader * GetLoader(void) const

Get pointer to the loader.

void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)

Add data loader by name.

TTaxId GetTaxId(const CSeq_id &id, TGetFlags flags=0)

Get taxonomy id of bioseq Return -1 if sequence is not found Return 0 if sequence doesn't have taxono...

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

TBioseqHandles GetBioseqHandles(const TIds &ids)

Get bioseq handles for all ids.

CSeq_inst::TMol GetSequenceType(const CSeq_id &id, TGetFlags flags=0)

Get molecular type of sequence (protein/dna/rna) Return CSeq_inst::eMol_not_set if sequence is not fo...

vector< CBioseq_Handle > TBioseqHandles

void GetRegisteredNames(TRegisteredNames &names)

Get names of all registered data loaders.

vector< string > TRegisteredNames

vector< CSeq_id_Handle > TIds

@ kPriority_NotSet

Deprecated: use kPriority_Default instead.

CConstRef< CBioseq > GetCompleteBioseq(void) const

Get the complete bioseq.

bool State_NoData(void) const

CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const

Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.

const TInst & GetInst(void) const

@ eCoding_Iupac

Set coding to printable coding (Iupacna or Iupacaa)

void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const

Fill the buffer string with the sequence data for the interval [start, stop).

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_SCOPE(ns)

Define a new scope.

@ e_Gi

GenInfo Integrated Database.

const TInst & GetInst(void) const

Get the Inst member data.

TLength GetLength(void) const

Get the Length member data.

@ eMol_na

just a nucleic acid

char * dbname(DBPROCESS *dbproc)

Get name of current database.

static void RemoteFetchLongNucleotideBioseq(bool fixed_slice_size)

BOOST_AUTO_TEST_CASE(RemoteFetchNucleotideBioseq)

vector< TGiLenPair > TGiLengthVector

Vector containing pairs of gis and their length.

CRef< objects::CObjectManager > om

Utility stuff for more convenient using of Boost.Test library.


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