NCBI C++ ToolKit
blast_results.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: blast_results.cpp 84165 2018-10-23 12:07:38Z fongah2 $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Christiam Camacho
27  *
28  */
29 
30 /** @file blast_results.cpp
31  * Implementation of classes which constitute the results of running a BLAST
32  * search
33  */
34 
35 #include <ncbi_pch.hpp>
40 
41 /** @addtogroup AlgoBlast
42  *
43  * @{
44  */
45 
48 BEGIN_SCOPE(blast)
49 
50 static void
52 {
53  _ASSERT(dest);
54 
55  if (src && src->Lambda >= 0) {
56  *dest = Blast_KarlinBlkNew();
57  Blast_KarlinBlkCopy(*dest, src);
58  }
59 }
60 
61 static void
63 {
64  _ASSERT(dest);
65 
66  if (src) {
67  *dest = (Blast_GumbelBlk*) calloc(1, sizeof(Blast_GumbelBlk));
68  memcpy((void*) (*dest), (void*) src, sizeof(Blast_GumbelBlk));
69  }
70 }
71 
73  int query_number,
74  const BlastScoreBlk *sbp,
75  const BlastQueryInfo *query_info)
76 : m_GumbelBlk(0), m_UngappedKarlinBlk(0), m_GappedKarlinBlk(0), m_PsiUngappedKarlinBlk(0),
77  m_PsiGappedKarlinBlk(0), m_SearchSpace(0), m_LengthAdjustment(0)
78 {
79  int i;
80  int context_per_query = BLAST_GetNumberOfContexts(program_type);
81 
82  // find the first valid context corresponding to this query
83  for (i = 0; i < context_per_query; i++) {
84  BlastContextInfo *ctx = query_info->contexts +
85  query_number * context_per_query + i;
86  if (ctx->is_valid) {
87  m_SearchSpace = ctx->eff_searchsp;
88  m_LengthAdjustment = ctx->length_adjustment;
89  break;
90  }
91  }
92  if (i >= context_per_query) {
93  return; // we didn't find a valid context :(
94  }
95 
96  // fill in the Karlin blocks for that context, if they
97  // are valid
98  const int ctx_index = query_number * context_per_query + i;
99  if (sbp->kbp_std) {
101  }
102  if (sbp->kbp_gap) {
104  }
105  if (sbp->kbp_psi) {
107  }
108  if (sbp->kbp_gap_psi) {
109  s_InitializeKarlinBlk(sbp->kbp_gap_psi[ctx_index],
111  }
112  if (sbp->gbp) {
114  }
115 }
116 
118  pair<double, double> k,
119  pair<double, double> h,
120  Int8 effective_search_space,
121  bool is_psiblast /* = false */)
122 : m_GumbelBlk(0), m_UngappedKarlinBlk(0), m_GappedKarlinBlk(0), m_PsiUngappedKarlinBlk(0),
123  m_PsiGappedKarlinBlk(0), m_SearchSpace(0), m_LengthAdjustment(0)
124 {
125  if (is_psiblast) {
128  m_PsiGappedKarlinBlk->K = k.second;
129  m_PsiGappedKarlinBlk->H = h.second;
130 
133  m_PsiUngappedKarlinBlk->K = k.first;
134  m_PsiUngappedKarlinBlk->H = h.first;
135  } else {
137  m_GappedKarlinBlk->Lambda = lambda.second;
138  m_GappedKarlinBlk->K = k.second;
139  m_GappedKarlinBlk->H = h.second;
140 
143  m_UngappedKarlinBlk->K = k.first;
144  m_UngappedKarlinBlk->H = h.first;
145  }
146 
147  m_SearchSpace = effective_search_space;
148 }
149 
151 {
152  do_copy(rhs);
153 }
154 
155 /// Assignment operator
157 {
158  do_copy(rhs);
159  return *this;
160 }
161 
162 
164 {
170 }
171 
172 void
174 {
175  if (this != &other) {
178 
179  if (other.m_UngappedKarlinBlk) {
182  other.m_UngappedKarlinBlk);
183  }
184  if (other.m_GappedKarlinBlk) {
187  }
188  if (other.m_PsiUngappedKarlinBlk) {
191  other.m_PsiUngappedKarlinBlk);
192  }
193  if (other.m_PsiGappedKarlinBlk) {
196  other.m_PsiGappedKarlinBlk);
197  }
198  if (other.m_GumbelBlk) {
200  }
201  }
202 }
203 
206  const TQueryMessages& errs,
207  CRef<CBlastAncillaryData> ancillary_data,
208  const TMaskedQueryRegions* query_masks,
209  const string& rid /* = kEmptyStr */,
210  const SPHIQueryInfo *phi_query_info /* = NULL */)
211 : m_QueryId(query), m_Alignment(align), m_Errors(errs),
212  m_AncillaryData(ancillary_data), m_RID(kEmptyStr), m_PhiQueryInfo(0)
213 {
214  if (query_masks)
215  SetMaskedQueryRegions(*query_masks);
216  if (phi_query_info)
217  m_PhiQueryInfo = SPHIQueryInfoCopy(phi_query_info);
218 }
219 
221 {
222  if (m_PhiQueryInfo) {
224  }
225 }
226 
227 void
229  (TMaskedQueryRegions& flt_query_regions) const
230 {
231  flt_query_regions = m_Masks;
232 }
233 
234 void
236  (const TMaskedQueryRegions& flt_query_regions)
237 {
238  m_Masks.clear();
239  copy(flt_query_regions.begin(), flt_query_regions.end(),
240  back_inserter(m_Masks));
241 }
242 
244 CSearchResults::GetErrors(int min_severity) const
245 {
246  TQueryMessages errs;
247 
249  if ((**iter).GetSeverity() >= min_severity) {
250  errs.push_back(*iter);
251  }
252  }
253 
254  return errs;
255 }
256 
257 string
259 {
260  if (m_Errors.empty()) {
261  return string();
262  }
263 
264  string retval(m_Errors.GetQueryId());
265  if ( !retval.empty() ) { // in case the query id is not known
266  retval += ": ";
267  }
269  if ((**iter).GetSeverity() >= eBlastSevError) {
270  retval += (*iter)->GetMessage(false) + " ";
271  }
272  }
273  return retval;
274 }
275 
276 string
278 {
279  if (m_Errors.empty()) {
280  return string();
281  }
282 
283  string retval(m_Errors.GetQueryId());
284  if ( !retval.empty() ) { // in case the query id is not known
285  retval += ": ";
286  }
288  if ((**iter).GetSeverity() == eBlastSevWarning) {
289  retval += (*iter)->GetMessage(false) + " ";
290  }
291  }
292  return retval;
293 }
294 
295 bool
297 {
299  if ((**iter).GetSeverity() >= eBlastSevError) {
300  return true;
301  }
302  }
303  return false;
304 }
305 
306 bool
308 {
310  if ((**iter).GetSeverity() == eBlastSevWarning) {
311  return true;
312  }
313  }
314  return false;
315 }
316 
317 bool
319 {
320  if (m_Alignment.Empty()) {
321  return false;
322  }
323 
324  return m_Alignment->Get().size() != 0 &&
325  m_Alignment->Get().front()->IsSetSegs();
326 }
327 
330 {
331  return m_QueryId;
332 }
333 
334 void
336 {
337  subj_masks = m_SubjectMasks;
338 }
339 
340 void
342 {
343  m_SubjectMasks.clear();
344  copy(subj_masks.begin(), subj_masks.end(), back_inserter(m_SubjectMasks));
345 }
346 
347 void CSearchResults::TrimSeqAlign(CSeq_align_set::Tdata::size_type max_size)
348 {
349  if (!HasAlignments())
350  {
351  return;
352  }
353 
354  if(max_size == 0)
355  {
356  m_Alignment.Reset();
357  return;
358  }
359 
360  if (m_Alignment->Size() > max_size)
361  {
362  CConstRef<CSeq_id> previous_id, sub_id;
363  unsigned int num_aligns = 1;
364  CSeq_align_set::Tdata::iterator itr=m_Alignment->Set().begin();
365  previous_id = &((*itr)->GetSeq_id(1));
366  ++ itr;
367 
368  for(; itr != m_Alignment->Set().end(); ++itr)
369  {
370  if ((*itr)->GetSegs().IsDisc())
371  {
372  num_aligns ++;
373  }
374  else
375  {
376  sub_id = &((*itr)->GetSeq_id(1));
377  if(!sub_id->Match(*previous_id))
378  {
379  num_aligns ++;
380  }
381 
382  if(num_aligns > max_size)
383  {
384  break;
385  }
386 
387  previous_id = sub_id;
388  }
389  }
390 
391  if(itr != m_Alignment->Set().end())
392  {
393  m_Alignment->Set().erase(itr,m_Alignment->Set().end());
394  }
395 
396  }
397 }
398 
399 
402 {
404  NCBI_THROW(CBlastException, eNotSupported, "Invalid method accessed");
405  }
406  return *m_Results[qi * (GetNumResults() / m_NumQueries) + si];
407 }
408 
409 const CSearchResults&
411 {
412  return const_cast<CSearchResultSet*>(this)->GetResults(qi, si);
413 }
414 
416 CSearchResultSet::operator[](const objects::CSeq_id & ident) const
417 {
418  if (m_ResultType != eDatabaseSearch) {
419  NCBI_THROW(CBlastException, eNotSupported, "Invalid method accessed");
420  }
421  for( size_t i = 0; i < m_Results.size(); i++ ) {
422  if ( CSeq_id::e_YES == ident.Compare(*m_Results[i]->GetSeqId()) ) {
423  return m_Results[i];
424  }
425  }
426 
427  return CConstRef<CSearchResults>();
428 }
429 
431 CSearchResultSet::operator[](const objects::CSeq_id & ident)
432 {
433  if (m_ResultType != eDatabaseSearch) {
434  NCBI_THROW(CBlastException, eNotSupported, "Invalid method accessed");
435  }
436  for( size_t i = 0; i < m_Results.size(); i++ ) {
437  if ( CSeq_id::e_YES == ident.Compare(*m_Results[i]->GetSeqId()) ) {
438  return m_Results[i];
439  }
440  }
441 
442  return CRef<CSearchResults>();
443 }
444 
445 /// Find the first alignment in a set of blast results, and
446 // return the sequence identifier of the first sequence in the alignment.
447 // All alignments in the blast results are assumed to contain the
448 // same identifier
449 // @param align_set The blast results
450 // @return The collection of sequence ID's corresponding to the
451 // first sequence of the first alignment
452 static CConstRef<CSeq_id>
454 {
455  CConstRef<CSeq_id> retval;
456 
457  if (! (align_set.Empty() || align_set->Get().empty())) {
458  // index 0 = query, index 1 = subject
459  const int kQueryIndex = 0;
460 
461  CRef<CSeq_align> align = align_set->Get().front();
462 
463  if (align->GetSegs().IsDisc() == true)
464  {
465 
466  if (align->GetSegs().GetDisc().Get().empty())
467  return retval;
468 
469  CRef<CSeq_align> first_align = align->GetSegs().GetDisc().Get().front();
470  retval.Reset(& align->GetSeq_id(kQueryIndex));
471  }
472  else
473  {
474  retval.Reset(& align->GetSeq_id(kQueryIndex));
475  }
476  }
477 
478  return retval;
479 }
480 
481 CSearchResultSet::CSearchResultSet(EResultType res_type /* = eDatabaseSearch*/)
482 : m_ResultType(res_type), m_NumQueries(0), m_IsPhiBlast(false)
483 {}
484 
486  TQueryIdVector queries,
487  TSeqAlignVector aligns,
488  TSearchMessages msg_vec,
489  TAncillaryVector ancillary_data /* = TAncillaryVector() */,
490  const TSeqLocInfoVector* query_masks /* = NULL */,
491  EResultType res_type /* = eDatabaseSearch */,
492  const SPHIQueryInfo* phi_query_info /* = NULL */)
493 : m_ResultType(res_type)
494 {
495  if (ancillary_data.empty()) {
496  ancillary_data.resize(aligns.size());
497  }
498  x_Init(queries, aligns, msg_vec, ancillary_data, query_masks, phi_query_info);
499 }
500 
502  TSearchMessages msg_vec,
503  EResultType res_type /* = eDatabaseSearch */)
504 : m_ResultType(res_type)
505 {
506  vector< CConstRef<CSeq_id> > queries;
507  TAncillaryVector ancillary_data(aligns.size()); // no ancillary_data
508 
509  for(size_t i = 0; i < aligns.size(); i++) {
510  queries.push_back(s_ExtractSeqId(aligns[i]));
511  }
512 
513  x_Init(queries, aligns, msg_vec, ancillary_data, NULL);
514 }
515 
518 {
519  return m_QueryMasks;
520 }
521 
522 void
524 {
525  m_QueryMasks = orig_masks;
526  if (orig_masks.empty()) {
527  return;
528  }
529  TSeqLocInfoVector masks;
530 
532  orig_masks.size() != m_Results.size()) {
533  // Make the number of masks match the number of results for bl2seq if
534  // it already isn't the case
535  const size_t kNumQueries = orig_masks.size();
536  const size_t kNumSubjects = m_Results.size() / kNumQueries;
537  masks.resize(m_Results.size());
538  for (size_t i = 0; i < m_Results.size(); i++) {
539  const TMaskedQueryRegions& mqr = orig_masks[i/kNumSubjects];
540  copy(mqr.begin(), mqr.end(), back_inserter(masks[i]));
541  }
542  } else {
543  masks = orig_masks;
544  }
545 
546  if (m_IsPhiBlast) {
547  for (size_t i = 0; i < m_Results.size(); i++) {
548  m_Results[i]->SetMaskedQueryRegions(masks[0]);
549  }
550  } else {
551  _ASSERT(masks.size() == m_Results.size());
552  for (size_t i = 0; i < m_Results.size(); i++) {
553  m_Results[i]->SetMaskedQueryRegions(masks[i]);
554  }
555  }
556 }
557 
559  TSeqAlignVector aligns,
560  TSearchMessages msg_vec,
561  TAncillaryVector ancillary_data,
562  const TSeqLocInfoVector* query_masks,
563  const SPHIQueryInfo* phi_query_info)
564 {
565  _ASSERT(queries.size() == aligns.size());
566  _ASSERT(aligns.size() == msg_vec.size());
567  _ASSERT(aligns.size() == ancillary_data.size());
568 
569  m_IsPhiBlast = (phi_query_info != NULL) ? true : false;
570 
571  // determine the number of unique queries
573  {
574  // determine how many times is the first query id
575  // repeated in the queries vector
576  int num_repeated_ids = 1;
577  for (size_t i_id = 1; i_id < queries.size(); i_id++)
578  {
579  if (queries[i_id]->Match(queries[0].GetObject()))
580  {
581  num_repeated_ids++;
582  }
583  }
584  // calculate the actual number of queries
585  m_NumQueries = queries.size() / num_repeated_ids;
586  }
587  else // database search, no repeated query ids
588  {
589  m_NumQueries = queries.size();
590  }
591 
592  m_Results.resize(aligns.size());
593 
594  for(size_t i = 0; i < aligns.size(); i++) {
595  m_Results[i].Reset(new CSearchResults(queries[i],
596  aligns[i],
597  msg_vec[i],
598  ancillary_data[i],
599  NULL,
600  kEmptyStr,
601  phi_query_info));
602  }
603  if (query_masks) {
604  SetFilteredQueryRegions(*query_masks);
605  }
606 }
607 
608 void
610 {
611  m_Results.push_back(element);
612  m_NumQueries++;
613 }
614 
615 void
616 CSearchResultSet::SetRID(const string& rid)
617 {
618  NON_CONST_ITERATE(vector<CSearchResultSet::value_type>, itr, m_Results) {
619  (*itr)->SetRID(rid);
620  }
621 }
622 
623 END_SCOPE(blast)
625 
626 /* @} */
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
Definition: blast_def.h:112
@ eBlastSevError
Definition: blast_message.h:58
@ eBlastSevWarning
Definition: blast_message.h:57
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Definition: blast_program.h:72
const unsigned int kQueryIndex
Index into multiple sequence alignment structure for the query sequence.
Definition of classes which constitute the results of running a BLAST search.
Blast_KarlinBlk * Blast_KarlinBlkNew(void)
Callocs a Blast_KarlinBlk.
Definition: blast_stat.c:2861
Blast_KarlinBlk * Blast_KarlinBlkFree(Blast_KarlinBlk *kbp)
Deallocates the KarlinBlk.
Definition: blast_stat.c:956
Int2 Blast_KarlinBlkCopy(Blast_KarlinBlk *kbp_to, Blast_KarlinBlk *kbp_from)
Copies contents of one Karlin block to another.
Definition: blast_stat.c:2871
vector< CRef< objects::CSeq_align_set > > TSeqAlignVector
Vector of Seq-align-sets.
EResultType
Specifies the style of Seq-aligns that should be built from the internal BLAST data structures.
@ eDatabaseSearch
Seq-aligns in the style of a database search.
@ eSequenceComparison
Seq-aligns in the BLAST 2 Sequence style (one alignment per query-subject pair)
unsigned int BLAST_GetNumberOfContexts(EBlastProgramType program)
Get the number of contexts for a given program.
Definition: blast_util.c:1373
Class used to return ancillary data from a blast search, i.e.
Defines BLAST error codes (user errors included)
Search Results for All Queries.
Search Results for One Query.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
Definition: Seq_align.cpp:317
Collection of masked regions for a single query sequence.
Definition: seqlocinfo.hpp:113
Class for the messages for an individual query sequence.
typedef for the messages for an entire BLAST search, which could be comprised of multiple query seque...
static const char si[8][64]
Definition: des.c:146
CS_CONTEXT * ctx
Definition: t0006.c:12
#define false
Definition: bool.h:36
TSeqLocInfoVector m_SubjectMasks
the matching subjects masks
bool HasErrors() const
Returns true if there are errors among the results for this object.
void GetSubjectMasks(TSeqLocInfoVector &subj_masks) const
Retrieve the masked locations for the subject sequences in the contained alignment.
~CBlastAncillaryData()
Destructor.
CSearchResults & operator[](size_type i)
Allow array-like access with integer indices to CSearchResults contained by this object.
static CConstRef< CSeq_id > s_ExtractSeqId(CConstRef< CSeq_align_set > align_set)
Find the first alignment in a set of blast results, and.
size_type m_NumQueries
Number of queries.
Blast_KarlinBlk * m_PsiGappedKarlinBlk
PSI-BLAST gapped Karlin parameters for one query (if applicable)
TSeqLocInfoVector m_QueryMasks
Stores the masked query regions, for convenience and usage in CBl2Seq.
bool m_IsPhiBlast
True if this object contains PHI-BLAST results.
void GetMaskedQueryRegions(TMaskedQueryRegions &flt_query_regions) const
Retrieve the query regions which were masked by BLAST.
CRef< objects::CSeq_align_set > m_Alignment
alignments for this query
void SetRID(const string &rid)
Sets the RID for these results.
vector< CConstRef< objects::CSeq_id > > TQueryIdVector
List of query ids.
TSeqLocInfoVector GetFilteredQueryRegions() const
Retrieves the filtered query regions.
void TrimSeqAlign(objects::CSeq_align_set::Tdata::size_type max_size)
Trim align_set size @parm size max num of alignments to keep (0 will erase all)
void SetSubjectMasks(const TSeqLocInfoVector &subj_masks)
Set the masked locations for the subject sequences in the contained alignment.
CSearchResultSet(EResultType res_type=eDatabaseSearch)
Simplest constructor.
static void s_InitializeKarlinBlk(Blast_KarlinBlk *src, Blast_KarlinBlk **dest)
~CSearchResults()
Our destructor.
TQueryMessages m_Errors
error/warning messages for this query
string GetQueryId() const
Get the query id as a string.
Definition: blast_aux.cpp:972
TMaskedQueryRegions m_Masks
this query's masked regions
EResultType m_ResultType
Type of results stored in this object.
CBlastAncillaryData & operator=(const CBlastAncillaryData &rhs)
Assignment operator.
bool HasWarnings() const
Returns true if there are warnings among the results for this object.
Int8 m_LengthAdjustment
Length adjustment for boundary conditions.
void SetMaskedQueryRegions(const TMaskedQueryRegions &flt_query_regions)
Mutator for the masked query regions, intended to be used by internal BLAST APIs to populate this obj...
vector< value_type >::size_type size_type
size_type type definition
void SetFilteredQueryRegions(const TSeqLocInfoVector &masks)
Sets the filtered query regions.
string GetWarningStrings() const
Retrieve a string with the query identifier followed by the warnings produced, returns a empty string...
Blast_KarlinBlk * m_GappedKarlinBlk
Gapped Karlin parameters for one query.
CConstRef< objects::CSeq_id > m_QueryId
this query's id
vector< CRef< CSearchResults > > m_Results
Vector of results.
static void s_InitializeGumbelBlk(Blast_GumbelBlk *src, Blast_GumbelBlk **dest)
Blast_KarlinBlk * m_PsiUngappedKarlinBlk
PSI-BLAST ungapped Karlin parameters for one query (if applicable)
Blast_KarlinBlk * m_UngappedKarlinBlk
Ungapped Karlin parameters for one query.
void push_back(value_type &element)
Add a value to the back of this container.
SPHIQueryInfo * m_PhiQueryInfo
PHI-BLAST information.
TQueryMessages GetErrors(int min_severity=eBlastSevError) const
Accessor for the error/warning messsages for this query.
CConstRef< objects::CSeq_id > GetSeqId() const
Accessor for the query's sequence identifier.
void x_Init(TQueryIdVector &queries, TSeqAlignVector aligns, TSearchMessages msg_vec, TAncillaryVector ancillary_data, const TSeqLocInfoVector *query_masks, const SPHIQueryInfo *phi_query_info=NULL)
Initialize the result set.
CBlastAncillaryData(EBlastProgramType program_type, int query_number, const BlastScoreBlk *sbp, const BlastQueryInfo *query_info)
constructor
vector< CRef< CBlastAncillaryData > > TAncillaryVector
typedef for a vector of CRef<CBlastAncillaryData>
Int8 m_SearchSpace
Search space used when calculating e-values for one query.
Blast_GumbelBlk * m_GumbelBlk
Gumbel parameters for one query.
void do_copy(const CBlastAncillaryData &other)
Workhorse for copy constructor and assignment operator.
string GetErrorStrings() const
Retrieve a string with the query identifier followed by the errors produced, returns a empty string i...
size_type GetNumResults() const
Return the number of results contained by this object.
CSearchResults(CConstRef< objects::CSeq_id > query, CRef< objects::CSeq_align_set > align, const TQueryMessages &errs, CRef< CBlastAncillaryData > ancillary_data, const TMaskedQueryRegions *query_masks=NULL, const string &rid=kEmptyStr, const SPHIQueryInfo *phi_query_info=NULL)
Constructor.
CSearchResults & GetResults(size_type qi, size_type si)
Retrieve results for a query-subject pair contained by this object.
bool HasAlignments() const
Return true if there are any alignments for this query.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
string
Definition: cgiapp.hpp:690
#define NULL
Definition: ncbistd.hpp:225
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
Definition: Seq_id.hpp:1065
@ e_YES
SeqIds compared, but are different.
Definition: Seq_id.hpp:583
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty – not pointing to any object which means having a null value.
Definition: ncbiobj.hpp:1385
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1439
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
Definition: ncbiobj.hpp:719
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define USING_SCOPE(ns)
Use the specified namespace.
Definition: ncbistl.hpp:78
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define kEmptyStr
Definition: ncbistr.hpp:123
bool IsDisc(void) const
Check if variant Disc is selected.
Definition: Seq_align_.hpp:772
const TDisc & GetDisc(void) const
Get the variant data.
Definition: Seq_align_.cpp:197
const Tdata & Get(void) const
Get the member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
Definition: Seq_align_.hpp:921
int i
double lambda(size_t dimMatrix_, const Int4 *const *scoreMatrix_, const double *q_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
SPHIQueryInfo * SPHIQueryInfoFree(SPHIQueryInfo *pat_info)
Frees the pattern information structure.
Definition: pattern.c:496
SPHIQueryInfo * SPHIQueryInfoCopy(const SPHIQueryInfo *pat_info)
Copies the SPHIQueryInfo structure.
Definition: pattern.c:507
vector< TMaskedQueryRegions > TSeqLocInfoVector
Collection of masked regions for all queries in a BLAST search.
Definition: seqlocinfo.hpp:139
The context related information.
The query related information.
BlastContextInfo * contexts
Information per context.
Structure used for scoring calculations.
Definition: blast_stat.h:177
Blast_KarlinBlk ** kbp_psi
K-A parameters for position-based alignments.
Definition: blast_stat.h:213
Blast_KarlinBlk ** kbp_gap
K-A parameters for gapped alignments.
Definition: blast_stat.h:208
Blast_KarlinBlk ** kbp_std
K-A parameters for ungapped alignments.
Definition: blast_stat.h:212
Blast_KarlinBlk ** kbp_gap_psi
K-A parameters for psi alignments.
Definition: blast_stat.h:215
Blast_GumbelBlk * gbp
Gumbel parameters for FSC.
Definition: blast_stat.h:209
Structure to hold the Gumbel parameters (for FSC).
Definition: blast_stat.h:94
Structure to hold the Karlin-Altschul parameters.
Definition: blast_stat.h:66
double K
K value used in statistics.
Definition: blast_stat.h:68
double Lambda
Lambda value used in statistics.
Definition: blast_stat.h:67
double H
H value used in statistics.
Definition: blast_stat.h:70
In PHI BLAST, structure containing information about all pattern occurrences in query.
Definition: blast_def.h:300
static string query
#define _ASSERT
voidp calloc(uInt items, uInt size)
Modified on Fri Sep 20 14:57:57 2024 by modify_doxy.py rev. 669887