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/blast__services__test_8cpp_source.html below:

NCBI C++ ToolKit: src/objtools/blast/services/unit_test/blast_services_test.cpp Source File

34 #define NCBI_TEST_APPLICATION 112

BOOST_REQUIRE(found ==

false

);

119

BOOST_REQUIRE(found ==

true

);

126

BOOST_REQUIRE(found ==

false

);

133

BOOST_REQUIRE(found ==

false

);

135 #ifdef UNIT_TEST_REPEAT_DB 141

blastdb->SetName(

"repeat/repeat_9606"

);

146

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

148  const string

title =

"Homo sapiens"

;

149

BOOST_REQUIRE_EQUAL(title, dbinfo->GetDescription());

151

BOOST_REQUIRE_EQUAL((

Int8

)1362371, dbinfo->GetTotal_length());

152

BOOST_REQUIRE_EQUAL((

Int8

)1267, dbinfo->GetNum_sequences());

155

vector< CRef<CBlast4_database_info> > repeat_dbs =

164

TFoundDbs repeat_dbs_found;

165

repeat_dbs_found[

"sapiens"

] =

false

;

166

repeat_dbs_found[

"rodent"

] =

false

;

167

repeat_dbs_found[

"thaliana"

] =

false

;

168

repeat_dbs_found[

"sativa"

] =

false

;

169

repeat_dbs_found[

"mammal"

] =

false

;

170

repeat_dbs_found[

"fungi"

] =

false

;

171

repeat_dbs_found[

"elegans"

] =

false

;

172

repeat_dbs_found[

"gambiae"

] =

false

;

173

repeat_dbs_found[

"danio"

] =

false

;

174

repeat_dbs_found[

"melanogaster"

] =

false

;

175

repeat_dbs_found[

"fugu"

] =

false

;

186  ITERATE

(TFoundDbs, itr, repeat_dbs_found) {

187  string msg

(

"Did not find "

);

188  msg

+= itr->first +

" repeats database"

;

189

BOOST_REQUIRE_MESSAGE(itr->second,

msg

);

199

objects::CBlast4_get_windowmasked_taxids_reply::Tdata reply =

201

BOOST_REQUIRE(!reply.empty());

202

BOOST_REQUIRE(reply.find(9606) != reply.end());

215

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

217  const string

nt_title =

"Nucleotide collection (nt)"

;

218

BOOST_REQUIRE_MESSAGE(nt_title == dbinfo->GetDescription(),

219  "Actual title is '"

<< dbinfo->GetDescription() <<

"'"

);

221

BOOST_REQUIRE(dbinfo->GetTotal_length() > (

Int8

)15e+9);

222

BOOST_REQUIRE(dbinfo->GetNum_sequences() > (

Int8

)35e+5);

225

vector< CRef<CBlast4_database_info> > dbinfo_v = remote_svc.

GetDatabaseInfo

(

"nr"

,

false

, &all_found);

226

BOOST_REQUIRE(dbinfo_v.empty() ==

false

);

227

BOOST_REQUIRE(all_found ==

true

);

228

dbinfo = dbinfo_v.front();

230

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

232

BOOST_REQUIRE_EQUAL(nt_title, dbinfo->GetDescription());

234

BOOST_REQUIRE(dbinfo->GetTotal_length() > (

Int8

)15e+9);

235

BOOST_REQUIRE(dbinfo->GetNum_sequences() > (

Int8

)35e+5);

238

blastdb->

SetName

(

"swissprot"

);

243

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

245  const string

swissprot_title(

"Non-redundant UniProtKB/SwissProt sequences"

);

246

BOOST_REQUIRE(

NStr::StartsWith

(dbinfo->GetDescription(), swissprot_title));

248

BOOST_REQUIRE(dbinfo->GetTotal_length() > (

Int8

)7e+7);

249

BOOST_REQUIRE(dbinfo->GetNum_sequences() > (

Int8

)15e+4);

255

BOOST_REQUIRE(dbinfo.

Empty

());

263

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

264

BOOST_REQUIRE_EQUAL((

Int8

)400, dbinfo->GetNum_sequences());

265

BOOST_REQUIRE_EQUAL((

Int8

)4662239, dbinfo->GetTotal_length());

271

BOOST_REQUIRE(dbinfo.

Empty

());

278

BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);

