is_protein(
true);
106BOOST_REQUIRE(
source->End() ==
false);
107 boolcaught_exception(
false);
109blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
115BOOST_REQUIRE(
msg.find(
"GI/accession/sequence mismatch: protein input required but nucleotide provided")
118caught_exception =
true;
120BOOST_REQUIRE(caught_exception);
121BOOST_REQUIRE(
source->End() ==
true);
128 const boolis_protein(
false);
133BOOST_REQUIRE(
source->End() ==
false);
134 boolcaught_exception(
false);
136blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
142BOOST_REQUIRE(
msg.find(
"GI/accession/sequence mismatch: nucleotide input required but protein provided")
145caught_exception =
true;
147BOOST_REQUIRE(caught_exception);
148BOOST_REQUIRE(
source->End() ==
true);
155 const boolis_protein(
true);
160BOOST_REQUIRE(
source->End() ==
false);
161 boolcaught_exception(
false);
163blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
169BOOST_REQUIRE(
msg.find(
"GI/accession/sequence mismatch: protein input required but nucleotide provided")
172caught_exception =
true;
174BOOST_REQUIRE(caught_exception);
175BOOST_REQUIRE(
source->End() ==
true);
182 const boolis_protein(
false);
187BOOST_REQUIRE(
source->End() ==
false);
188 boolcaught_exception(
false);
190blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
196BOOST_REQUIRE(
msg.find(
"GI/accession/sequence mismatch: nucleotide input required but protein provided")
199caught_exception =
true;
201BOOST_REQUIRE(caught_exception);
202BOOST_REQUIRE(
source->End() ==
true);
229vector<SDubiousShortSequence> test_data;
232seq.assign(
"ykrggggwgg gggwkggggg gggwkggggg gkgggg");
235seq.assign(
"GGGGGGGGGGGGGGG");
241 ITERATE(vector<SDubiousShortSequence>, itr, test_data) {
250BOOST_REQUIRE(
source->End() ==
false);
251 boolcaught_exception(
false);
254ssl =
source->GetNextSeqLocBatch(scope).front();
260BOOST_REQUIRE(
msg.find(
"Gi/accession mismatch: ") !=
NPOS);
263caught_exception =
true;
265BOOST_REQUIRE(caught_exception ==
false);
266BOOST_REQUIRE(
source->End() ==
true);
269BOOST_REQUIRE_EQUAL(itr->GetLength(), length);
276 ITERATE(vector<SDubiousShortSequence>, itr, test_data) {
286BOOST_REQUIRE(
source->End() ==
false);
287 boolcaught_exception(
false);
290ssl =
source->GetNextSeqLocBatch(scope).front();
296BOOST_REQUIRE(
msg.find(
"Nucleotide FASTA provided for prot") !=
NPOS);
299caught_exception =
true;
301BOOST_REQUIRE(caught_exception ==
true);
302BOOST_REQUIRE(
source->End() ==
true);
311 const boolis_protein(
false);
317BOOST_REQUIRE(
source->End() ==
false);
318 boolcaught_exception(
false);
319 try{ blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front(); }
322BOOST_REQUIRE(
msg.find(
"Protein FASTA provided for nucleotide") !=
NPOS);
324caught_exception =
true;
326BOOST_REQUIRE(caught_exception);
327BOOST_REQUIRE(
source->End() ==
true);
334 const boolis_protein(
true);
340BOOST_REQUIRE(
source->End() ==
false);
341 boolcaught_exception(
false);
342 try{ blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front(); }
345BOOST_REQUIRE(
msg.find(
"Nucleotide FASTA provided for protein") !=
NPOS);
347caught_exception =
true;
349BOOST_REQUIRE(caught_exception);
350BOOST_REQUIRE(
source->End() ==
true);
357 const boolis_protein(
true);
362BOOST_REQUIRE(
source->End() ==
false);
363blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
364BOOST_REQUIRE(
source->End() ==
true);
366BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
369BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
370BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
372BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
373BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
375BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
377BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
379BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
380BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
382BOOST_REQUIRE(!ssl.mask);
390 const boolis_protein(
false);
395BOOST_REQUIRE(
source->End() ==
false);
396blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
397BOOST_REQUIRE(
source->End() ==
true);
399BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
402BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
403BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
405BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
406BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
408BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
410BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
412BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
413BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
415BOOST_REQUIRE(!ssl.mask);
422 const boolis_protein(
true);
428blast::SSeqLoc ssl = seqs.front();
429BOOST_REQUIRE(
source->End() ==
true);
431BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
434BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
435BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
437BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
439BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
441 const CSeq_id* seqid = ssl.seqloc->GetId();
445 for(
size_t i= 0;
i< sv.
size();
i++) {
446BOOST_CHECK_NE(
'-', (
char)sv[
i]);
452BOOST_REQUIRE_EQUAL(inst.
GetLength(), length);
457 for(
size_t i= 0;
i< seq.size();
i++) {
458BOOST_CHECK_NE(
'-', (
char)seq[
i]);
467 const boolis_protein(
false);
473blast::SSeqLoc ssl = seqs[0];
474BOOST_REQUIRE(
source->End() ==
true);
476BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
479BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
480BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
482BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
483BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
485BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
487BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
489BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
490BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
493BOOST_REQUIRE(bioseqs.
NotEmpty());
495BOOST_REQUIRE(!ssl.mask);
504 const boolis_protein(
false);
510blast::SSeqLoc ssl = seqs.front();
512BOOST_REQUIRE(
source->End() ==
true);
516BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
517BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->GetSeq().CanGetInst());
518BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->GetSeq().GetInst().CanGetRepr());
519BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->GetSeq().GetInst().GetRepr()
536 const boolis_protein(
false);
541BOOST_REQUIRE(
source->End() ==
false);
542blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
543BOOST_REQUIRE(
source->End() ==
true);
546BOOST_REQUIRE(s.find(
"Ignoring invalid residues at ") !=
NPOS);
548BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
551BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
552BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
554BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
555BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
557BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
559BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
561BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
562BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
564BOOST_REQUIRE(!ssl.mask);
570 const char* fname =
"data/invalid_gi.txt";
571 const boolis_protein(
false);
576BOOST_REQUIRE(
source->End() ==
false);
580 boolcaught_exception(
false);
581 try{ ssl =
source->GetNextSeqLocBatch(scope).front(); }
584BOOST_REQUIRE(
msg.find(
"Sequence ID not found: ") !=
NPOS);
586caught_exception =
true;
588BOOST_REQUIRE(caught_exception);
589BOOST_REQUIRE(
source->End() ==
true);
595 const char* fname =
"data/bad_seqid.txt";
596 const boolis_protein(
false);
601BOOST_REQUIRE(
source->End() ==
false);
605 boolcaught_exception(
false);
606 try{ ssl =
source->GetNextSeqLocBatch(scope).front(); }
610caught_exception =
true;
612BOOST_REQUIRE(caught_exception);
613BOOST_REQUIRE(
source->End() ==
true);
619 const char* fname =
"data/bad_input.txt";
620 const boolis_protein(
false);
621 const size_tkNumQueries(0);
628BOOST_REQUIRE(
source->End() ==
false);
631BOOST_REQUIRE_THROW(query_vector =
source->GetAllSeqLocs(scope),
633BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
634BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
637BOOST_REQUIRE(bioseqs.
Empty());
643BOOST_REQUIRE(
source->End() ==
false);
646BOOST_REQUIRE_THROW(query_vector =
source->GetAllSeqs(scope),
648BOOST_REQUIRE(query_vector.
Empty());
656 const char* fname =
"data/gis_bad_input.txt";
658 const boolis_protein(
false);
662vector< pair<long, long> > gi_length;
663gi_length.push_back(make_pair(89161185L, 247249719L));
669BOOST_REQUIRE(
source->End() ==
false);
674BOOST_REQUIRE_THROW(seqs =
source->GetAllSeqLocs(scope),
681 const char* fname(
"/dev/null");
682 const boolis_protein(
true);
688BOOST_REQUIRE(
source->End() ==
true);
691BOOST_REQUIRE(query_vector.empty());
694BOOST_REQUIRE(bioseqs.
Empty());
700BOOST_REQUIRE(
source->End() ==
true);
703BOOST_REQUIRE(queries->
Empty());
712 boolcaught_exception(
false);
716BOOST_REQUIRE(
msg.find(
"No sequence input was provided") !=
NPOS);
718caught_exception =
true;
720BOOST_REQUIRE(caught_exception);
729 const string kFileName(
"data/isprot.fa");
730 const stringkExpectedTitle(
"seq");
731 const boolis_protein(
false);
741BOOST_REQUIRE(!bioseqs.
Empty());
751BOOST_REQUIRE_EQUAL(kExpectedTitle, title);
769 CFastaReaderfasta_reader(*line_reader, defaultBLASTflags);
782 const stringkUserInput(
">seq_1\nATGC");
783 const TSeqPoskExpectedLength(4);
788 const stringkUserInput(
">seq_1\nATGC\n");
789 const TSeqPoskExpectedLength(4);
794 const stringkUserInput(
"ATGC");
795 const TSeqPoskExpectedLength(4);
804BOOST_REQUIRE(objmgr);
812BOOST_REQUIRE_EQUAL(expected_length,
815BOOST_REQUIRE_EQUAL(expected_length, sv->
size());
816BOOST_REQUIRE_EQUAL(is_protein, sv->
IsProtein());
818string::size_type input_pos =
input.find_first_of(
"ACTG");
819BOOST_REQUIRE(input_pos != string::npos);
820 for(
TSeqPospos = 0; pos < sv->
size(); pos++, input_pos++) {
822oss <<
"Sequence data differs at position "<< pos <<
": '" 823<<
input[input_pos] <<
"' .vs '"<< (*sv)[pos] <<
"'";
825BOOST_REQUIRE_MESSAGE(
input[input_pos] == (*sv)[pos],
msg);
832 const stringkUserInput(
">seq_1\nATGC");
833 const TSeqPoskExpectedLength(4);
839 const stringkUserInput(
">seq_1\nATGC\n");
840 const TSeqPoskExpectedLength(4);
846 const stringkUserInput(
"ATGC");
847 const TSeqPoskExpectedLength(4);
854 const stringkUserInput(
">mygene\n");
860 const boolis_protein(
false);
863 boolcaught_exception(
false);
875query_vector =
source->GetAllSeqLocs(scope);
879BOOST_REQUIRE(
msg.find(
"Query contains no sequence data") !=
NPOS);
880BOOST_REQUIRE(warnings.empty());
882caught_exception =
true;
884BOOST_REQUIRE(caught_exception);
885BOOST_REQUIRE(query_vector.empty() ==
false);
888BOOST_REQUIRE(!bioseqs.
Empty());
889caught_exception =
false;
893BOOST_REQUIRE(
msg.find(
"Query contains no sequence data") !=
NPOS);
894BOOST_REQUIRE(warnings.empty());
896caught_exception =
true;
898BOOST_REQUIRE(caught_exception);
905caught_exception =
false;
910BOOST_REQUIRE(
msg.find(
"Query contains no sequence data") !=
NPOS);
911BOOST_REQUIRE(warnings.empty());
913caught_exception =
true;
915BOOST_REQUIRE(caught_exception);
916BOOST_REQUIRE(!queries.
Empty());
930caught_exception =
false;
931queries =
source->GetAllSeqs(scope);
935BOOST_REQUIRE(
msg.find(
"Query contains no sequence data") !=
NPOS);
936BOOST_REQUIRE(warnings.empty());
938caught_exception =
true;
940BOOST_REQUIRE(caught_exception);
948 const boolis_protein(
false);
954BOOST_REQUIRE(
source->End() ==
false);
956blast::SSeqLoc ssl = seqs.front();
957BOOST_REQUIRE(
source->End() ==
true);
959BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
962BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
963BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
965BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
966BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
968BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
969 const TSeqPoslength(248956422);
970BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
972BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
973BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
974 const stringaccession(
"NC_000001");
975BOOST_REQUIRE_EQUAL(accession,
976ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
978BOOST_REQUIRE(!ssl.mask);
982BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
983BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
985BOOST_REQUIRE(
b.IsNa());
987BOOST_REQUIRE_EQUAL(accession,
b.GetId().front()->GetOther().GetAccession());
990BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
997 const boolis_protein(
false);
998 const TIntIdkGi = 568815597;
1000 const TSeqPoskStop(248956421);
1001 SDataLoaderConfigdlconfig(
"GPIPE/9606/current/GCF_000005045.26_top_level", is_protein);
1009BOOST_REQUIRE(
source->End() ==
false);
1012blast::SSeqLoc ssl = seqs.front();
1013BOOST_REQUIRE(
source->End() ==
true);
1015BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1018BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1019BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1021BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1022BOOST_REQUIRE_EQUAL(
kStart, ssl.seqloc->GetInt().GetFrom());
1024BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1025BOOST_REQUIRE_EQUAL(kStop, ssl.seqloc->GetInt().GetTo());
1027 const stringaccession =
"NC_000001";
1029BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1031BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1032BOOST_REQUIRE_EQUAL(
GI_CONST(kGi), ssl.seqloc->GetInt().GetId().GetGi());
1035BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
1036BOOST_REQUIRE_EQUAL(accession, ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
1037BOOST_REQUIRE_EQUAL(
version, ssl.seqloc->GetInt().GetId().GetOther().GetVersion());
1040BOOST_REQUIRE(!ssl.mask);
1045BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1046BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1048BOOST_REQUIRE(
b.IsNa());
1049 boolfound_gi =
false, found_accession =
false;
1052BOOST_REQUIRE_EQUAL(
GI_CONST(kGi), (*id)->GetGi());
1056(*id)->GetOther().AsFastaString(os);
1059found_accession =
true;
1062BOOST_REQUIRE(found_gi);
1063BOOST_REQUIRE(found_accession);
1067BOOST_REQUIRE_EQUAL(kStop+1,
b.GetInst().GetLength());
1081 const boolis_protein(
false);
1093BOOST_REQUIRE(
source->End() ==
false);
1095blast::SSeqLoc ssl = seqs.front();
1096BOOST_REQUIRE(
source->End() ==
true);
1098BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1101BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1102BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1104BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1105BOOST_REQUIRE_EQUAL(
kStart, ssl.seqloc->GetInt().GetFrom());
1107BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1108BOOST_REQUIRE_EQUAL(kStop, ssl.seqloc->GetInt().GetTo());
1110BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1111BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
1112 const stringaccession(
"NC_000001");
1113BOOST_REQUIRE_EQUAL(accession,
1114ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
1115BOOST_REQUIRE(!ssl.mask);
1119BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1120BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1122BOOST_REQUIRE(
b.IsNa());
1124BOOST_REQUIRE_EQUAL(accession,
b.GetId().front()->GetOther().GetAccession());
1127 const TSeqPoslength(248956422);
1128BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1142 const boolis_protein(
false);
1147vector< pair<string, long> > accession_lengths;
1148accession_lengths.push_back(make_pair(
string(
"NC_000001"), 248956422L));
1149accession_lengths.push_back(make_pair(
string(
"NC_000010.9"), 135374737L));
1150accession_lengths.push_back(make_pair(
string(
"NC_000011.8"), 134452384L));
1151accession_lengths.push_back(make_pair(
string(
"NC_000012.10"), 132349534L));
1153 const size_tkNumQueries(accession_lengths.size());
1156BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1157BOOST_REQUIRE(
source->End() ==
true);
1161BOOST_REQUIRE_EQUAL((
size_t)0, (
size_t)cached_queries.size());
1162BOOST_REQUIRE(
source->End() ==
true);
1165 for(
size_t i= 0;
i< kNumQueries;
i++) {
1167blast::SSeqLoc& ssl = query_vector[
i];
1168BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetStrand());
1169BOOST_REQUIRE_EQUAL((
TSeqPos)accession_lengths[
i].second - 1,
1170ssl.seqloc->GetInt().GetTo());
1172BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1174BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
1178 case0: accession.assign(
"NC_000001");
version= 0;
break;
1179 case1: accession.assign(
"NC_000010");
version= 9;
break;
1180 case2: accession.assign(
"NC_000011");
version= 8;
break;
1181 case3: accession.assign(
"NC_000012");
version= 10;
break;
1185BOOST_REQUIRE_EQUAL(accession,
1186ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
1188BOOST_REQUIRE_EQUAL(
version,
1189ssl.seqloc->GetInt().GetId().GetOther().GetVersion());
1191BOOST_REQUIRE(!ssl.mask);
1197BOOST_REQUIRE_EQUAL(kNumQueries, bioseqs->
GetSeq_set().size());
1204 typedefvector< pair<string, int> > TStringIntVector;
1205TStringIntVector accession_lengths;
1206accession_lengths.push_back(make_pair(
string(
"P01012.2"), 386));
1207accession_lengths.push_back(make_pair(
string(
"1OVA-A"), 386));
1209accession_lengths.push_back(make_pair(
string(
"pdb|1OVA-A"), 386));
1211accession_lengths.push_back(make_pair(
string(
"prf||0705172A"), 385));
1213accession_lengths.push_back(make_pair(
string(
"sp|P01012.2"), 386));
1219 ITERATE(TStringIntVector, itr, accession_lengths) {
1220user_input += itr->first +
"\n";
1222istringstream instream(user_input);
1224 const boolis_protein(
true);
1229 const size_tkNumQueries(accession_lengths.size());
1232BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1233BOOST_REQUIRE(
source->End() ==
true);
1237BOOST_REQUIRE_EQUAL((
size_t)0, (
size_t)cached_queries.size());
1238BOOST_REQUIRE(
source->End() ==
true);
1241 for(
size_t i= 0;
i< kNumQueries;
i++) {
1243 const string& accession = accession_lengths[
i].first;
1245blast::SSeqLoc& ssl = query_vector[
i];
1246oss <<
"Accession "<< accession <<
" difference in lengths: " 1247<< ((
TSeqPos)accession_lengths[
i].second - 1) <<
" vs. " 1248<< ssl.seqloc->GetInt().GetTo();
1250BOOST_REQUIRE_MESSAGE(((
TSeqPos)accession_lengths[
i].second - 1) ==
1251ssl.seqloc->GetInt().GetTo(),
msg);
1253BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1259BOOST_REQUIRE_EQUAL(kNumQueries, bioseqs->
GetSeq_set().size());
1266 const boolis_protein(
false);
1272BOOST_REQUIRE(
source->End() ==
false);
1274blast::SSeqLoc ssl = seqs.front();
1275BOOST_REQUIRE(
source->End() ==
true);
1277BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1280BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1281BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1283BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1284BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1286BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1287 const TSeqPoslength = 247249719;
1288BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1290BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1291BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1293BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetInt().GetId().GetGi());
1295BOOST_REQUIRE(!ssl.mask);
1299BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1300BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1302BOOST_REQUIRE(
b.IsNa());
1303BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi,
b.GetId().front()->Which());
1304BOOST_REQUIRE_EQUAL(gi,
b.GetId().front()->GetGi());
1307BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1314 const boolis_protein(
false);
1319vector< pair<TIntId, long> > gi_length;
1320gi_length.push_back(make_pair(89161185, 247249719L));
1321gi_length.push_back(make_pair(555, 624L));
1322gi_length.push_back(make_pair(557, 489L));
1324 const size_tkNumQueries(gi_length.size());
1326BOOST_REQUIRE(
source->End() ==
false);
1328BOOST_REQUIRE(
source->End() ==
true);
1330 for(
size_t i= 0;
i< kNumQueries;
i++) {
1331blast::SSeqLoc ssl = seqs[
i];
1332BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1334BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1335BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1337BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1338BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1340BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1341 const TSeqPoslength = gi_length[
i].second;
1342BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1344BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1346BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1347 const TIntIdgi = gi_length[
i].first;
1348BOOST_REQUIRE_EQUAL(
GI_FROM(
TIntId, gi), ssl.seqloc->GetInt().GetId().GetGi());
1350BOOST_REQUIRE(!ssl.mask);
1355BOOST_REQUIRE_EQUAL(kNumQueries, bioseqs->
GetSeq_set().size());
1357CBioseq_set::TSeq_set::const_iterator itr = bioseqs->
GetSeq_set().begin();
1358CBioseq_set::TSeq_set::const_iterator end = bioseqs->
GetSeq_set().end();
1359 for(
size_t i= 0;
i< kNumQueries;
i++, ++itr) {
1360BOOST_REQUIRE(itr != end);
1361BOOST_REQUIRE((*itr)->IsSeq());
1362 const CBioseq&
b= (*itr)->GetSeq();
1363BOOST_REQUIRE(
b.IsNa());
1364BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi,
b.GetId().front()->Which());
1368BOOST_REQUIRE_EQUAL((
long)gi_length[
i].second, (
long)
b.GetInst().GetLength());
1378 const boolis_protein(
false);
1381 const size_tkNumQueries(96);
1383BOOST_REQUIRE(
source->End() ==
false);
1387BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1396 const boolkParseID(
true);
1400 const size_tkNumQueries(96);
1402BOOST_REQUIRE(
source->End() ==
false);
1406BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1409BOOST_REQUIRE_EQUAL(query_vector[0].seqloc->GetId()->AsFastaString(),
string(
"lcl|seq#474_A03_564_c_T3+40.ab1"));
1410BOOST_REQUIRE_EQUAL(query_vector[1].seqloc->GetId()->AsFastaString(),
string(
"lcl|seq#474_A01_564_a_T3+40.ab1"));
1411BOOST_REQUIRE_EQUAL(query_vector[2].seqloc->GetId()->AsFastaString(),
string(
"lcl|seq#474_A02_564_b_T3+40.ab1"));
1419 const boolkParseID(
true);
1428BOOST_REQUIRE_EQUAL(query_vector[0].seqloc->GetId()->AsFastaString(),
string(
"lcl|mylocalID555"));
1437 const boolis_protein(
false);
1440 const size_tkNumQueries(6);
1442BOOST_REQUIRE(
source->End() ==
false);
1446BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1447BOOST_REQUIRE(
source->End() ==
true);
1448 TSeqPosquery_lengths[] = { 1920, 1, 130, 0, 2, 1552 };
1452BOOST_REQUIRE_EQUAL(query_lengths[
i],
1454query_vector[
i].scope));
1460BOOST_REQUIRE(warnings.find(
"following sequences had no sequence data:")
1466BOOST_REQUIRE(warnings.find(
"following sequences had no sequence data:")
1474 const boolis_protein(
false);
1481BOOST_REQUIRE(
source->End() ==
false);
1483vector< pair<int, long> > ti_lengths;
1484ti_lengths.push_back(make_pair(12345, 657L));
1485ti_lengths.push_back(make_pair(12347, 839L));
1486ti_lengths.push_back(make_pair(12348, 658L));
1487ti_lengths.push_back(make_pair(10000, 670L));
1489 const size_tkNumQueries(ti_lengths.size());
1491BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1492BOOST_REQUIRE(
source->End() ==
true);
1496BOOST_REQUIRE_EQUAL((
size_t)0, (
size_t)cached_queries.size());
1497BOOST_REQUIRE(
source->End() ==
true);
1500 const stringdb(
"ti");
1501 for(
size_t i= 0;
i< kNumQueries;
i++) {
1503 constblast::SSeqLoc& ssl = query_vector[
i];
1504BOOST_REQUIRE(ssl.seqloc->IsInt());
1506BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetStrand());
1507BOOST_REQUIRE_EQUAL((
TSeqPos)ti_lengths[
i].second - 1, seqint.
GetTo());
1509BOOST_REQUIRE(seqint.
IsSetId() ==
true);
1513BOOST_REQUIRE_EQUAL(ti_lengths[
i].
first,
1515BOOST_REQUIRE(!ssl.mask);
1520BOOST_REQUIRE_EQUAL(kNumQueries, bioseqs->
GetSeq_set().size());
1527 const boolis_protein(
false);
1534BOOST_REQUIRE(
source->End() ==
false);
1536blast::SSeqLoc ssl = seqs.front();
1537BOOST_REQUIRE(
source->End() ==
true);
1539BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1542BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1543BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1545BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1546BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1548BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1550BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1552BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1554 const stringdb(
"ti");
1555BOOST_REQUIRE_EQUAL(db, ssl.seqloc->GetInt().GetId().GetGeneral().GetDb());
1556BOOST_REQUIRE(ssl.seqloc->GetInt().GetId().GetGeneral().GetTag().IsId());
1557 const intti(12345);
1558BOOST_REQUIRE_EQUAL(ti, ssl.seqloc->GetInt().GetId().GetGeneral().GetTag().GetId());
1560BOOST_REQUIRE(!ssl.mask);
1564BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1565BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1567BOOST_REQUIRE(
b.IsNa());
1569BOOST_REQUIRE_EQUAL(db,
b.GetId().back()->GetGeneral().GetDb());
1570BOOST_REQUIRE_EQUAL(ti,
b.GetId().back()->GetGeneral().GetTag().GetId());
1573BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1580 const boolis_protein(
false);
1587vector< pair<string, long> > gi_accessions;
1588gi_accessions.push_back(make_pair(
string(
"89161215"), 111583154L));
1589gi_accessions.push_back(make_pair(
string(
"89161217"), 155407050L));
1590gi_accessions.push_back(make_pair(
string(
"89161219"), 11133097L));
1591gi_accessions.push_back(make_pair(
string(
"NC_000001"), 248956422L));
1592gi_accessions.push_back(make_pair(
string(
"NC_000010.9"), 135374737L));
1593gi_accessions.push_back(make_pair(
string(
"gnl|ti|12345"), 657L));
1594gi_accessions.push_back(make_pair(
string(
"NC_000011.8"), 134452384L));
1595gi_accessions.push_back(make_pair(
string(
"NC_000012.10"), 132349534L));
1597 const size_tkNumQueries(gi_accessions.size());
1600BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
1601BOOST_REQUIRE(
source->End() ==
true);
1605BOOST_REQUIRE_EQUAL((
size_t)0, (
size_t)cached_queries.size());
1606BOOST_REQUIRE(
source->End() ==
true);
1609 for(
size_t i= 0;
i< kNumQueries;
i++) {
1611blast::SSeqLoc& ssl = query_vector[
i];
1612BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetStrand());
1613BOOST_REQUIRE_EQUAL((
TSeqPos)gi_accessions[
i].second - 1,
1614ssl.seqloc->GetInt().GetTo());
1616 const string&
id= gi_accessions[
i].first;
1618BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1622BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1623BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetInt().GetId().GetGi());
1624}
else if(
i== 5) {
1626ssl.seqloc->GetInt().GetId().Which());
1627 const stringdb(
"ti");
1628BOOST_REQUIRE_EQUAL(db, ssl.seqloc->GetInt().GetId().GetGeneral().GetDb());
1629BOOST_REQUIRE(ssl.seqloc->GetInt().GetId().GetGeneral().GetTag().IsId());
1630 const intti(12345);
1631BOOST_REQUIRE_EQUAL(ti,
1632ssl.seqloc->GetInt().GetId().
1633GetGeneral().GetTag().
GetId());
1635BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
1640 case3: accession.assign(
"NC_000001");
version= 0;
break;
1641 case4: accession.assign(
"NC_000010");
version= 9;
break;
1642 case6: accession.assign(
"NC_000011");
version= 8;
break;
1643 case7: accession.assign(
"NC_000012");
version= 10;
break;
1647BOOST_REQUIRE_EQUAL(accession,
1648ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
1650BOOST_REQUIRE_EQUAL(
version,
1651ssl.seqloc->GetInt().GetId().GetOther().GetVersion());
1654BOOST_REQUIRE(!ssl.mask);
1660BOOST_REQUIRE_EQUAL(kNumQueries, bioseqs->
GetSeq_set().size());
1668 char buffer[2048] = {
'\0'};
1669unique_ptr<string> retval(
new string);
1675 returnretval.release();
1680 const char* fname(
"data/accession.txt");
1689BOOST_REQUIRE(
source->End() ==
false);
1691blast::SSeqLoc ssl = seqs.front();
1694BOOST_REQUIRE(
source->End() ==
true);
1696BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1698BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1699BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1701BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1702BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1704BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1705 const TSeqPoslength(248956422);
1706BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1708BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1710BOOST_REQUIRE_EQUAL(
CSeq_id::e_Other, ssl.seqloc->GetInt().GetId().Which());
1711 const stringaccession(
"NC_000001");
1712BOOST_REQUIRE_EQUAL(accession,
1713ssl.seqloc->GetInt().GetId().GetOther().GetAccession());
1715BOOST_REQUIRE(!ssl.mask);
1719BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1720BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1722BOOST_REQUIRE(
b.IsNa());
1724BOOST_REQUIRE_EQUAL(accession,
b.GetId().front()->GetOther().GetAccession());
1727BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1735unique_ptr<string> user_input(
new string(
" 1945386 \n "));
1742BOOST_REQUIRE(
source->End() ==
false);
1744BOOST_REQUIRE(
source->End() ==
true);
1745blast::SSeqLoc ssl = seqs.front();
1747BOOST_REQUIRE(
source->End() ==
true);
1749BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1751BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1752BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1754BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1755BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1757BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1759BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1761BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1764 const stringgb_name =
"HSU93236";
1765 const stringgb_accession =
"U93236";
1766 const intgb_version = 1;
1768BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1769BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetInt().GetId().GetGi());
1773BOOST_REQUIRE_EQUAL(gb_name, ssl.seqloc->GetInt().GetId().GetGenbank().GetName());
1774BOOST_REQUIRE_EQUAL(gb_accession, ssl.seqloc->GetInt().GetId().GetGenbank().GetAccession());
1775BOOST_REQUIRE_EQUAL(gb_version, ssl.seqloc->GetInt().GetId().GetGenbank().GetVersion());
1778BOOST_REQUIRE(!ssl.mask);
1782BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1783BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1785BOOST_REQUIRE(
b.IsNa());
1788BOOST_REQUIRE(
id.
NotNull());
1791BOOST_REQUIRE_EQUAL(gi, id->
GetGi());
1801BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1808unique_ptr<string> user_input(
new string(
" X65215.1 "));
1816BOOST_REQUIRE(
source.End() ==
false);
1818blast::SSeqLoc ssl = seqs.front();
1820BOOST_REQUIRE(
source.End() ==
true);
1822BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1824BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1825BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
1827BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1828BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1830BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1832BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1834BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1838 const stringaccession =
"X65215";
1841BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
1842BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetInt().GetId().GetGi());
1845BOOST_REQUIRE_EQUAL(
CSeq_id::e_Embl, ssl.seqloc->GetInt().GetId().Which());
1846BOOST_REQUIRE_EQUAL(accession, ssl.seqloc->GetInt().GetId().GetEmbl().GetAccession());
1847BOOST_REQUIRE_EQUAL(
version, ssl.seqloc->GetInt().GetId().GetEmbl().GetVersion());
1850BOOST_REQUIRE(!ssl.mask);
1854BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1855BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1857BOOST_REQUIRE(
b.IsNa());
1858 boolfound_gi =
false, found_accession =
false;
1861BOOST_REQUIRE_EQUAL(
GI_CONST(555), (*id)->GetGi());
1865(*id)->GetEmbl().AsFastaString(os);
1868found_accession =
true;
1871BOOST_REQUIRE(found_gi);
1872BOOST_REQUIRE(found_accession);
1875BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1881 const char* fname(
"data/aa.129295");
1890BOOST_REQUIRE(
source.End() ==
false);
1892blast::SSeqLoc ssl = seqs.front();
1894BOOST_REQUIRE(
source.End() ==
true);
1896BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
1898BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
1899BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
1901BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
1902BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
1904BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
1906BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1908BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
1909BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
1912BOOST_REQUIRE(!ssl.mask);
1915BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
1916BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
1918BOOST_REQUIRE(
b.IsAa());
1921BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
1929 const boolis_protein(
true);
1933iconfig.
SetRange().SetFrom(start);
1938blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
1940BOOST_REQUIRE_EQUAL(start, ssl.seqloc->GetInt().GetFrom());
1941BOOST_REQUIRE_EQUAL(stop, ssl.seqloc->GetInt().GetTo());
1950 const boolis_protein(
true);
1954iconfig.
SetRange().SetFrom(start);
1958blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
1960BOOST_REQUIRE_EQUAL(start, ssl.seqloc->GetInt().GetFrom());
1961BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
1970 const boolis_protein(
true);
1977 try{
source->GetNextSeqLocBatch(scope).front(); }
1980BOOST_REQUIRE(
msg.find(
"Invalid sequence range") !=
NPOS);
1984BOOST_REQUIRE(
false);
1991 const boolis_protein(
true);
1993iconfig.
SetRange().SetFrom(1000);
1997 try{
source->GetNextSeqLocBatch(scope).front(); }
2000BOOST_REQUIRE(
msg.find(
"Invalid from coordinate") !=
NPOS);
2004BOOST_REQUIRE(
false);
2011 const boolis_protein(
true);
2015iconfig.
SetRange().SetTo(length);
2019blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
2021BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
2023BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
2024BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
2026BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2027BOOST_REQUIRE_EQUAL((
TSeqPos)10, ssl.seqloc->GetInt().GetFrom());
2029BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
2030BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2037 const boolis_protein(
true);
2041iconfig.
SetRange().SetTo(length*2);
2045blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
2047BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
2049BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
2050BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
2052BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2053BOOST_REQUIRE_EQUAL((
TSeqPos)10, ssl.seqloc->GetInt().GetFrom());
2055BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
2056BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2063 const boolis_protein(
true);
2070 const stringname =
"OVAX_CHICK";
2071 const stringaccession =
"P01013";
2072 const stringrelease =
"reviewed";
2073blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front();
2077BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetId()->Which());
2078BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetId()->GetGi());
2079BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, ssl.seqloc->GetInt().GetId().Which());
2080BOOST_REQUIRE_EQUAL(gi, ssl.seqloc->GetInt().GetId().GetGi());
2084BOOST_REQUIRE_EQUAL(name, ssl.seqloc->GetId()->GetSwissprot().GetName());
2085BOOST_REQUIRE_EQUAL(accession, ssl.seqloc->GetId()->GetSwissprot().GetAccession());
2086BOOST_REQUIRE_EQUAL(release, ssl.seqloc->GetId()->GetSwissprot().GetRelease());
2088BOOST_REQUIRE_EQUAL(name, ssl.seqloc->GetInt().GetId().GetSwissprot().GetName());
2089BOOST_REQUIRE_EQUAL(accession, ssl.seqloc->GetInt().GetId().GetSwissprot().GetAccession());
2090BOOST_REQUIRE_EQUAL(release, ssl.seqloc->GetInt().GetId().GetSwissprot().GetRelease());
2098 const boolis_protein(
true);
2104 boolcaught_exception(
false);
2105 try{ blast::SSeqLoc ssl =
source->GetNextSeqLocBatch(scope).front(); }
2108BOOST_REQUIRE(
msg.find(
"Cannot assign nucleotide strand to protein")
2111caught_exception =
true;
2113BOOST_REQUIRE(caught_exception);
2114BOOST_REQUIRE(
source->End() ==
true);
2121 const boolis_protein(
false);
2126 const size_tkNumQueries(2);
2129BOOST_REQUIRE_EQUAL(kNumQueries, query_vector.size());
2130BOOST_REQUIRE(
source->End() ==
true);
2134BOOST_REQUIRE_EQUAL((
size_t)0, (
size_t)cached_queries.size());
2135BOOST_REQUIRE(
source->End() ==
true);
2138blast::SSeqLoc ssl = query_vector.front();
2141BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetStrand());
2143BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
2144BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2147ssl = query_vector.back();
2150BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetStrand());
2152BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
2153BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2155BOOST_REQUIRE(!ssl.mask);
2161 const char* fname(
"data/nt.cat");
2162 const boolis_protein(
false);
2175 constblast::SSeqLoc& ssl = *itr;
2176BOOST_REQUIRE_EQUAL((
int)strand, (
int)ssl.seqloc->GetStrand());
2177BOOST_REQUIRE_EQUAL((
int)strand, (
int)ssl.seqloc->GetInt().GetStrand());
2191 constblast::SSeqLoc& ssl = *itr;
2192BOOST_REQUIRE_EQUAL((
int)strand, (
int)ssl.seqloc->GetStrand());
2193BOOST_REQUIRE_EQUAL((
int)strand, (
int)ssl.seqloc->GetInt().GetStrand());
2203 const boolis_protein(
false);
2213blast::TSeqLocVector::iterator itr = seqs.begin();
2214blast::SSeqLoc ssl = *itr;
2215BOOST_REQUIRE(ssl.mask);
2216BOOST_REQUIRE(ssl.mask->IsPacked_int());
2219BOOST_REQUIRE_EQUAL((
size_t)2, masklocs.size());
2220BOOST_REQUIRE_EQUAL((
TSeqPos)126, masklocs.front()->GetFrom());
2221BOOST_REQUIRE_EQUAL((
TSeqPos)167, masklocs.front()->GetTo());
2223BOOST_REQUIRE(masklocs.front()->CanGetStrand());
2224BOOST_REQUIRE_EQUAL((
int)
eNa_strand_plus, (
int)masklocs.front()->GetStrand());
2226BOOST_REQUIRE_EQUAL((
TSeqPos)330, masklocs.back()->GetFrom());
2227BOOST_REQUIRE_EQUAL((
TSeqPos)356, masklocs.back()->GetTo());
2229BOOST_REQUIRE(masklocs.back()->CanGetStrand());
2230BOOST_REQUIRE_EQUAL((
int)
eNa_strand_plus, (
int)masklocs.back()->GetStrand());
2233BOOST_REQUIRE(ssl.mask);
2234BOOST_REQUIRE(ssl.mask->IsNull());
2241 const boolis_protein(
false);
2248BOOST_REQUIRE( !seqs->
Empty() );
2249BOOST_REQUIRE_EQUAL((
int)2, (
int)seqs->size());
2251BOOST_REQUIRE( !
query->GetMaskedRegions().empty());
2254 query->GetMaskedRegions().ConvertToCPacked_seqint();
2256CPacked_seqint::Tdata::const_iterator itr = masks->Get().begin();
2257BOOST_REQUIRE_EQUAL((
size_t)4, masklocs.size());
2261BOOST_REQUIRE_EQUAL((
TSeqPos)126, (*itr)->GetFrom());
2262BOOST_REQUIRE_EQUAL((
TSeqPos)167, (*itr)->GetTo());
2263BOOST_REQUIRE((*itr)->CanGetStrand());
2264BOOST_REQUIRE_EQUAL((
int)
eNa_strand_plus, (
int)(*itr)->GetStrand());
2266BOOST_REQUIRE_EQUAL((
TSeqPos)126, (*itr)->GetFrom());
2267BOOST_REQUIRE_EQUAL((
TSeqPos)167, (*itr)->GetTo());
2268BOOST_REQUIRE((*itr)->CanGetStrand());
2269BOOST_REQUIRE_EQUAL((
int)
eNa_strand_minus, (
int)(*itr)->GetStrand());
2272BOOST_REQUIRE_EQUAL((
TSeqPos)330, (*itr)->GetFrom());
2273BOOST_REQUIRE_EQUAL((
TSeqPos)356, (*itr)->GetTo());
2274BOOST_REQUIRE((*itr)->CanGetStrand());
2275BOOST_REQUIRE_EQUAL((
int)
eNa_strand_plus, (
int)(*itr)->GetStrand());
2277BOOST_REQUIRE_EQUAL((
TSeqPos)330, (*itr)->GetFrom());
2278BOOST_REQUIRE_EQUAL((
TSeqPos)356, (*itr)->GetTo());
2279BOOST_REQUIRE((*itr)->CanGetStrand());
2280BOOST_REQUIRE_EQUAL((
int)
eNa_strand_minus, (
int)(*itr)->GetStrand());
2283BOOST_REQUIRE(itr == masks->Get().end());
2286BOOST_REQUIRE(
query->GetMaskedRegions().empty());
2293 const boolis_protein(
true);
2299BOOST_REQUIRE(
source->End());
2300BOOST_REQUIRE_EQUAL((
size_t)19, v.size());
2307 const boolis_protein(
true);
2311iconfig.
SetRange().SetFrom(start).SetTo(stop);
2319BOOST_REQUIRE_EQUAL(start, itr->seqloc->GetInt().GetFrom());
2320BOOST_REQUIRE_EQUAL(stop, itr->seqloc->GetInt().GetTo());
2328 const boolis_protein(
true);
2337v =
source->GetNextSeqLocBatch(scope);
2338BOOST_REQUIRE_EQUAL((
size_t)7, v.size());
2339BOOST_REQUIRE_EQUAL((
TSeqPos)530, v[0].seqloc->GetInt().GetTo());
2341 stringname =
"G11A_ORYSA";
2342 stringaccession =
"P47997";
2343 stringrelease =
"reviewed";
2346BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetInt().GetId().Which());
2347BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetInt().GetId().GetGi());
2348BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetId()->Which());
2349BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetId()->GetGi());
2353BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetInt().GetId().GetSwissprot().GetName());
2354BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetInt().GetId().GetSwissprot().GetAccession());
2355BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetInt().GetId().GetSwissprot().GetRelease());
2357BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetId()->GetSwissprot().GetName());
2358BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetId()->GetSwissprot().GetAccession());
2359BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetId()->GetSwissprot().GetRelease());
2362v =
source->GetNextSeqLocBatch(scope);
2363BOOST_REQUIRE_EQUAL((
size_t)8, v.size());
2364BOOST_REQUIRE_EQUAL((
TSeqPos)445, v[0].seqloc->GetInt().GetTo());
2366name =
"KCC1_YEAST";
2367accession =
"P27466";
2368release =
"reviewed";
2371BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetInt().GetId().Which());
2372BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetInt().GetId().GetGi());
2373BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetId()->Which());
2374BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetId()->GetGi());
2378BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetInt().GetId().GetSwissprot().GetName());
2379BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetInt().GetId().GetSwissprot().GetAccession());
2380BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetInt().GetId().GetSwissprot().GetRelease());
2382BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetId()->GetSwissprot().GetName());
2383BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetId()->GetSwissprot().GetAccession());
2384BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetId()->GetSwissprot().GetRelease());
2387v =
source->GetNextSeqLocBatch(scope);
2388BOOST_REQUIRE_EQUAL((
size_t)4, v.size());
2389BOOST_REQUIRE_EQUAL((
TSeqPos)688, v[0].seqloc->GetInt().GetTo());
2391name =
"ARK1_HUMAN";
2392accession =
"P25098";
2393release =
"reviewed";
2396BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetInt().GetId().Which());
2397BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetInt().GetId().GetGi());
2398BOOST_REQUIRE_EQUAL(
CSeq_id::e_Gi, v[0].seqloc->GetId()->Which());
2399BOOST_REQUIRE_EQUAL(gi, v[0].seqloc->GetId()->GetGi());
2403BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetInt().GetId().GetSwissprot().GetName());
2404BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetInt().GetId().GetSwissprot().GetAccession());
2405BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetInt().GetId().GetSwissprot().GetRelease());
2407BOOST_REQUIRE_EQUAL(name, v[0].seqloc->GetId()->GetSwissprot().GetName());
2408BOOST_REQUIRE_EQUAL(accession, v[0].seqloc->GetId()->GetSwissprot().GetAccession());
2409BOOST_REQUIRE_EQUAL(release, v[0].seqloc->GetId()->GetSwissprot().GetRelease());
2412BOOST_REQUIRE(
source->End());
2419 const boolis_protein(
false);
2425BOOST_REQUIRE(
source->End());
2426BOOST_REQUIRE_EQUAL((
size_t)1, v.size());
2433 const boolis_protein(
false);
2443 string input(
"gb|ABZI01000088\ngb|ABZN01000067");
2444istringstream instream(
input);
2446 const boolis_protein(
false);
2452BOOST_REQUIRE(
source->End() ==
false);
2454BOOST_REQUIRE(
source->End() ==
true);
2455BOOST_REQUIRE_EQUAL(2u, seqs.size());
2462 string input(
"gb|ABZN01000067\ngb|ABZI01000088");
2463istringstream instream(
input);
2465 const boolis_protein(
false);
2471BOOST_REQUIRE(
source->End() ==
false);
2473BOOST_REQUIRE(
source->End() ==
true);
2474BOOST_REQUIRE_EQUAL(2u, seqs.size());
2481 string input(
"gb|ABZN01000067");
2483istringstream instream(
input);
2485 const boolis_protein(
false);
2491BOOST_REQUIRE(
source->End() ==
false);
2493BOOST_REQUIRE(
source->End() ==
true);
2494BOOST_REQUIRE_EQUAL(1u, seqs.size());
2501 string input(
"gb|ABZI01000088");
2503istringstream instream(
input);
2505 const boolis_protein(
false);
2511BOOST_REQUIRE(
source->End() ==
false);
2513BOOST_REQUIRE(
source->End() ==
true);
2514BOOST_REQUIRE_EQUAL(1u, seqs.size());
2521 stringpdb_mol(
"1QCF");
2522 stringpdb_chain(
"A");
2523 stringpdb(pdb_mol +
'_'+ pdb_chain);
2524istringstream instream(pdb);
2526 const boolis_protein(
true);
2532BOOST_REQUIRE(
source->End() ==
false);
2534blast::SSeqLoc ssl = seqs.front();
2536BOOST_REQUIRE(
source->End() ==
true);
2538BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
2540BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
2541BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
2543BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2544BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
2546BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
2548BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2550BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
2551BOOST_REQUIRE_EQUAL(
CSeq_id::e_Pdb, ssl.seqloc->GetInt().GetId().Which());
2553BOOST_REQUIRE_EQUAL(pdb_mol, ssl.seqloc->GetInt().GetId().GetPdb().GetMol().Get());
2555BOOST_REQUIRE(!ssl.mask);
2559BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
2560BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
2562BOOST_REQUIRE(!
b.IsNa());
2564BOOST_REQUIRE_EQUAL(pdb_mol,
b.GetId().front()->GetPdb().GetMol().Get());
2567BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
2573 stringwgs_master(
"NZ_ABFD00000000.2");
2574istringstream instream(wgs_master);
2576 const boolis_protein(
false);
2588 const boolis_protein(
false);
2596blast::SSeqLoc ssl = seqs.front();
2597BOOST_CHECK(
source->End() ==
true);
2601 const stringkSeqData =
2602 "AGCACCACGACTGCTAACCGTAACGCCAGGTGTATAACCTAATGCTTCTTTACAGACTGAAATTGATGCATCTGCATCTC" 2603 "TTCATTTGTCACAACCGAAATA";
2605BOOST_CHECK(ssl.seqloc->IsInt());
2606BOOST_REQUIRE(ssl.seqloc->GetId()->IsGeneral());
2608ssl.seqloc->GetId()->GetGeneral().GetType());
2610BOOST_CHECK(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2611BOOST_CHECK_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
2613BOOST_CHECK(ssl.seqloc->GetInt().IsSetTo() ==
true);
2614BOOST_CHECK_EQUAL(kSeqData.size()-1, ssl.seqloc->GetInt().GetTo());
2616 const CSeq_id* seqid = ssl.seqloc->GetId();
2620BOOST_CHECK_EQUAL(kSeqData.size(), sv.
size());
2623oss <<
"Base number "<<
i+1 <<
" differs: got '" 2624<< (char)sv[
i] <<
"', expected '"<< kSeqData[
i]
2627BOOST_CHECK_MESSAGE((
char)sv[
i] == kSeqData[
i],
msg);
2628BOOST_CHECK_NE(
'-', (
char)sv[
i]);
2634BOOST_CHECK_EQUAL(inst.
GetLength(), kSeqData.size());
2639 for(
size_t i= 0;
i< seq.size();
i++) {
2641oss <<
"Base number "<<
i+1 <<
" differs: got '" 2642<< (char)sv[
i] <<
"', expected '"<< kSeqData[
i]
2645BOOST_CHECK_MESSAGE((
char)sv[
i] == kSeqData[
i],
msg);
2646BOOST_CHECK_NE(
'-', (
char)seq[
i]);
2653 stringpdb_mol(
"1IQR");
2654 stringpdb_chain(
"A");
2656 for(
int i= 0;
i< 2;
i++) {
2660pdb.assign(pdb_mol +
'|'+ pdb_chain);
2662pdb.assign(pdb_mol +
"_"+ pdb_chain);
2664istringstream instream(pdb);
2666 const boolis_protein(
true);
2672BOOST_REQUIRE(
source->End() ==
false);
2674blast::SSeqLoc ssl = seqs.front();
2675BOOST_REQUIRE(
source->End() ==
true);
2677BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
2679BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
2680BOOST_REQUIRE_EQUAL((
int)
eNa_strand_unknown, (
int)ssl.seqloc->GetInt().GetStrand());
2682BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2683BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
2685BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
2687BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2689BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
2690BOOST_REQUIRE_EQUAL(
CSeq_id::e_Pdb, ssl.seqloc->GetInt().GetId().Which());
2692BOOST_REQUIRE_EQUAL(pdb_mol,
2693ssl.seqloc->GetInt().GetId().GetPdb().GetMol().Get());
2695BOOST_REQUIRE(!ssl.mask);
2699BOOST_REQUIRE_EQUAL((
size_t)1, bioseqs->
GetSeq_set().size());
2700BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
2702BOOST_REQUIRE(!
b.IsNa());
2704BOOST_REQUIRE_EQUAL(pdb_mol,
b.GetId().front()->GetPdb().GetMol().Get());
2707BOOST_REQUIRE_EQUAL(length,
b.GetInst().GetLength());
2719 const boolis_protein(
false);
2724BOOST_REQUIRE(
source->End() ==
false);
2726blast::SSeqLoc ssl = seqs.front();
2727BOOST_REQUIRE(
source->End() ==
true);
2729BOOST_REQUIRE(ssl.seqloc->IsInt() ==
true);
2732BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetStrand() ==
true);
2733BOOST_REQUIRE_EQUAL((
int)
eNa_strand_both, (
int)ssl.seqloc->GetInt().GetStrand());
2735BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetFrom() ==
true);
2736BOOST_REQUIRE_EQUAL((
TSeqPos)0, ssl.seqloc->GetInt().GetFrom());
2738BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetTo() ==
true);
2740BOOST_REQUIRE_EQUAL(length-1, ssl.seqloc->GetInt().GetTo());
2742BOOST_REQUIRE(ssl.seqloc->GetInt().IsSetId() ==
true);
2743BOOST_REQUIRE_EQUAL(
CSeq_id::e_Local, ssl.seqloc->GetInt().GetId().Which());
2744BOOST_REQUIRE(!ssl.mask);
2748BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->IsSeq());
2749BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->GetSeq().CanGetInst());
2750BOOST_REQUIRE(bioseqs->
GetSeq_set().front()->GetSeq().GetInst().CanGetRepr());
2752bioseqs->
GetSeq_set().front()->GetSeq().GetInst().GetRepr());
2756 template<
typenameT>
2803BOOST_REQUIRE_EQUAL(0
U,
r.GetFrom());
2804BOOST_REQUIRE_EQUAL(9U,
r.GetTo());
2805BOOST_REQUIRE_EQUAL(10U,
r.GetToOpen());
2817 "ref|NT_026437.13|":
"gi|568802206");
2818 const string input(
"NT_026437.13");
2819 typedefvector<pair<SDataLoaderConfig::EConfigOpts, string> > TVecOpts;
2825blast::SDataLoaderConfig dlconfig(
false);
2826 if(
config->second ==
"BLASTDB") {
2827dlconfig.m_BlastDbName =
"9606_genomic";
2829dlconfig.OptimizeForWholeLargeSequenceRetrieval();
2830blast::CBlastInputSourceConfig input_config(dlconfig);
2838BOOST_REQUIRE_EQUAL(1U, query_loc.size());
2839 stringfasta_id =
id.AsFastaString();
2840 stringfasta_query = query_loc[0].seqloc->GetId()->AsFastaString();
2841 if(fasta_id != fasta_query) {
2842BOOST_CHECK_EQUAL(fasta_id, fasta_query);
2843BOOST_CHECK_MESSAGE(fasta_id == fasta_query,
2844 "Failed using "+
config->second +
" data loader");
2861BOOST_REQUIRE(bioseq.IsSetDescr());
2862 for(
autodesc : bioseq.GetDescr().Get()) {
2865 if(!desc->GetUser().IsSetType() ||
2866!desc->GetUser().GetType().IsStr() ||
2867desc->GetUser().GetType().GetStr() !=
"Mapping") {
2871BOOST_REQUIRE(desc->GetUser().HasField(
"has_pair"));
2887 if(it->IsTitle()) {
2888vector<string> tokens;
2890retval = (
string)
"lcl|"+ tokens[0];
2895 if(retval.empty()) {
2906BOOST_REQUIRE(istr);
2907unordered_map<string, int> ref_flags = {
2923 input.GetNextSeqBatch(*queries);
2924BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
2932BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
2933 id+
" is different from expected "+
2939BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
2946BOOST_REQUIRE(istr1);
2947BOOST_REQUIRE(istr2);
2948unordered_map<string, int> ref_flags = {
2963 input.GetNextSeqBatch(*queries);
2964BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
2972BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
2973 id+
" is different from expected "+
2979BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
2991 input.GetNextSeqBatch(*queries);
2992BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
2996 if(it->GetSeq().IsSetDescr()) {
3003(
string)
"Segment flag for "+
3004 id+
" is different from expected "+
3011BOOST_REQUIRE_EQUAL(6u,
count);
3017BOOST_REQUIRE(istr);
3018unordered_map<string, int> ref_flags = {
3033 input.GetNextSeqBatch(*queries);
3034BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
3042BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
3043 id+
" is different from expected "+
3049BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
3056BOOST_REQUIRE(istr1);
3057BOOST_REQUIRE(istr2);
3058unordered_map<string, int> ref_flags = {
3072 input.GetNextSeqBatch(*queries);
3073BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
3081BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
3082 id+
" is different from expected "+
3088BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
3095BOOST_REQUIRE(istr);
3096unordered_map<string, int> ref_flags = {
3108 input.GetNextSeqBatch(*queries);
3109BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
3113 string id= it->GetSeq().GetFirstId()->AsFastaString();
3117BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
3118 id+
" is different from expected "+
3124BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
3131BOOST_REQUIRE(istr1);
3132BOOST_REQUIRE(istr2);
3133unordered_map<string, int> ref_flags = {
3145 input.GetNextSeqBatch(*queries);
3148BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
3152 string id= it->GetSeq().GetFirstId()->AsFastaString();
3156BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
3157 id+
" is different from expected "+
3163BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
3170BOOST_REQUIRE(istr);
3171unordered_map<string, int> ref_flags = {
3184 input.GetNextSeqBatch(*queries);
3185BOOST_REQUIRE_EQUAL(queries->
GetSeq_set().size(), 6u);
3193BOOST_REQUIRE_MESSAGE(
flags==
expected, (
string)
"Segment flag for "+
3194 id+
" is different from expected "+
3200BOOST_REQUIRE_EQUAL(ref_flags.size(),
count);
3213CString2Args(
const string& cmd_line_args) {
3214x_Init(cmd_line_args);
3221 voidReset(
const string& cmd_line_args) {
3223x_Init(cmd_line_args);
3229 returnarg_desc->CreateArgs(ncbi_args);
3235 structempty_string_remover
3237 booloperator() (
const string&
str) {
3238 return str.empty();
3243vector<string> x_TokenizeCmdLine(
const string& cmd_line_args) {
3244vector<string> retval;
3246vector<string>::iterator new_end =
remove_if(retval.begin(),
3248empty_string_remover());
3249retval.erase(new_end, retval.end());
3254 char* x_ToCString(
const string&
str) {
3255 char* retval =
new char[
str.size()+1];
3256strncpy(retval,
str.c_str(),
str.size());
3257retval[
str.size()] =
'\0';
3262 for(
size_t i= 0;
i< m_Argc;
i++) {
3263 delete[] m_Argv[
i];
3268 voidx_Init(
const string& cmd_line_args) {
3269 const stringprogram_name(
"./blastinput_unit_test");
3270vector<string> args = x_TokenizeCmdLine(cmd_line_args);
3271m_Argc = args.size() + 1;
3272m_Argv =
new char*[m_Argc];
3273m_Argv[0] = x_ToCString(program_name);
3274 for(
size_t i= 0;
i< args.size();
i++) {
3275m_Argv[
i+1] = x_ToCString(args[
i]);
3288CString2Args s2a(
"-matrix BLOSUM80 -db ecoli ");
3289unique_ptr<CArgs> args(s2a.CreateCArgs(psiblast_args));
3299CString2Args s2a(
"-db ecoli ");
3300unique_ptr<CArgs> args(s2a.CreateCArgs(rpsblast_args));
3308CString2Args s2a(
"-remote -num_threads 2");
3310 typedefvector< CRef<CBlastAppArgs> > TArgClasses;
3311vector< CRef<CBlastAppArgs> > arg_classes;
3320unique_ptr<CArgs> args;
3321BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(**itr)),
3327unique_ptr<CArgs> args;
3331CString2Args s2a(
"-db ecoli -template_type coding ");
3332BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(blastn_args)),
3335s2a.Reset(
"-db ecoli -template_length 21 ");
3336BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(blastn_args)),
3340s2a.Reset(
"-db ecoli -template_type coding -template_length 16");
3341BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blastn_args)));
3344s2a.Reset(
"-db ecoli -word_size 32 -template_type optimal -template_length 16");
3345BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blastn_args)));
3351unique_ptr<CArgs> args;
3355CString2Args s2a(
"-db ecoli -perc_identity 104.3");
3356BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(blast_args)),
3360s2a.Reset(
"-db ecoli -perc_identity 75.0 ");
3361BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blast_args)));
3365unique_ptr<CArgs> args;
3368CString2Args s2a(
"-db ecoli -no_greedy");
3369BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blast_args)));
3377 typedefvector< CRef<CBlastAppArgs> > TArgClasses;
3378vector< CRef<CBlastAppArgs> > arg_classes;
3387unique_ptr<CArgs> args;
3389CString2Args s2a(
"-db ecoli -culling_limit -4");
3390BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(**itr)),
3394s2a.Reset(
"-db ecoli -culling_limit 0");
3395BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(**itr)));
3416unique_ptr<CArgs> args;
3420CString2Args s2a(
"-db ecoli -qcov_hsp_perc 100.3");
3421BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(blast_args)),
3425s2a.Reset(
"-db ecoli -qcov_hsp_perc 15");
3426BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blast_args)));
3430unique_ptr<CArgs> args;
3434CString2Args s2a(
"-db ecoli -max_hsps 0");
3435BOOST_REQUIRE_THROW(args.reset(s2a.CreateCArgs(blast_args)),
3439s2a.Reset(
"-db ecoli -max_hsps 5");
3440BOOST_REQUIRE_NO_THROW(args.reset(s2a.CreateCArgs(blast_args)));
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
static const char * kFileName
Interface for reading SRA sequences into blast input.
Interface for converting sources of sequence data into blast sequence input.
Auxiliary classes/functions for BLAST input library.
void CheckForEmptySequences(const TSeqLocVector &sequences, string &warnings)
Inspect the sequences parameter for empty sequences.
TSeqRange ParseSequenceRange(const string &range_str, const char *error_prefix=NULL)
Parse and extract a sequence range from argument provided to this function.
int GetQueryBatchSize(EProgram program, bool is_ungapped=false, bool remote=false, bool use_default=true, string task="", bool mt_mode=false)
Retrieve the appropriate batch size for the specified task.
Declares the CAutoNcbiConfigFile class.
Definitions and functions associated with the BlastQueryInfo structure.
@ eFirstSegment
The first sequence of a pair with both sequences read and accepted.
@ eBlastn
Nucl-Nucl (traditional blastn)
static CRef< CBlastInput > s_DeclareBlastInput(CNcbiIstream &input_file, const CBlastInputSourceConfig &iconfig, int batch_size=kMax_Int)
static string * s_FileContents2String(const char *file_name)
static string s_GetSequenceId(const CBioseq &bioseq)
BOOST_AUTO_TEST_CASE(ReadAccession_MismatchNuclProt)
BOOST_AUTO_TEST_CASE_TIMEOUT(ReadSingleAccession_RetrieveLargeSequence, kTimeOutLargeSeq)
BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)
static void s_ReadAndTestQueryFromString(const string &input, TSeqPos expected_length, bool is_protein)
const int kTimeOutLargeSeq
static void s_ReadAndTestQueryFromString_CFastaReader(const string &input, TSeqPos expected_length)
const int kTimeOutLargeSeqWithRange
Main argument class for BLASTN application.
Main argument class for BLASTP application.
static int s_GetSegmentFlags(const CBioseq &bioseq)
Main argument class for BLASTX application.
void remove_if(Container &c, Predicate *__pred)
Class representing a text or binary file containing sequences in ASN.1 format as a collection of Seq-...
CAutoEnvironmentVariable â.
Auxiliary class to write temporary NCBI configuration files in the local directory for the purpose of...
const CSeq_id * GetFirstId() const
TSeqPos GetLength(void) const
Base command line argument class for a generic BLAST command line binary.
CRef< CBlastOptionsHandle > SetOptions(const CArgs &args)
Extract the command line arguments into a CBlastOptionsHandle object.
CArgDescriptions * SetCommandLine()
Set the command line arguments.
Defines BLAST error codes (user errors included)
Class representing a text file containing sequences in fasta format.
Class that centralizes the configuration data for sequences to be converted.
void SetRetrieveSeqData(bool value)
Turn on or off the retrieval of sequence data.
void SetLowercaseMask(bool mask)
Turn lowercase masking on/off.
void SetRange(const TSeqRange &r)
Set range for all sequences.
objects::ENa_strand GetStrand() const
Retrieve the current strand value.
void SetBelieveDeflines(bool believe)
Turn parsing of sequence IDs on/off.
void SetSeqLenThreshold2Guess(unsigned int val)
Set the sequence length threshold to guess the molecule type.
void SetStrand(objects::ENa_strand strand)
Set the strand to a specified value.
bool GetBelieveDeflines() const
Retrieve current sequence ID parsing status.
SDataLoaderConfig & SetDataLoaderConfig()
Retrieve the data loader configuration object for manipulation.
bool GetLowercaseMask() const
Retrieve lowercase mask status.
Generalized converter from an abstract source of biological sequence data to collections of blast inp...
TSeqLocVector GetAllSeqLocs(CScope &scope)
Read and convert all the sequences from the source.
Class whose purpose is to create CScope objects which have data loaders added with different prioriti...
CRef< objects::CScope > NewScope()
Create a new, properly configured CScope.
Handles command line arguments for blastn binary.
Handles command line arguments for blastp binary.
Handles command line arguments for blastx binary.
Base class for reading FASTA sequences.
Defines user input exceptions.
@ eInvalidStrand
Invalid strand specification.
@ eSequenceMismatch
Expected sequence type isn't what was expected.
@ eInvalidRange
Invalid range specification.
@ eEmptyUserInput
No input was provided.
@ eSeqIdNotFound
The sequence ID cannot be resolved.
Simple implementation of ILineReader for regions of memory (such as memory-mapped files).
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Handle command line arguments for psiblast binary Programs supported: psiblast, phi-blastn,...
Handles command line arguments for blastp binary.
Argument class to specify the supported tasks a given program.
Handles command line arguments for Tblastn binary.
Handles command line arguments for blastx binary.
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user field.
@ eProblem_ModifierFoundButNoneExpected
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * expected[]
static const char * str(char *buf, int n)
CRef< objects::CBioseq_set > TSeqLocVector2Bioseqs(const TSeqLocVector &input)
Convert a TSeqLocVector to a CBioseq_set.
bool IsLocalId(const objects::CSeq_id *seqid)
Returns true if the CSeq_id is a local id.
static set< string > GetTasks(ETaskSets choice=eAll)
Retrieve the set of supported tasks.
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
ECompoAdjustModes GetCompositionBasedStats() const
bool GetSegFiltering() const
const char * GetMatrixName() const
@ eProtProt
Protein-protein tasks.
@ eNuclNucl
Nucleotide-nucleotide tasks.
#define GI_FROM(T, value)
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.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
@ eDiag_Warning
Warning message.
void Set(const string &name, const string &value)
Set an environment variable by name.
TErrCode GetErrCode(void) const
Get error code.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
const string & GetFileName(void) const
Return used file name (generated or given in the constructor).
const TPrim & Get(void) const
virtual CRef< CSeq_entry > ReadOneSeq(ILineErrorListener *pMessageListener=nullptr)
Read a single effective sequence, which may turn out to be a segmented set.
CSeqIdGenerator & SetIDGenerator(void)
long TFlags
binary OR of EFlags
void IgnoreProblem(ILineError::EProblem problem)
@ fNoParseID
Generate an ID (whole defline -> title)
@ fQuickIDCheck
Just check local IDs' first characters.
@ fDLOptional
Don't require a leading defline.
@ fHyphensIgnoreAndWarn
When a hyphen is encountered in seq data, ignore it but warn.
@ fDisableNoResidues
If no residues found do not raise an error.
@ fNoSplit
Don't split out ambiguous sequence regions.
@ fAssumeNuc
Assume nucs unless accns indicate otherwise.
const string AsFastaString(void) const
static int BestRank(const CRef< CSeq_id > &id)
static bool PreferAccessionOverGi(void)
Check if the option to prefer accession.version over GI is enabled (SeqId/PreferAccessionOverGi or SE...
@ eFormat
Contents not parsable as expected.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
void RevokeAllDataLoaders(void)
Revoke all registered data loaders, even if they were still used.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CObjectManager & GetObjectManager(void)
Get object manager controlling this scope.
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
bool IsProtein(void) const
void SetIupacCoding(void)
Set coding to either Iupacaa or Iupacna depending on molecule type.
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.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
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.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
@ fConvErr_NoThrow
Do not throw an exception on error.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
X * NotNull(X *object)
Check for not null value (after C malloc, strdup etc.).
const TTag & GetTag(void) const
Get the Tag member data.
const TData & GetData(void) const
Get the Data member data.
const TDb & GetDb(void) const
Get the Db member data.
bool IsInt(void) const
Check if variant Int is selected.
TInt GetInt(void) const
Get the variant data.
TId GetId(void) const
Get the variant data.
const TGenbank & GetGenbank(void) const
Get the variant data.
const TName & GetName(void) const
Get the Name member data.
list< CRef< CSeq_interval > > Tdata
ENa_strand
strand of nucleic acid
const TId & GetId(void) const
Get the Id member data.
E_Choice Which(void) const
Which variant is currently selected.
TGi GetGi(void) const
Get the variant data.
TVersion GetVersion(void) const
Get the Version member data.
const TGeneral & GetGeneral(void) const
Get the variant data.
bool IsSetId(void) const
WARNING: this used to be optional Check if a value has been assigned to Id data member.
TTo GetTo(void) const
Get the To member data.
const TAccession & GetAccession(void) const
Get the Accession member data.
@ eNa_strand_both
in forward orientation
@ e_Other
for historical reasons, 'other' = 'refseq'
@ e_General
for other databases
@ e_Gi
GenInfo Integrated Database.
const TSeq & GetSeq(void) const
Get the variant data.
bool CanGetSeq_set(void) const
Check if it is safe to call GetSeq_set method.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
list< CRef< CSeqdesc > > Tdata
bool IsSetSeq_data(void) const
the sequence Check if a value has been assigned to Seq_data data member.
bool IsNcbieaa(void) const
Check if variant Ncbieaa is selected.
const TInst & GetInst(void) const
Get the Inst member data.
const TIupacna & GetIupacna(void) const
Get the variant data.
const TTitle & GetTitle(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
TLength GetLength(void) const
Get the Length member data.
list< CRef< CSeq_id > > TId
const TNcbieaa & GetNcbieaa(void) const
Get the variant data.
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
EMol
molecule class in living organism
bool IsTitle(void) const
Check if variant Title is selected.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
const TDescr & GetDescr(void) const
Get the Descr member data.
bool IsIupacna(void) const
Check if variant Iupacna is selected.
@ eRepr_delta
sequence made by changes (delta) to others
@ eRepr_raw
continuous sequence
@ e_User
user defined object
constexpr bool empty(list< Ts... >) noexcept
const string version
version string
double value_type
The numeric datatype used by the parser.
const CharType(& source)[N]
Defines unified interface to application:
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
Main argument class for PSI-BLAST application.
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
Main argument class for RPSBLAST application.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
CRef< objects::CObjectManager > om
Definition of SSeqLoc structure.
vector< SSeqLoc > TSeqLocVector
Vector of sequence locations.
Configuration structure for the CBlastScopeSource.
string m_BlastDbName
Name of the BLAST database to use (non-empty if m_UseBlastDbs is true)
void OptimizeForWholeLargeSequenceRetrieval(bool value=true)
Configures the BLAST database data loader to optimize the retrieval of *entire* large sequences.
@ eUseBlastDbDataLoader
Use the local BLAST database loader first, if this fails, use the remote BLAST database data loader.
@ eUseGenbankDataLoader
Use the Genbank data loader.
SDubiousShortSequence(const string &seq, CSeq_inst::EMol mol_type)
TSeqPos GetLength() const
Main argument class for TBLASTN application.
Main argument class for TBLASTX application.
Utility stuff for more convenient using of Boost.Test library.
static string kStart("Start")
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