19 #ifndef ROSTLAB_BLAST_RESULT_H
20 #define ROSTLAB_BLAST_RESULT_H
44 static const size_t noidx =
static_cast<size_t>(-1);
46 round(
size_t __oneline_idx = 0,
size_t __oneline_cnt = 0,
size_t __hit_idx = 0,
size_t __hit_cnt = 0,
size_t __oneline_new_idx =
noidx,
size_t __oneline_new_cnt = 0 ) :
oneline_idx( __oneline_idx),
oneline_cnt(__oneline_cnt),
hit_idx( __hit_idx ),
hit_cnt(__hit_cnt),
oneline_new_idx(__oneline_new_idx),
oneline_new_cnt(__oneline_new_cnt){}
95 hsp(
double __bit_score = 0,
size_t __raw_score = 0 ) :
bit_score(__bit_score),
raw_score(__raw_score),
e_value(0),
method(
eNoCompositionBasedStats),
identities(0),
positives(0),
gaps(0),
q_frame(32),
s_frame(32),
106 inline static std::string
112 return "Composition-based stats";
break;
114 return "Compositional matrix adjust";
break;
116 std::stringstream ss; ss << __m;
return ss.str();
124 if( __m.size() > 0 && __m[ __m.size()-1 ] ==
'.' ) __m.resize( __m.size()-1 );
129 if( __m.size() >= 12 )
147 hit(
const std::string& __name =
"",
const std::string& __desc =
"",
size_t __length = 0 ) :
name(__name),
desc(__desc),
length(__length) {}
158 oneline(
const std::string& __name =
"",
const std::string& __desc =
"",
double __bit_score = 0,
double __e_value = 0 ) :
name(__name),
desc(__desc),
bit_score(__bit_score),
e_value(__e_value){}
167 std::vector<std::string>
170 std::vector<rostlab::blast::round>
185 std::vector<rostlab::blast::oneline>
190 std::vector<rostlab::blast::hit>
200 operator bool()
const {
return !
empty; }
214 #include <rostlab/aux_functions.h>
239 ", s_frame = " << (
int)__r.
s_frame <<
", q_start = " << __r.
q_start <<
", q_ali = " << __r.
q_ali <<
", q_end = " << __r.
q_end <<
", match_line = " << __r.
match_line <<
240 ", s_start = " << __r.
s_start <<
", s_ali = " << __r.
s_ali <<
", s_end = " << __r.
s_end;
248 __os <<
"n = " << __r.
name <<
" d = " << __r.
desc <<
" Length = " << __r.
length <<
" " << __r.
hsps;
257 " letters)\n\nDatabase: " << __r.
db_name <<
" " << __r.
db_nseq <<
" sequences; " << __r.
db_nletter <<
" total letters\n\none-line desc: " << __r.
onelines <<
"\n\n" <<
258 ( __r.
converged ?
"CONVERGED!\n\n" :
"" ) <<
"hits: " << __r.
hits <<
"\n\n" << __r.
tail;
std::ostream & operator<<(std::ostream &, const rostlab::blast::round &)
Stream output operator for blast::round.
hit(const std::string &__name="", const std::string &__desc="", size_t __length=0)
size_t length
Full length of subject sequence.
High-scoring segment pair.
std::string s_strand
Subject strand [Plus|Minus].
static std::string methodstr(const ECompoAdjustModes __m)
Translate method code to string.
size_t s_end
Subject end (1-based).
int8_t q_frame
Query frame.
size_t q_end
Query end (1-based).
std::string q_ali
Query alignment string.
static ECompoAdjustModes methfromstr(std::string __m)
Translate method description to mode code.
size_t s_start
Subject start (1-based).
std::string match_line
Match line.
int8_t s_frame
Subject frame.
size_t q_start
Query start (1-based).
ECompoAdjustModes
An collection of constants that specify all permissible modes of composition adjustment.
@ eNoCompositionBasedStats
@ eCompositionMatrixAdjust
@ eCompoForceFullMatrixAdjust
std::string s_ali
Subject alignment string.
std::string q_strand
Query strand [Plus|Minus].
hsp(double __bit_score=0, size_t __raw_score=0)
double bit_score
Bit score.
oneline(const std::string &__name="", const std::string &__desc="", double __bit_score=0, double __e_value=0)
Blast result for one query.
std::string q_name
Query name.
std::vector< rostlab::blast::oneline > onelines
Vector of all one-line descriptions.
bool converged
Indicates that the search has converged.
std::string tail
Tail part of blast result as a long string.
std::vector< rostlab::blast::hit > hits
Vector of all hits.
size_t db_nseq
Number of sequences in database.
std::vector< std::string > references
size_t db_nletter
Number of letters in database.
std::string blast_version
std::string q_desc
Query description.
std::vector< rostlab::blast::round > rounds
Vector of iterated blast round information.
std::string db_name
Database name.
size_t q_length
Query length.
Data specific to an iterated blast round.
round(size_t __oneline_idx=0, size_t __oneline_cnt=0, size_t __hit_idx=0, size_t __hit_cnt=0, size_t __oneline_new_idx=noidx, size_t __oneline_new_cnt=0)
size_t oneline_idx
Index of first one-line description of this round in vector of all one-line descriptions.
size_t oneline_cnt
Count of one-line descriptions in round.
size_t oneline_new_idx
Index of first one-line description of sequences not found previously in this round....
size_t oneline_new_cnt
Count of one-line descriptions for sequences not found previously.
size_t hit_cnt
Count of hits in round.
static const size_t noidx
size_t hit_idx
Index of first hit of this round in vector of all hits.