287  string

errors, warnings;

291  const size_t

kResultsSize = 1;

292

BOOST_REQUIRE_EQUAL(kResultsSize,

results

.size());

293

BOOST_REQUIRE_EQUAL((

unsigned int

)624,

results

[0]->GetInst().

GetLength

());

301  string

errors, warnings;

307  const string

kExpectedError(

"Failed to open databases: [junk]"

);

308

BOOST_REQUIRE_EQUAL(kExpectedError, errors);

309

BOOST_REQUIRE(warnings.empty());

310

BOOST_REQUIRE(

results

.empty());

318  string

errors, warnings;

321

BOOST_REQUIRE_EQUAL(

string

(

"Error: no sequences requested."

), errors);

322

BOOST_REQUIRE(warnings.empty());

323

BOOST_REQUIRE(

results

.empty());

330  const string

kDbName(

"ecoli"

);

332  TGi

ecoli_gis[] = { 1786181, 1786192, 2367095, 1786217, 1786230, 1786240,

333

1786250, 1786262, 1786283, 1786298 };

337  for

(

i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

339

queries.push_back(

id

);

342  string

warnings, errors;

347

BOOST_REQUIRE_EQUAL(queries.size(),

results

.size());

348

BOOST_REQUIRE(errors.empty());

349

BOOST_REQUIRE(warnings.empty());

356

BOOST_REQUIRE_EQUAL(ecoli_gis[

i

++], (*id)->GetGi());

368  const string

kDbName(

"ecoli"

);

370  const int

kGiNotFound(555);

371  int

ecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,

372

1786240, 1786250, 1786262, 1786283, 1786298 };

375  for

