BOOST_REQUIRE(found ==
false);
119BOOST_REQUIRE(found ==
true);
126BOOST_REQUIRE(found ==
false);
133BOOST_REQUIRE(found ==
false);
135 #ifdef UNIT_TEST_REPEAT_DB 141blastdb->SetName(
"repeat/repeat_9606");
146BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
148 const stringtitle =
"Homo sapiens";
149BOOST_REQUIRE_EQUAL(title, dbinfo->GetDescription());
151BOOST_REQUIRE_EQUAL((
Int8)1362371, dbinfo->GetTotal_length());
152BOOST_REQUIRE_EQUAL((
Int8)1267, dbinfo->GetNum_sequences());
155vector< CRef<CBlast4_database_info> > repeat_dbs =
164TFoundDbs repeat_dbs_found;
165repeat_dbs_found[
"sapiens"] =
false;
166repeat_dbs_found[
"rodent"] =
false;
167repeat_dbs_found[
"thaliana"] =
false;
168repeat_dbs_found[
"sativa"] =
false;
169repeat_dbs_found[
"mammal"] =
false;
170repeat_dbs_found[
"fungi"] =
false;
171repeat_dbs_found[
"elegans"] =
false;
172repeat_dbs_found[
"gambiae"] =
false;
173repeat_dbs_found[
"danio"] =
false;
174repeat_dbs_found[
"melanogaster"] =
false;
175repeat_dbs_found[
"fugu"] =
false;
186 ITERATE(TFoundDbs, itr, repeat_dbs_found) {
187 string msg(
"Did not find ");
188 msg+= itr->first +
" repeats database";
189BOOST_REQUIRE_MESSAGE(itr->second,
msg);
199objects::CBlast4_get_windowmasked_taxids_reply::Tdata reply =
201BOOST_REQUIRE(!reply.empty());
202BOOST_REQUIRE(reply.find(9606) != reply.end());
215BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
217 const stringnt_title =
"Nucleotide collection (nt)";
218BOOST_REQUIRE_MESSAGE(nt_title == dbinfo->GetDescription(),
219 "Actual title is '"<< dbinfo->GetDescription() <<
"'");
221BOOST_REQUIRE(dbinfo->GetTotal_length() > (
Int8)15e+9);
222BOOST_REQUIRE(dbinfo->GetNum_sequences() > (
Int8)35e+5);
225vector< CRef<CBlast4_database_info> > dbinfo_v = remote_svc.
GetDatabaseInfo(
"nr",
false, &all_found);
226BOOST_REQUIRE(dbinfo_v.empty() ==
false);
227BOOST_REQUIRE(all_found ==
true);
228dbinfo = dbinfo_v.front();
230BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
232BOOST_REQUIRE_EQUAL(nt_title, dbinfo->GetDescription());
234BOOST_REQUIRE(dbinfo->GetTotal_length() > (
Int8)15e+9);
235BOOST_REQUIRE(dbinfo->GetNum_sequences() > (
Int8)35e+5);
238blastdb->
SetName(
"swissprot");
243BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
245 const stringswissprot_title(
"Non-redundant UniProtKB/SwissProt sequences");
246BOOST_REQUIRE(
NStr::StartsWith(dbinfo->GetDescription(), swissprot_title));
248BOOST_REQUIRE(dbinfo->GetTotal_length() > (
Int8)7e+7);
249BOOST_REQUIRE(dbinfo->GetNum_sequences() > (
Int8)15e+4);
255BOOST_REQUIRE(dbinfo.
Empty());
263BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
264BOOST_REQUIRE_EQUAL((
Int8)400, dbinfo->GetNum_sequences());
265BOOST_REQUIRE_EQUAL((
Int8)4662239, dbinfo->GetTotal_length());
271BOOST_REQUIRE(dbinfo.
Empty());
278BOOST_REQUIRE(dbinfo->GetDatabase() == *blastdb);
287 stringerrors, warnings;
291 const size_tkResultsSize = 1;
292BOOST_REQUIRE_EQUAL(kResultsSize,
results.size());
293BOOST_REQUIRE_EQUAL((
unsigned int)624,
results[0]->GetInst().
GetLength());
301 stringerrors, warnings;
307 const stringkExpectedError(
"Failed to open databases: [junk]");
308BOOST_REQUIRE_EQUAL(kExpectedError, errors);
309BOOST_REQUIRE(warnings.empty());
310BOOST_REQUIRE(
results.empty());
318 stringerrors, warnings;
321BOOST_REQUIRE_EQUAL(
string(
"Error: no sequences requested."), errors);
322BOOST_REQUIRE(warnings.empty());
323BOOST_REQUIRE(
results.empty());
330 const stringkDbName(
"ecoli");
332 TGiecoli_gis[] = { 1786181, 1786192, 2367095, 1786217, 1786230, 1786240,
3331786250, 1786262, 1786283, 1786298 };
337 for(
i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
339queries.push_back(
id);
342 stringwarnings, errors;
347BOOST_REQUIRE_EQUAL(queries.size(),
results.size());
348BOOST_REQUIRE(errors.empty());
349BOOST_REQUIRE(warnings.empty());
356BOOST_REQUIRE_EQUAL(ecoli_gis[
i++], (*id)->GetGi());
368 const stringkDbName(
"ecoli");
370 const intkGiNotFound(555);
371 intecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,
3721786240, 1786250, 1786262, 1786283, 1786298 };
375 for(
size_t i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
377queries.push_back(
id);
380 stringwarnings, errors;
385BOOST_REQUIRE_EQUAL(queries.size() - 1,
results.size());
386BOOST_REQUIRE( !errors.empty() );
387BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
389BOOST_REQUIRE(warnings.empty());
397 stringerrors, warnings;
403 const stringkExpectedError(
"Failed to open databases: [junk]");
404BOOST_REQUIRE_EQUAL(kExpectedError, errors);
405BOOST_REQUIRE(warnings.empty());
406BOOST_REQUIRE(
results.empty());
414 stringerrors, warnings;
418BOOST_REQUIRE_EQUAL(
string(
"Error: no sequences requested."), errors);
419BOOST_REQUIRE(warnings.empty());
420BOOST_REQUIRE(
results.empty());
429getseq_queries.push_back(seqid);
433 stringwarnings, errors;
439BOOST_REQUIRE_EQUAL(getseq_queries.size(),
results.size());
440BOOST_REQUIRE(
results[0].NotEmpty());
441 intlength =
results[0]->GetLength();
442BOOST_REQUIRE_EQUAL(232, length);
450 const intkGi(129295);
453getseq_queries.push_back(seqid);
455 stringwarnings, errors;
464BOOST_REQUIRE(
results.empty());
465BOOST_REQUIRE( !errors.empty() );
466BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
468BOOST_REQUIRE(warnings.empty());
475 const stringkDbName(
"ecoli");
477 TGiecoli_gis[] = { 1786181, 1786192, 2367095, 1786217,
4781786230, 1786240, 1786250, 1786262, 1786283, 1786298 };
482 for(
i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
484queries.push_back(
id);
487 stringwarnings, errors;
492BOOST_REQUIRE_EQUAL(queries.size(),
results.size());
493BOOST_REQUIRE(errors.empty());
494BOOST_REQUIRE(warnings.empty());
501BOOST_REQUIRE_EQUAL(ecoli_gis[
i++], (*id)->GetGi());
513 const stringkDbName(
"ecoli");
515 const intkGiNotFound(555);
516 intecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,
5171786240, 1786250, 1786262, 1786283, 1786298 };
520 for(
size_t i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
522queries.push_back(
id);
525 stringwarnings, errors;
530BOOST_REQUIRE_EQUAL(queries.size() - 1,
results.size());
531BOOST_REQUIRE( !errors.empty() );
532BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
534BOOST_REQUIRE(warnings.empty());
543 stringerrors, warnings;
550 const stringkExpectedError(
"Failed to open databases: [junk]");
551BOOST_REQUIRE_EQUAL(kExpectedError, errors);
552BOOST_REQUIRE(warnings.empty());
553BOOST_REQUIRE(
results.empty());
554BOOST_REQUIRE(ids.empty());
563 stringerrors, warnings;
568BOOST_REQUIRE_EQUAL(
string(
"Error: no sequences requested."), errors);
569BOOST_REQUIRE(warnings.empty());
570BOOST_REQUIRE(
results.empty());
571BOOST_REQUIRE(ids.empty());
581 stringerrors, warnings;
592BOOST_REQUIRE(
results.size());
593BOOST_REQUIRE(
results[0].NotEmpty());
594BOOST_REQUIRE(
results[0]->IsNcbi4na());
596 results[0]->GetNcbi4na().Get().size());
603 const intkGi(129295);
611 stringwarnings, errors;
617BOOST_REQUIRE(
results.empty());
618BOOST_REQUIRE( !errors.empty() );
619BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
621BOOST_REQUIRE(warnings.empty());
622BOOST_REQUIRE(ids.empty());
629 const stringkDbName(
"ecoli.aa");
631 TGiecoli_gis[] = { 1786182, 1786183, 1786184, 1786185,
6321786186, 1786187, 1786188, 1786189, 1786190, 1786191
638 for(
i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
642queries.push_back(
val);
645 stringwarnings, errors;
651BOOST_REQUIRE_EQUAL(queries.size(),
results.size());
652BOOST_REQUIRE(errors.empty());
653BOOST_REQUIRE(warnings.empty());
656BOOST_REQUIRE(seq_data->NotEmpty());
657BOOST_REQUIRE((*seq_data)->IsNcbistdaa());
658BOOST_REQUIRE_EQUAL(range.
GetLength() - 1,
659(*seq_data)->GetNcbistdaa().Get().size());
664BOOST_REQUIRE_EQUAL(ecoli_gis[
i++], (*id)->GetGi());
673 const stringkDbName(
"ecoli");
675 const intkGiNotFound(555);
676 intecoli_gis[] = { 1786181, 1786192, kGiNotFound, 1786217, 1786230,
6771786240, 1786250, 1786262, 1786283, 1786298 };
683 for(
i= 0;
i<
sizeof(ecoli_gis)/
sizeof(*ecoli_gis);
i++) {
687queries.push_back(
val);
690 stringwarnings, errors;
696BOOST_REQUIRE_EQUAL(queries.size() - 1,
results.size());
697BOOST_REQUIRE_EQUAL(
results.size(), ids.size());
698BOOST_REQUIRE( !errors.empty());
699BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
701BOOST_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