;
62 const string& under_valgrind =
env.Get(
"NCBI_RUN_UNDER_VALGRIND");
63 if( !under_valgrind.empty() ) {
68}
catch(
constexception&) {
70<< under_valgrind <<
"; treating as false.");
86 for(
unsigned i= 0;
i< sav.size();
i++) {
87total += sav[
i]->Get().size();
96pair<string,string> ab;
103 template<
classTOBJ>
108unique_ptr<CObjectOStream>
130 const size_tkNumQueries(2);
137query_seqlocs.front().Reset(
newCSeq_loc);
138query_seqlocs.front()->SetWhole(*
id);
143query_masks.front().push_back(sli);
149query_seqlocs.back().Reset(
newCSeq_loc);
150query_seqlocs.back()->SetWhole(*
id);
156query_masks.back().push_back(sli);
160query_masks.back().push_back(sli);
162 const stringkClientId(
"remote_blast_unit_test.cpp");
167BOOST_REQUIRE_EQUAL(
true, rmt_blast.
Submit());
169BOOST_REQUIRE_EQUAL(
false, rmt_blast.
GetRID().empty());
170BOOST_REQUIRE_EQUAL(kClientId, rmt_blast.
GetClientId());
172BOOST_REQUIRE(rmt_blast.
GetErrors().empty());
174vector<string> warnings;
177BOOST_REQUIRE_EQUAL(kNumQueries, network_masks.size());
180BOOST_REQUIRE_EQUAL((
size_t)1,
mask->GetLocations().size());
186BOOST_REQUIRE_EQUAL((
TSeqPos) 50,
si->GetFrom());
187BOOST_REQUIRE_EQUAL((
TSeqPos) 100,
si->GetTo());
189 mask= network_masks.back();
190BOOST_REQUIRE_EQUAL((
size_t)1,
mask->GetLocations().size());
191sl =
mask->GetLocations().front();
196BOOST_REQUIRE_EQUAL((
TSeqPos) 200,
si->GetFrom());
197BOOST_REQUIRE_EQUAL((
TSeqPos) 100,
si->GetTo());
210query_seqlocs.push_back(sl);
213BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
Submit());
218 const stringrid(
"BTUAFHUA013");
221BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
222BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
232vector<string> warnings;
235BOOST_REQUIRE(!masks.empty());
236BOOST_REQUIRE(!network_masks.empty());
237BOOST_REQUIRE(warnings.empty());
238 const size_tkNumQueries = 2;
239BOOST_REQUIRE_EQUAL(kNumQueries, masks.size());
240BOOST_REQUIRE_EQUAL(kNumQueries, network_masks.size());
243vector<TSeqRange> expected_masks;
244expected_masks.push_back(
TSeqRange(78, 89));
245BOOST_REQUIRE_EQUAL(expected_masks.size(), masks.front().size());
248BOOST_REQUIRE(seqlocinfo->NotEmpty());
249BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
250(*seqlocinfo)->GetInterval().GetFrom());
251BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
252(*seqlocinfo)->GetInterval().GetTo());
254(*seqlocinfo)->GetFrame());
259network_masks.front()->GetFrame());
261&network_masks.front()->GetLocations();
262BOOST_REQUIRE_EQUAL((
size_t)1, net_masks->size());
264net_masks->front()->GetPacked_int().Get()) {
265BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
266(*seqint)->GetFrom());
267BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
273expected_masks.clear();
274expected_masks.push_back(
TSeqRange(25, 31));
275expected_masks.push_back(
TSeqRange(35, 101));
276expected_masks.push_back(
TSeqRange(116, 123));
277expected_masks.push_back(
TSeqRange(131, 195));
278expected_masks.push_back(
TSeqRange(2022, 2337));
279BOOST_REQUIRE_EQUAL(expected_masks.size(), masks.back().size());
281BOOST_REQUIRE(seqlocinfo->NotEmpty());
282BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
283(*seqlocinfo)->GetInterval().GetFrom());
284BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
285(*seqlocinfo)->GetInterval().GetTo());
287(*seqlocinfo)->GetFrame());
293network_masks.back()->GetFrame());
294net_masks = &network_masks.back()->GetLocations();
295BOOST_REQUIRE_EQUAL((
size_t)1, net_masks->size());
297net_masks->front()->GetPacked_int().Get()) {
298BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
299(*seqint)->GetFrom());
300BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
307 const stringrid(
"BD4H4FMN014");
310BOOST_REQUIRE_MESSAGE(rid == rmt_blaster.
GetRID(),
"RID="<< rid);
311BOOST_REQUIRE_MESSAGE(rmt_blaster.
CheckDone(),
"RID="<< rid);
319vector<string> warnings;
322BOOST_REQUIRE(!masks.empty());
323BOOST_REQUIRE(!network_masks.empty());
324BOOST_REQUIRE(warnings.empty());
325 const size_tkNumQueries = 2;
326BOOST_REQUIRE_EQUAL(kNumQueries, masks.size());
327BOOST_REQUIRE_EQUAL(kNumQueries, network_masks.size());
330vector<TSeqRange> expected_masks;
331expected_masks.push_back(
TSeqRange(95, 119));
332expected_masks.push_back(
TSeqRange(196, 207));
333BOOST_REQUIRE_EQUAL(expected_masks.size(), masks.front().size());
336BOOST_REQUIRE(seqlocinfo->NotEmpty());
337BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
338(*seqlocinfo)->GetInterval().GetFrom());
339BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
340(*seqlocinfo)->GetInterval().GetTo());
342(*seqlocinfo)->GetFrame());
347network_masks.front()->GetFrame());
349&network_masks.front()->GetLocations();
350BOOST_REQUIRE_EQUAL((
size_t)1, net_masks->size());
352net_masks->front()->GetPacked_int().Get()) {
353BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
354(*seqint)->GetFrom());
355BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
361expected_masks.clear();
362expected_masks.push_back(
TSeqRange(91, 103));
363expected_masks.push_back(
TSeqRange(270, 289));
364BOOST_REQUIRE_EQUAL(expected_masks.size(), masks.back().size());
366BOOST_REQUIRE(seqlocinfo->NotEmpty());
367BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
368(*seqlocinfo)->GetInterval().GetFrom());
369BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
370(*seqlocinfo)->GetInterval().GetTo());
372(*seqlocinfo)->GetFrame());
377network_masks.back()->GetFrame());
378net_masks = &network_masks.back()->GetLocations();
379BOOST_REQUIRE_EQUAL((
size_t)1, net_masks->size());
381net_masks->front()->GetPacked_int().Get()) {
382BOOST_REQUIRE_EQUAL(expected_masks[index].GetFrom(),
383(*seqint)->GetFrom());
384BOOST_REQUIRE_EQUAL(expected_masks[index].GetTo(),
392 const stringrid(
"BW41NPVB014");
395BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
396BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
404vector<string> warnings;
407BOOST_REQUIRE(!masks.empty());
408BOOST_REQUIRE(!network_masks.empty());
409 const size_tkNumQueries = 2;
410 const size_tkNumNetMasks = 7;
411BOOST_REQUIRE_EQUAL(kNumQueries, masks.size());
412BOOST_REQUIRE_EQUAL(kNumNetMasks, network_masks.size());
416 typedefpair<TSeqRange, CSeqLocInfo::ETranslationFrame> TMask;
417 typedefvector<TMask> TQueryMasks;
418TQueryMasks expected_masks;
419expected_masks.push_back(make_pair(
TSeqRange(114, 155),
421BOOST_REQUIRE_EQUAL(expected_masks.size(), query1_masks.size());
424BOOST_REQUIRE(seqlocinfo->NotEmpty());
425 constTMask&
mask= expected_masks[index++];
426BOOST_REQUIRE_EQUAL(
mask.first.GetFrom(),
427(*seqlocinfo)->GetInterval().GetFrom());
428BOOST_REQUIRE_EQUAL(
mask.first.GetTo(),
429(*seqlocinfo)->GetInterval().GetTo());
430BOOST_REQUIRE_EQUAL((
int)
mask.second, (*seqlocinfo)->GetFrame());
434network_masks.front()->GetFrame());
436&network_masks.front()->GetLocations();
437BOOST_REQUIRE_EQUAL((
size_t)1, net_masks->size());
439net_masks->front()->GetPacked_int().Get()) {
440 constTMask&
mask= expected_masks[index++];
441BOOST_REQUIRE_EQUAL(
mask.first.GetFrom(),
442(*seqint)->GetFrom());
443BOOST_REQUIRE_EQUAL(
mask.first.GetTo(),
450expected_masks.clear();
515BOOST_REQUIRE_EQUAL(expected_masks.size(), query2_masks.size());
517BOOST_REQUIRE(seqlocinfo->NotEmpty());
518 constTMask&
mask= expected_masks[index++];
519BOOST_REQUIRE_EQUAL(
mask.first.GetFrom(),
520(*seqlocinfo)->GetInterval().GetFrom());
521BOOST_REQUIRE_EQUAL(
mask.first.GetTo(),
522(*seqlocinfo)->GetInterval().GetTo());
523BOOST_REQUIRE_EQUAL((
int)
mask.second, (*seqlocinfo)->GetFrame());
533BOOST_REQUIRE_EQUAL(
string(
"F"),
string(
tmp.get()));
542query_seqloc.front().Reset(
newCSeq_loc);
543query_seqloc.front()->SetWhole(*
id);
546BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
Submit());
549BOOST_REQUIRE(masks.size() == 1);
550BOOST_REQUIRE(masks.front().empty());
565BOOST_REQUIRE_THROW(rmt_blaster.
SetQueries(no_queries),
572 const stringrid(
"TNNF2YHZ016");
576BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
577BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
587 const stringrid(
"5VPB2NH1014");
590BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
591BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
602 const stringrid(
"HU0G064A013");
609BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
610BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
613 const string error(
"CPU usage limit was exceeded");
614BOOST_REQUIRE(rmt_blaster.
GetErrors().empty() ==
false);
624 const stringnon_existent_rid(
"1068741992-11111-263425.BLASTQ3");
628BOOST_REQUIRE_EQUAL(non_existent_rid, rmt_blaster.
GetRID());
630BOOST_REQUIRE_EQUAL(
false, rmt_blaster.
CheckDone());
640 const stringrid(
"HTXY8N45013");
644BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
645BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
647 "CPU usage limit was exceeded, resulting in SIGXCPU") !=
NPOS,
655 const stringrid(
"HTSZX47V013");
659BOOST_REQUIRE_EQUAL(rid, rmt_blaster.
GetRID());
660BOOST_REQUIRE_EQUAL(
true, rmt_blaster.
CheckDone());
663 "Error: CPU usage limit was exceeded") !=
NPOS,
687BOOST_REQUIRE(!
strcmp(
"Error: GetWordSize() not available.",
688exptn.
GetMsg().c_str()));
698 typedefncbi::objects::CBlast4_parameters TBlast4Opts;
702blast4_opts->GetParamByName(
"WordSize")->GetValue().GetInteger());
703BOOST_REQUIRE_EQUAL(18,
704blast4_opts->GetParamByName(
"MBTemplateLength")->GetValue().GetInteger());
705BOOST_REQUIRE_EQUAL(0,
706blast4_opts->GetParamByName(
"MBTemplateType")->GetValue().GetInteger());
708blast4_opts->GetParamByName(
"WindowSize")->GetValue().GetInteger());
724 stringrid(
"1112991234-9646-26841459756.BLASTQ3");
729BOOST_REQUIRE_EQUAL(3, (
int)sav.size());
732 for(
int i= 0;
i< (
int)sav.size();
i++) {
734sav[
i]->Get().front()->GetSeq_id(0).GetLabel(& L);
738BOOST_REQUIRE_EQUAL(
string(
"gi|129295"), ids[0]);
739BOOST_REQUIRE_EQUAL(
string(
"gi|129296"), ids[1]);
740BOOST_REQUIRE_EQUAL(
string(
"gi|129297"), ids[2]);
747 stringrid(
"BWX50RMX016");
753BOOST_REQUIRE_EQUAL(3, (
int)sav.size());
756 for(
int i= 0;
i< (
int)sav.size();
i++) {
758sav[
i]->Get().front()->GetSeq_id(0).GetLabel(& L);
762BOOST_REQUIRE_EQUAL(
string(
"gi|104501"), ids[0]);
763BOOST_REQUIRE_EQUAL(
string(
"gi|129295"), ids[1]);
764BOOST_REQUIRE_EQUAL(
string(
"lcl|47622"), ids[2]);
769 stringrid(
"1138040498-4204-115424753375.BLASTQ4");
773 stringdb_name =
"nr";
777BOOST_REQUIRE_EQUAL(dbs->
GetName(), db_name);
780BOOST_REQUIRE_EQUAL(rb.
GetProgram(),
string(
"blastn"));
781BOOST_REQUIRE_EQUAL(rb.
GetService(),
string(
"megablast"));
782BOOST_REQUIRE_EQUAL(rb.
GetCreatedBy(),
string(
"newblast"));
800 stringrid(
"BWY0XPAV014");
819db_name =
"nucl_dbs";
822db_name =
"prot_dbs";
834getseq_queries.push_back(seqid);
838 stringwarnings, errors;
848BOOST_REQUIRE(
results.size());
849BOOST_REQUIRE(
results[0].NotEmpty());
850BOOST_REQUIRE(
results[0]->CanGetInst());
852 intlength =
results[0]->GetInst().GetLength();
853BOOST_REQUIRE_EQUAL(length, 1863);
862 const intkGi(129295);
865getseq_queries.push_back(seqid);
867 stringwarnings, errors;
876BOOST_REQUIRE(
results.empty());
877BOOST_REQUIRE( !errors.empty() );
878BOOST_REQUIRE( errors.find(
"Failed to fetch sequence") !=
NPOS);
880BOOST_REQUIRE(warnings.empty());
888 stringrid(
"5VPRD45W015");
900BOOST_REQUIRE_EQUAL(
string(
"L;R -d repeat/repeat_9606;m;"),
901 string(
tmp.get()));
911 stringrid(
"BD4HUK3X014");
923BOOST_REQUIRE_EQUAL(
string(
"L;"),
string(
tmp.get()));
932vector< pair<string,string> > rids;
934 x_PushPairVec(rids,
"1126029035-8294-165438177459.BLASTQ3",
"blastp/plain");
935 x_PushPairVec(rids,
"1125682249-11093-192188840277.BLASTQ3",
"blastn/plain");
936 x_PushPairVec(rids,
"1125679472-29663-68767107779.BLASTQ3",
"tblastn/plain");
937 x_PushPairVec(rids,
"1125682851-24545-80609495337.BLASTQ3",
"tblastx/plain");
938 x_PushPairVec(rids,
"1125682308-9604-184897235466.BLASTQ3",
"blastx/plain");
941 for(
size_t i= 0;
i< rids.size();
i++) {
948BOOST_REQUIRE_EQUAL(ps, rids[
i].second);
955 stringhas_hits =
"1154969303-04718-55159010680.BLASTQ4";
956 stringno_hits =
"1154969303-04728-192386478174.BLASTQ4";
964BOOST_REQUIRE_EQUAL(102,
x_CountHits(
"BD4HYZYB014"));
965BOOST_REQUIRE_EQUAL(102,
x_CountHits(
"15ASW73R015"));
966BOOST_REQUIRE_EQUAL(102,
x_CountHits(
"15AU5834013"));
967BOOST_REQUIRE_EQUAL(102,
x_CountHits(
"BD4ENAS7014"));
981ncbi::objects::CBlast4_parameters * L =
982oh->SetOptions().GetBlast4AlgoOpts();
983 typedefncbi::objects::CBlast4_parameter TParam;
984 typedeflist< CRef<TParam> > TParamList;
989 ITERATE(TParamList, iter, L->Set()) {
990 constTParam & p = **iter;
992 if(p.GetName() ==
"WordSize") {
993BOOST_REQUIRE(p.CanGetValue());
994BOOST_REQUIRE(p.GetValue().IsInteger());
997 value= p.GetValue().GetInteger();
1001BOOST_REQUIRE_EQUAL(1,
count);
1002BOOST_REQUIRE_EQUAL(14,
value);
1012 const stringkDbName(
"nt");
1023 boolfound_query_range =
false;
1030vector<string> param_names;
1037 ITERATE(vector<string>, pname, param_names) {
1040found_query_range =
true;
1045BOOST_REQUIRE(found_query_range ==
false);
1050 ITERATE(vector<string>, pname, param_names) {
1053found_query_range =
true;
1058BOOST_REQUIRE(found_query_range ==
false);
1074 const stringkDbName(
"nt");
1085 boolfound_query_range =
false;
1092vector<string> param_names;
1099 ITERATE(vector<string>, pname, param_names) {
1102BOOST_REQUIRE(p->CanGetValue());
1103found_query_range =
true;
1105BOOST_REQUIRE_EQUAL((
int)query_range.
GetFrom(),
1106(
int)p->GetValue().GetInteger());
1109BOOST_REQUIRE_EQUAL((
int)query_range.
GetTo(),
1110(
int)p->GetValue().GetInteger());
1115BOOST_REQUIRE(found_query_range ==
true);
1117found_query_range =
false;
1121 ITERATE(vector<string>, pname, param_names) {
1124found_query_range =
true;
1129BOOST_REQUIRE(found_query_range ==
false);
1141ifstream
in(
"data/seq_entry_lcl_id.asn");
1151 const stringkDbName(
"nt");
1168BOOST_REQUIRE_EQUAL(query_loc.size(), b4_queries.
GetNumQueries());
1170BOOST_REQUIRE( !b4_queries.
IsPssm() );
1183 typedefpair<int, int> TGiLength;
1184vector<TGiLength> gis;
1185gis.push_back(TGiLength(555, 624));
1186gis.push_back(TGiLength(556, 310));
1187ifstream
in(
"data/seq_entry_gis.asn");
1190 ITERATE(vector<TGiLength>, gi, gis) {
1196query_loc.push_back(
SSeqLoc(sl, scope));
1201 const stringkDbName(
"nt");
1218BOOST_REQUIRE_EQUAL(query_loc.size(), b4_queries.
GetNumQueries());
1220BOOST_REQUIRE( !b4_queries.
IsPssm() );
1230 const char* fname =
"data/ss.asn";
1231ifstream
in(fname);
1232BOOST_REQUIRE(
in);
1234BOOST_REQUIRE(search_strategy.
NotEmpty());
1243 const char* fname =
"data/ss.xml";
1244ifstream
in(fname);
1245BOOST_REQUIRE(
in);
1247BOOST_REQUIRE(search_strategy.
NotEmpty());
1256 const char* fname =
"data/seq_entry_gis.asn";
1257ifstream
in(fname);
1258BOOST_REQUIRE(
in);
1266 const char* fname =
"data/archive.asn";
1267ifstream
in(fname);
1270BOOST_REQUIRE(rb.
GetProgram() ==
"blastn");
1271BOOST_REQUIRE(rb.
GetService() ==
"megablast");
1274BOOST_REQUIRE(blast_db->
GetName() ==
"refseq_rna");
1284 const char* fname =
"data/selenocysteines.fsa";
1285ifstream
in(fname);
1292 const char* fname =
"data/archive.bl2seq.asn";
1293ifstream
in(fname);
1296BOOST_REQUIRE(rb.
GetProgram() ==
"blastn");
1297BOOST_REQUIRE(rb.
GetService() ==
"megablast");
1303 const char* fname =
"data/archive.multiple_queries.asn";
1304ifstream
in(fname);
1307BOOST_REQUIRE(rb.
GetProgram() ==
"blastn");
1308BOOST_REQUIRE(rb.
GetService() ==
"plain");
1311BOOST_REQUIRE(blast_db->
GetName() ==
"nt");
Interface for reading SRA sequences into blast input.
Auxiliary classes/functions for BLAST input library.
Declares the CBlastNucleotideOptionsHandle class.
#define BLAST_WINDOW_SIZE_DISC
default window size (discontiguous megablast)
Declares class to encapsulate all BLAST options.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Declares the CBlastRPSOptionsHandle class.
Declares the CBlastServices class.
vector< CRef< objects::CSeq_align_set > > TSeqAlignVector
Vector of Seq-align-sets.
@ eBlastn
Nucl-Nucl (traditional blastn)
BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)
ncbi::TMaskedQueryRegions mask
const CSeq_id * GetFirstId() const
Field properties for options in a Blast4 parameter list.
static const string & GetName(EBlastOptIdx opt)
const string & GetName() const
Get field name (key).
static CBlast4Field & Get(EBlastOptIdx opt)
CRef< CBlast4_parameter > GetParamByName(const string name) const
Returns Blast4_parameter with specified name.
size_t GetNumQueries() const
Retrieve the number of queries in this object.
CBlast4_queue_search_request â.
CBlast4_request_body â.
Defines BLAST error codes (user errors included)
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
Encapsulates ALL the BLAST algorithm's options.
@ eRemote
To be used when running BLAST remotely.
Handle to the protein-protein options to the BLAST algorithm.
Handle to the rpsblast options to the BLAST algorithm.
CDiagLevelGuard(EDiagSev target)
Handle to the nucleotide-nucleotide options to the discontiguous BLAST algorithm.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
NCBI C++ Object Manager dependant implementation of IQueryFactory.
API for Remote Blast Requests.
structure for seqloc info
Root class for all serialization exceptions.
static CTestObjMgr & Instance()
Collection of masked regions for a single query sequence.
static const char si[8][64]
Declares the CDiscNucleotideOptionsHandle class.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
bool LoadFromArchive()
Loads next chunk of archive from file.
CRef< CBlastOptionsHandle > GetSearchOptions()
Get the search options used for this search.
Int8 GetEffectiveSearchSpace() const
Returns EffectiveSearchSpace.
string GetErrors(void)
This returns a string containing any errors that were produced by the search.
void SetDbLength(Int8 len)
Sets DbLength.
TSeqAlignVector GetSeqAlignSets()
Get the seqalign vector from the results.
int GetWordSize() const
Returns WordSize.
ESearchStatus CheckStatus()
Returns the status of a previously submitted search/RID.
Int8 GetDbLength() const
Returns DbLength.
const string & GetRID(void)
Gets the request id (RID) associated with the search.
void SetDatabase(const string &x)
Set the name of the database to search against.
static objects::CBlast4_get_search_results_reply::TMasks ConvertToRemoteMasks(const TSeqLocInfoVector &masking_locations, EBlastProgramType program, vector< string > *warnings=NULL)
Convert a TSeqLocInfoVector to a list< CRef<CBlast4_mask> > objects.
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.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
CBlastOptions & SetOptions()
Returns a reference to the internal options class which this object is a handle for.
void SetClientId(const string &client_id)
Sets the client ID used by this object to send requests.
CRef< objects::CBlast4_queries > GetQueries()
Get the queries used for this search.
bool GetGappedMode() const
Returns GappedMode.
size_type GetNumQueries() const
Return the number of unique query ID's represented by this object.
double GetPercentIdentity() const
Returns PercentIdentity.
void SetQueries(CRef< objects::CBioseq_set > bioseqs)
Set the query as a Bioseq_set.
vector< CRef< objects::CBioseq > > TBioseqVector
Defines a std::vector of CRef<CBioseq>
CRef< objects::CBlast4_request > ExtractBlast4Request(CNcbiIstream &in)
Extract a Blast4-request (a.k.a.
CRef< objects::CSeq_align_set > GetAlignments(void)
Get the seqalign set from the results.
bool Submit(void)
This submits the search (if necessary) and returns immediately.
TSeqLocInfoVector GetMasks(void)
Get the queries' masked locations.
CRef< objects::CBlast4_database > GetDatabases()
Get the database used by the search.
vector< CRef< objects::CSeq_id > > TSeqIdVector
Defines a std::vector of CRef<CSeq_id>
void SetWordSize(int ws)
Sets WordSize.
CRef< objects::CBlast4_request > GetSearchStrategy()
Fetch the search strategy for this object without submitting the search.
EBlastProgramType NetworkProgram2BlastProgramType(const string &program, const string &service)
Function to convert from program and service name into the CORE BLAST program type This is based on t...
string GetDbFilteringAlgorithmKey() const
Returns the filtering algorithm key used in the database.
CRef< CSearchResultSet > GetResultSet()
Submit the search (if necessary) and return the results.
void SetFilterString(const char *f, bool clear=true)
Sets FilterString.
const char * GetRepeatFilteringDB() const
Get the repeat filtering database.
void SetWordSize(int ws)
Sets WordSize.
string GetService()
Get the service used for this search.
bool CheckDone(void)
Check whether the search has completed.
list< CRef< objects::CSeq_loc > > TSeqLocList
Typedef for a list of Seq-locs.
string GetCreatedBy()
Get the created-by string associated with this search.
string GetWarnings(void)
This returns any warnings encountered.
int GetWindowSize() const
Returns WindowSize.
int GetHitlistSize() const
Returns HitlistSize.
void SetSegFiltering(bool val)
Enable SEG filtering.
Int4 GetDbFilteringAlgorithmId() const
Returns the filtering algorithm ID used in the database.
TBlast4Opts * GetBlast4AlgoOpts()
string GetClientId() const
Retrieves the client ID used by this object to send requests.
char * GetFilterString() const
Returns FilterString.
size_type GetNumResults() const
Return the number of results contained by this object.
string GetProgram()
Get the program used for this search.
double GetEvalueThreshold() const
Returns EvalueThreshold.
@ eStatus_Failed
Completed but failed, call GetErrors/GetErrorVector()
@ eStatus_Pending
Not completed yet.
@ eStatus_Unknown
Never submitted or purged from the system.
@ eStatus_Done
Completed successfully.
@ eBlastDbIsNucleotide
nucleotide
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
EDiagSev
Severity level for the posted diagnostics.
@ eDiag_Error
Error message.
const string & GetMsg(void) const
Get message string.
void Warning(CExceptionArgs_Base &args)
#define MSerial_AsnText
I/O stream manipulators â.
@ eSerial_AsnText
ASN.1 text.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
int64_t Int8
8-byte (64-bit) signed integer
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
static bool StringToBool(const CTempString str)
Convert string to bool.
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 SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
#define NCBITEST_DISABLE(test_name)
Unconditionally disable test case.
const TSubject & GetSubject(void) const
Get the Subject member data.
bool IsSeq_loc_list(void) const
Check if variant Seq_loc_list is selected.
const TService & GetService(void) const
Get the Service member data.
const TDatabase & GetDatabase(void) const
Get the variant data.
TType GetType(void) const
Get the Type member data.
E_Choice Which(void) const
Which variant is currently selected.
const TName & GetName(void) const
Get the Name member data.
bool IsPssm(void) const
Check if variant Pssm is selected.
bool CanGetQueries(void) const
Check if it is safe to call GetQueries method.
bool IsQueue_search(void) const
Check if variant Queue_search is selected.
TSeq_loc_list & SetSeq_loc_list(void)
Select the variant.
const TQueue_search & GetQueue_search(void) const
Get the variant data.
list< CRef< CSeq_loc > > TLocations
bool CanGetSubject(void) const
Check if it is safe to call GetSubject method.
bool IsBioseq_set(void) const
Check if variant Bioseq_set is selected.
bool CanGetProgram_options(void) const
Check if it is safe to call GetProgram_options method.
const TProgram_options & GetProgram_options(void) const
Get the Program_options member data.
const TQueries & GetQueries(void) const
Get the Queries member data.
list< CRef< CBlast4_mask > > TMasks
const TAlgorithm_options & GetAlgorithm_options(void) const
Get the Algorithm_options member data.
const TBody & GetBody(void) const
Get the Body member data.
const TProgram & GetProgram(void) const
Get the Program member data.
bool CanGetAlgorithm_options(void) const
Check if it is safe to call GetAlgorithm_options method.
@ eBlast4_frame_type_plus1
@ eBlast4_frame_type_notset
@ eBlast4_frame_type_minus1
@ eBlast4_residue_type_nucleotide
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
list< CRef< CSeq_interval > > Tdata
const Tdata & Get(void) const
Get the member data.
bool IsPacked_int(void) const
Check if variant Packed_int is selected.
const TPacked_int & GetPacked_int(void) const
Get the variant data.
@ e_Gi
GenInfo Integrated Database.
const TSeq & GetSeq(void) const
Get the variant data.
unsigned int
A callback function used to compare two keys in a database.
@ eBlastOpt_QueryCovHspPerc
@ eBlastOpt_Web_ExclModels
@ eBlastOpt_RequiredStart
Magic spell ;-) needed for some weird compilers... very empiric.
const GenericPointer< typename T::ValueType > T2 value
int strcmp(const char *str1, const char *str2)
static const char * kWordSize
std::istream & in(std::istream &in_, double &x_)
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
Declares the CRemoteBlast class.
BOOST_AUTO_TEST_CASE(MaskedQueryRegions)
static int x_CountHits(const string &rid)
static void x_PushPairVec(vector< pair< string, string > > &rids, string a, string b)
BOOST_AUTO_TEST_CASE_TIMEOUT(CheckPrimerBlastRID, 45)
string x_Stringify(TOBJ &obj)
vector< TMaskedQueryRegions > TSeqLocInfoVector
Collection of masked regions for all queries in a BLAST search.
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Structure to represent a single sequence to be fed to BLAST.
Utility stuff for more convenient using of Boost.Test library.
static const char * kUnknown
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
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