(

size_t i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

377

queries.push_back(

id

);

380  string

warnings, errors;

385

BOOST_REQUIRE_EQUAL(queries.size() - 1,

results

.size());

386

BOOST_REQUIRE( !errors.empty() );

387

BOOST_REQUIRE( errors.find(

"Failed to fetch sequence"

) !=

NPOS

);

389

BOOST_REQUIRE(warnings.empty());

397  string

errors, warnings;

403  const string

kExpectedError(

"Failed to open databases: [junk]"

);

404

BOOST_REQUIRE_EQUAL(kExpectedError, errors);

405

BOOST_REQUIRE(warnings.empty());

406

BOOST_REQUIRE(

results

.empty());

414  string

errors, warnings;

418

BOOST_REQUIRE_EQUAL(

string

(

"Error: no sequences requested."

), errors);

419

BOOST_REQUIRE(warnings.empty());

420

BOOST_REQUIRE(

results

.empty());

429

getseq_queries.push_back(seqid);

433  string

warnings, errors;

439

BOOST_REQUIRE_EQUAL(getseq_queries.size(),

results

.size());

440

BOOST_REQUIRE(

results

[0].NotEmpty());

441  int

length =

results

[0]->GetLength();

442

BOOST_REQUIRE_EQUAL(232, length);

450  const int

kGi(129295);

453

getseq_queries.push_back(seqid);

455  string

warnings, errors;

464

BOOST_REQUIRE(

results

.empty());

465

BOOST_REQUIRE( !errors.empty() );

466

BOOST_REQUIRE( errors.find(

"Failed to fetch sequence"

) !=

NPOS

);

468

BOOST_REQUIRE(warnings.empty());

475  const string

kDbName(

"ecoli"

);

477  TGi

ecoli_gis[] = { 1786181, 1786192, 2367095, 1786217,

478

1786230, 1786240, 1786250, 1786262, 1786283, 1786298 };

482  for

(

i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

484

queries.push_back(

id

);

487  string

warnings, errors;

492

BOOST_REQUIRE_EQUAL(queries.size(),

results

.size());

493

BOOST_REQUIRE(errors.empty());

494

BOOST_REQUIRE(warnings.empty());

501

BOOST_REQUIRE_EQUAL(ecoli_gis[

i

++], (*id)->GetGi());

513  const string

kDbName(

"ecoli"

);

515  const int

kGiNotFound(555);

516  int

ecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,

517

1786240, 1786250, 1786262, 1786283, 1786298 };

520  for

(

size_t i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

522

queries.push_back(

id

);

525  string

warnings, errors;

530

BOOST_REQUIRE_EQUAL(queries.size() - 1,

results

.size());

531

BOOST_REQUIRE( !errors.empty() );

532

BOOST_REQUIRE( errors.find(

"Failed to fetch sequence"

) !=

NPOS

);

534

BOOST_REQUIRE(warnings.empty());

543  string

errors, warnings;

550  const string

kExpectedError(

"Failed to open databases: [junk]"

);

551

BOOST_REQUIRE_EQUAL(kExpectedError, errors);

552

BOOST_REQUIRE(warnings.empty());

553

BOOST_REQUIRE(

results

.empty());

554

BOOST_REQUIRE(ids.empty());

563  string

errors, warnings;

568

BOOST_REQUIRE_EQUAL(

string

(

"Error: no sequences requested."

), errors);

569

BOOST_REQUIRE(warnings.empty());

570

BOOST_REQUIRE(

results

.empty());

571

BOOST_REQUIRE(ids.empty());

581  string

errors, warnings;

592

BOOST_REQUIRE(

results

.size());

593

BOOST_REQUIRE(

results

[0].NotEmpty());

594

BOOST_REQUIRE(

results

[0]->IsNcbi4na());

596  results

[0]->GetNcbi4na().Get().size());

603  const int

kGi(129295);

611  string

warnings, errors;

617

BOOST_REQUIRE(

results

.empty());

618

BOOST_REQUIRE( !errors.empty() );

619

BOOST_REQUIRE( errors.find(

"Failed to fetch sequence"

) !=

NPOS

);

621

BOOST_REQUIRE(warnings.empty());

622

BOOST_REQUIRE(ids.empty());

629  const string

kDbName(

"ecoli.aa"

);

631  TGi

ecoli_gis[] = { 1786182, 1786183, 1786184, 1786185,

632

1786186, 1786187, 1786188, 1786189, 1786190, 1786191

638  for

(

i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

642

queries.push_back(

val

);

645  string

warnings, errors;

651

BOOST_REQUIRE_EQUAL(queries.size(),

results

.size());

652

BOOST_REQUIRE(errors.empty());

653

BOOST_REQUIRE(warnings.empty());

656

BOOST_REQUIRE(seq_data->NotEmpty());

657

BOOST_REQUIRE((*seq_data)->IsNcbistdaa());

658

BOOST_REQUIRE_EQUAL(range.

GetLength

() - 1,

659

(*seq_data)->GetNcbistdaa().Get().size());

664

BOOST_REQUIRE_EQUAL(ecoli_gis[

i

++], (*id)->GetGi());

673  const string

kDbName(

"ecoli"

);

675  const int

kGiNotFound(555);

676  int

ecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,

677

1786240, 1786250, 1786262, 1786283, 1786298 };

683  for

(

i

= 0;

i

<

sizeof

(ecoli_gis)/

sizeof

(*ecoli_gis);

i

++) {

687

queries.push_back(

val

);

690  string

warnings, errors;

696

BOOST_REQUIRE_EQUAL(queries.size() - 1,

results

.size());

697

BOOST_REQUIRE_EQUAL(

results

.size(), ids.size());

698

BOOST_REQUIRE( !errors.empty());

699

BOOST_REQUIRE( errors.find(

"Failed to fetch sequence"

) !=

NPOS

);

701

BOOST_REQUIRE(warnings.empty());

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.

User-defined methods of the data storage class.

Declares the CBlastServices class.

BOOST_AUTO_TEST_CASE(GetInformationAboutInvalidBlastDatabaseRemotely)

static bool s_HasRawSequence(const CBioseq &bioseq)

BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)

API for Remote Blast Services.

static void GetSequenceParts(const TSeqIntervalVector &seqids, const string &database, char seqtype, TSeqIdVector &ids, TSeqDataVector &seq_data, string &errors, string &warnings, bool verbose=false)

This retrieves (partial) sequence data from the remote BLAST server.

static void GetSequencesInfo(TSeqIdVector &seqids, const string &database, char seqtype, TBioseqVector &bioseqs, string &errors, string &warnings, bool verbose=false, bool target_only=false)

Get a set of Bioseqs without their sequence data given an input set of.

bool IsValidBlastDb(const string &dbname, bool is_protein)

Returns true if the BLAST database specified exists in the NCBI servers.

static void GetSequences(TSeqIdVector &seqids, const string &database, char seqtype, TBioseqVector &bioseqs, string &errors, string &warnings, bool verbose=false, bool target_only=false)

Get a set of Bioseqs given an input set of Seq-ids.

vector< CRef< objects::CSeq_data > > TSeqDataVector

Defines a std::vector of CRef<CSeq_data>

vector< CRef< objects::CBioseq > > TBioseqVector

Defines a std::vector of CRef<CBioseq>

CRef< objects::CBlast4_database_info > GetDatabaseInfo(CRef< objects::CBlast4_database > blastdb)

Retrieve detailed information for one BLAST database If information about multiple databases is neede...

vector< CRef< objects::CSeq_interval > > TSeqIntervalVector

Defines a std::vector of CRef<CSeq_interval>

vector< CRef< objects::CSeq_id > > TSeqIdVector

Defines a std::vector of CRef<CSeq_id>

objects::CBlast4_get_windowmasked_taxids_reply::Tdata GetTaxIdWithWindowMaskerSupport()

Retrieve a list of NCBI taxonomy IDs for which there exists windowmasker masking data to support an a...

vector< CRef< objects::CBlast4_database_info > > GetOrganismSpecificRepeatsDatabases()

Retrieve organism specific repeats databases.

unsigned int TSeqPos

Type for sequence locations and lengths.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

TSeqPos GetLength(const CSeq_id &id, CScope *scope)

Get sequence length if scope not null, else return max possible TSeqPos.

bool NotEmpty(void) const THROWS_NONE

Check if CRef is not empty – pointing to an object and has a non-null value.

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

int64_t Int8

8-byte (64-bit) signed integer

position_type GetLength(void) const

static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)

Find the pattern in the specified range of a string using a case insensitive search.

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

void SetName(const TName &value)

Assign a value to Name data member.

void SetType(TType value)

Assign a value to Type data member.

@ eBlast4_residue_type_nucleotide

@ eBlast4_residue_type_unknown

@ eBlast4_residue_type_protein

TTo GetTo(void) const

Get the To member data.

TFrom GetFrom(void) const

Get the From member data.

@ e_Gi

GenInfo Integrated Database.

TRepr GetRepr(void) const

Get the Repr member data.

const TInst & GetInst(void) const

Get the Inst member data.

bool IsSetExt(void) const

extensions for special types Check if a value has been assigned to Ext data member.

list< CRef< CSeq_id > > TId

const TExt & GetExt(void) const

Get the Ext member data.

const TDelta & GetDelta(void) const

Get the variant data.

const Tdata & Get(void) const

Get the member data.

bool CanGetSeq_data(void) const

Check if it is safe to call GetSeq_data method.

list< CRef< CDelta_seq > > Tdata

@ eRepr_delta

sequence made by changes (delta) to others

@ e_Loc

point to a sequence

CBioseq_Info & GetBioseq(CTSE_Info &tse, const CBioObjectId &id)

Defines unified interface to application:

BOOST_AUTO_TEST_SUITE(psiblast_iteration)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

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

static const char * kSeqType


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