NCBI C++ ToolKit
igblast.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: igblast.hpp 100979 2023-10-10 18:11:17Z jianye $
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: Ning Ma
27  *
28  */
29 
30 /// @file igblast.hpp
31 /// Declares CIgBlast, the C++ API for the IG-BLAST engine.
32 
33 #ifndef ALGO_BLAST_IGBLAST___IGBLAST__HPP
34 #define ALGO_BLAST_IGBLAST___IGBLAST__HPP
35 
39 #include <objmgr/scope.hpp>
40 
41 /** @addtogroup AlgoBlast
42  *
43  * @{
44  */
45 
47 
48 BEGIN_SCOPE(blast)
49 
50 /// Keeps track of the version of IgBLAST in the NCBI C++ toolkit.
51 /// Used to perform run-time version checks
52 ///
53 /// For reference, please refer to http://apr.apache.org/versioning.html
54 class CIgBlastVersion : public CVersionInfo {
55 public:
57  : CVersionInfo(1, 22, 0) {}
58 };
59 
60 class IQueryFactory;
61 
62 class CIgBlastOptions : public CObject
63 {
64 public:
65  // the germline database search must be carried out locally
66  bool m_IsProtein; // search molecular type
67  string m_Origin; // the origin of species
68  string m_DomainSystem; // domain system for annotation
69  string m_SequenceType; //ig or tcr?
70  int m_Min_D_match; //the word size for D gene search
71  int m_V_penalty; //the mismatch penalty for V gene search
72  int m_D_penalty; //the mismatch penalty for D gene search
73  int m_J_penalty; //the mismatch penalty for J gene search
74  string m_AuxFilename; // auxulary file name
75  string m_DFrameFileName; // D gene frame definition file
76  string m_CustomInternalData; // custom internal data
77  string m_IgDataPath; // internal data path
78  CRef<CLocalDbAdapter> m_Db[5]; // user specified germline database
79  // 0-2: - user specified V, D, J
80  // 3: - the default V gl db
81  // 4:C gene
82  int m_NumAlign[4]; // number of VDJC alignments to show
83  bool m_FocusV; // should alignment restrict to V
84  bool m_Translate; // should translation be displayed
90  list<string> m_AirrField;
91 };
92 
93 class CIgAnnotation : public CObject
94 {
95 public:
96  bool m_MinusStrand; // hit is on minus strand of the query
97  vector<string> m_TopGeneIds; // Top match germline gene ID
98  vector<string> m_ChainType; // chain types of the query ([0]) and subjects ([1:])
99  string m_ChainTypeToShow; // chain type to show to user. Normally this is
100  //the same as m_ChainType[0] but could be different
101  // in case o TCRA/D chains which can use both JA and JD
102  int m_GeneInfo[8]; // The (start) and (end offset + 1) for VDJC
103  int m_FrameInfo[3]; // Coding frame start offset for V start, V end,
104  // J start
105  int m_DomainInfo[12]; // The (start) and (end offset) for FWR1,
106  // CDR1, FWR2, CDR2, FWR3, CDR3 domains
107  // note: the first and last domains are be extended
108  int m_DomainInfo_S[10]; // The (start) and (end offset) for FWR1,
109  // CDR1, FWR2, CDR2, FWR3, CDR3 domains on topV sequence
110 
111  int m_JDomain[5]; // CDr3 start, stop, FWR4 start, stop, extra number of bases past last J codon (i.e., m_Fwr4EndOffset in CIgAnnotationInfo
112 
113  int m_CDomain[2]; //start and end
115 
116  /// Constructor
118  : m_MinusStrand (false)
119  {
120  for (int i=0; i<4; i++) m_TopGeneIds.push_back("N/A");
121  for (int i=0; i<8; i++) m_GeneInfo[i] = -1;
122  for (int i=0; i<3; i++) m_FrameInfo[i] = -1;
123  for (int i=0; i<12; i++) m_DomainInfo[i] = -1;
124  for (int i=0; i<10; i++) m_DomainInfo_S[i] = -1;
125  for (int i=0; i<5; i++) m_JDomain[i] = -1;
126  for (int i=0; i<2; i++) m_CDomain[i] = -1;
127  m_DframeStart = -1;
128  }
129 
130 };
131 
133 {
134 public:
136 
137  bool GetDomainInfo(const string sid, int * domain_info) {
138  if (m_DomainIndex.find(sid) != m_DomainIndex.end()) {
139  int index = m_DomainIndex[sid];
140  for (int i=0; i<10; ++i) {
141  domain_info[i] = m_DomainData[index + i];
142  }
143  return true;
144  }
145  return false;
146  }
147 
148  const string GetDomainChainType(const string sid) {
150  return m_DomainChainType[sid];
151  }
152  return "N/A";
153  }
154 
155  int GetFrameOffset(const string sid) {
156  if (m_FrameOffset.find(sid) != m_FrameOffset.end()) {
157  return m_FrameOffset[sid];
158  }
159  return -1;
160  }
161 
162 
163  int GetJDomain(const string& sid) {
164  if (m_JDomainInfo.find(sid) != m_JDomainInfo.end()) {
165  return m_JDomainInfo[sid];
166  }
167  return -1;
168 
169  }
170 
171  int GetFwr4EndOffset(const string& sid) {
172  if (m_Fwr4EndOffset.find(sid) != m_Fwr4EndOffset.end()) {
173  return m_Fwr4EndOffset[sid];
174  }
175  return -1;
176 
177  }
178 
179  const string GetDJChainType(const string sid) {
180  if (m_DJChainType.find(sid) != m_DJChainType.end()) {
181  return m_DJChainType[sid];
182  }
183  return "N/A";
184  }
185 
186 private:
188  vector<int> m_DomainData;
193  map<string, int> m_Fwr4EndOffset; //extra number of bases past J end
194 
195 };
196 
198 {
199 public:
200 
205 
207  return m_Annotation;
208  }
209 
211  return m_Annotation;
212  }
213 
215  return m_Alignment;
216  }
217 
218  /// Constructor
219  /// @param query List of query identifiers [in]
220  /// @param align alignments for a single query sequence [in]
221  /// @param errs error messages for this query sequence [in]
222  /// @param ancillary_data Miscellaneous output from the blast engine [in]
223  /// @param query_masks Mask locations for this query [in]
224  /// @param rid RID (if applicable, else empty string) [in]
227  const TQueryMessages &errs,
228  CRef<CBlastAncillaryData> ancillary_data)
229  : CSearchResults(query, align, errs, ancillary_data),
231 
232 private:
234 };
235 
236 class CIgBlast : public CObject
237 {
238 public:
239  /// Local Igblast search API
240  /// @param query_factory Concatenated query sequences [in]
241  /// @param blastdb Adapter to the BLAST database to search [in]
242  /// @param options Blast search options [in]
243  /// @param ig_options Additional Ig-BLAST specific options [in]
245  CRef<CLocalDbAdapter> blastdb,
247  CConstRef<CIgBlastOptions> ig_options,
248  CRef<CScope> scope)
249  : m_IsLocal(true),
250  m_NumThreads(1),
251  m_Query(query_factory),
252  m_LocalDb(blastdb),
253  m_Options(options),
254  m_IgOptions(ig_options),
255  m_AnnotationInfo(ig_options),
256  m_Scope(scope) {m_RID= NcbiEmptyString; }
257 
258  /// Remote Igblast search API
259  /// @param query_factory Concatenated query sequences [in]
260  /// @param blastdb Remote BLAST database to search [in]
261  /// @param subjects Subject sequences to search [in]
262  /// @param options Blast search options [in]
263  /// @param ig_options Additional Ig-BLAST specific options [in]
265  CRef<CSearchDatabase> blastdb,
266  CRef<IQueryFactory> subjects,
268  CConstRef<CIgBlastOptions> ig_options,
269  string entrez_query,
270  CRef<CScope> scope)
271  : m_IsLocal(false),
272  m_NumThreads(1),
273  m_Query(query_factory),
274  m_Subject(subjects),
275  m_RemoteDb(blastdb),
276  m_Options(options),
277  m_IgOptions(ig_options),
278  m_AnnotationInfo(ig_options),
279  m_EntrezQuery(entrez_query),
280  m_Scope(scope){ m_RID= NcbiEmptyString; }
281 
282  /// Destructor
283  ~CIgBlast() {};
284 
285  /// Run the Ig-BLAST engine
287 
288  /// Set MT mode
289  void SetNumberOfThreads(size_t nthreads) {
290  m_NumThreads = nthreads;
291  }
292 
293  string GetRid() {
294  return m_RID;
295  }
296 private:
297 
298  bool m_IsLocal;
299  size_t m_NumThreads;
309  string m_RID; //remote rid
310 
311  /// Prohibit copy constructor
312  CIgBlast(const CIgBlast& rhs);
313 
314  /// Prohibit assignment operator
316 
317  /// Prepare blast option handle and query for V germline database search
319  CRef<CBlastOptionsHandle> &opts_hndl);
320 
321  /// Prepare blast option handle and query for D, J germline database search
322  void x_SetupDJSearch(const vector<CRef <CIgAnnotation> > &annots,
324  CRef<CBlastOptionsHandle> &opts_hndl,
325  int db_type);
326 
327  void x_SetupCRegionSearch(const vector<CRef <CIgAnnotation> > &annots,
329  CRef<CBlastOptionsHandle> &opts_hndl);
330 
331  void x_SetupNoOverlapDSearch(const vector<CRef <CIgAnnotation> > &annots,
332  CRef<CSearchResultSet> &results,
334  CRef<CBlastOptionsHandle> &opts_hndl,
335  int db_type);
336 
337  /// Prepare blast option handle and query for specified database search
338  void x_SetupDbSearch(vector<CRef <CIgAnnotation> > &annot,
339  CRef<IQueryFactory> &qf);
340 
341  /// Annotate the V gene based on blast results
342  void x_AnnotateV(CRef<CSearchResultSet> &results,
343  vector<CRef <CIgAnnotation> > &annot);
344 
345  /// Annotate the D and J genes based on blast results
346  void x_AnnotateDJ(CRef<CSearchResultSet> &results_D,
347  CRef<CSearchResultSet> &results_J,
348  vector<CRef <CIgAnnotation> > &annot);
349 
350  void x_AnnotateD(CRef<CSearchResultSet> &results_D,
351  vector<CRef <CIgAnnotation> > &annot);
352  void x_AnnotateJ(CRef<CSearchResultSet> &results_J,
353  vector<CRef <CIgAnnotation> > &annot);
354 
355  void x_AnnotateC(CRef<CSearchResultSet> &results_c,
356  CRef<CSearchResultSet> &results_j,
357  vector<CRef <CIgAnnotation> > &annot);
358 
359  /// Annotate the query chaintype and domains based on blast results
360  void x_AnnotateDomain(CRef<CSearchResultSet> &gl_results,
361  CRef<CSearchResultSet> &dm_results,
362  vector<CRef <CIgAnnotation> > &annot);
363 
364  /// Set the subject chain type and frame info
365  void x_SetChainType(CRef<CSearchResultSet> &results,
366  vector<CRef <CIgAnnotation> > &annot);
367 
368  /// Convert bl2seq result to database search mode
370 
371  /// Sort blast results according to evalue
372  static void s_SortResultsByEvalue(CRef<CSearchResultSet> &results);
373 
374  /// Append blast results to the final results
375  static void s_AppendResults(CRef<CSearchResultSet> &results,
376  int num_aligns,
377  int gene,
378  CRef<CSearchResultSet> &final_results);
379 
380 
381  /// Append annotation info to the final results
382  void x_SetAnnotation(vector<CRef <CIgAnnotation> > &annot,
383  CRef<CSearchResultSet> &final_results);
384 
385  void x_FindDJ(CRef<CSearchResultSet>& results_D,
386  CRef<CSearchResultSet>& results_J,
387  CRef <CIgAnnotation> & annot,
388  CRef<CSeq_align_set>& align_D,
389  CRef<CSeq_align_set>& align_J,
390  string q_ct,
391  bool q_ms,
392  ENa_strand q_st,
393  int q_ve,
394  int iq);
395 
396  void x_FindDJAln(CRef<CSeq_align_set>& align_D,
397  CRef<CSeq_align_set>& align_J,
398  string q_ct,
399  bool q_ms,
400  ENa_strand q_st,
401  int q_ve,
402  int iq,
403  bool va_or_vd_as_heavy_chain);
404 
407  void x_ScreenByAlignLength(CRef<CSearchResultSet> & results, int length);
408  void x_FillJDomain(CRef<CSeq_align> & align, CRef <CIgAnnotation> & annot);
409  void x_ProcessDJResult(CRef<CSearchResultSet>& results_V,
410  CRef<CSearchResultSet>& results_D,
411  CRef<CSearchResultSet>& results_J,
412  vector<CRef <CIgAnnotation> > &annots);
414  CRef<CSearchResultSet>& results_D,
415  CRef<CSearchResultSet>& results_J,
416  vector<CRef <CIgAnnotation> > &annots);
417 
419  vector<CRef <CIgAnnotation> > &annots);
420 
421 };
422 
427 public:
431  }
433  CRef<CScope> scope){
434  int lx = x->GetAlignLength(), ly = y->GetAlignLength();
435  int jx_start = x->GetSeqStart(0);
436  int jy_start = y->GetSeqStart(0);
437  int sx = 0, sy = 0;
440 
441  int reliable_J_match = reliable_J_match_factor*
442  (scope->GetBioseqHandle(x->GetSeq_id(1)).GetBioseqLength() +
443  scope->GetBioseqHandle(y->GetSeq_id(1)).GetBioseqLength())/2;
444 
445 
446  //if there are additional J genes, consider using the 5' one if conditions met.
447  //this reflect the case where rearrangement is followed by downstream J's
448  if (lx > reliable_J_match && ly > reliable_J_match && abs(jx_start - jy_start) > min_J_position_diff) {
449  if (x->GetSeqStrand(0) == eNa_strand_minus){
450  return (jx_start > jy_start + min_J_position_diff && sx>sy*reliable_J_match_factor);
451  } else {
452  return (jx_start < jy_start - min_J_position_diff && sx>sy*reliable_J_match_factor);
453 
454  }
455  } else if (sx != sy) {
456  return (sx > sy);
457  } else if (lx != ly) {
458  return (lx >= ly);
459  }
460 
461  string x_id = NcbiEmptyString;
462  string y_id = NcbiEmptyString;
463  x->GetSeq_id(1).GetLabel(&x_id, CSeq_id::eContent);
464  y->GetSeq_id(1).GetLabel(&y_id, CSeq_id::eContent);
465 
466  return (x_id < y_id);
467 
468  }
469 };
470 
471 END_SCOPE(blast)
473 
474 /* @} */
475 
476 #endif /* ALGO_BLAST_IGBLAST___IGBLAST__HPP */
Keeps track of the version of IgBLAST in the NCBI C++ toolkit.
Definition: igblast.hpp:54
CObject –.
Definition: ncbiobj.hpp:180
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
bool GetNamedScore(const string &id, int &score) const
Get score.
Definition: Seq_align.cpp:563
TSeqPos GetSeqStart(TDim row) const
Definition: Seq_align.cpp:252
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
Definition: Seq_align.cpp:294
TSeqPos GetAlignLength(bool include_gaps=true) const
Get the length of this alignment.
Definition: Seq_align.cpp:1993
CVersionInfo –.
Source of query sequence data for BLAST Provides an interface for search classes to retrieve sequence...
Definition: query_data.hpp:147
Class for the messages for an individual query sequence.
const_iterator end() const
Definition: map.hpp:152
const_iterator find(const key_type &key) const
Definition: map.hpp:153
#define true
Definition: bool.h:35
#define false
Definition: bool.h:36
bool m_ExtendAlign5end
Definition: igblast.hpp:85
void x_AnnotateDomain(CRef< CSearchResultSet > &gl_results, CRef< CSearchResultSet > &dm_results, vector< CRef< CIgAnnotation > > &annot)
Annotate the query chaintype and domains based on blast results.
Definition: igblast.cpp:1645
bool m_IsProtein
Definition: igblast.hpp:66
CRef< IQueryFactory > m_Subject
Definition: igblast.hpp:301
int m_DomainInfo_S[10]
Definition: igblast.hpp:108
CRef< CSearchResultSet > Run()
Run the Ig-BLAST engine.
Definition: igblast.cpp:356
string m_ChainTypeToShow
Definition: igblast.hpp:99
CRef< CSeq_align_set > & SetSeqAlign()
Definition: igblast.hpp:214
CIgAnnotationInfo(CConstRef< CIgBlastOptions > &ig_options)
Definition: igblast.cpp:83
double reliable_J_match_factor
Definition: igblast.hpp:426
list< string > m_AirrField
Definition: igblast.hpp:90
int GetJDomain(const string &sid)
Definition: igblast.hpp:163
void x_AnnotateC(CRef< CSearchResultSet > &results_c, CRef< CSearchResultSet > &results_j, vector< CRef< CIgAnnotation > > &annot)
Definition: igblast.cpp:1500
CRef< CLocalDbAdapter > m_LocalDb
Definition: igblast.hpp:302
bool GetDomainInfo(const string sid, int *domain_info)
Definition: igblast.hpp:137
ScorePositionSort(CRef< CScope > scope)
Definition: igblast.hpp:428
string m_EntrezQuery
Definition: igblast.hpp:307
vector< string > m_ChainType
Definition: igblast.hpp:98
static void s_SortResultsByEvalue(CRef< CSearchResultSet > &results)
Sort blast results according to evalue.
Definition: igblast.cpp:1935
void x_AnnotateDJ(CRef< CSearchResultSet > &results_D, CRef< CSearchResultSet > &results_J, vector< CRef< CIgAnnotation > > &annot)
Annotate the D and J genes based on blast results.
Definition: igblast.cpp:1595
CRef< CLocalDbAdapter > m_Db[5]
Definition: igblast.hpp:78
int m_FrameInfo[3]
Definition: igblast.hpp:103
void x_FindDJAln(CRef< CSeq_align_set > &align_D, CRef< CSeq_align_set > &align_J, string q_ct, bool q_ms, ENa_strand q_st, int q_ve, int iq, bool va_or_vd_as_heavy_chain)
Definition: igblast.cpp:972
CIgBlast & operator=(const CIgBlast &rhs)
Prohibit assignment operator.
CRef< objects::CSeq_align_set > m_Alignment
alignments for this query
void x_ProcessCResult(CRef< CSearchResultSet > &results_C, vector< CRef< CIgAnnotation > > &annots)
Definition: igblast.cpp:1425
void x_SetAnnotation(vector< CRef< CIgAnnotation > > &annot, CRef< CSearchResultSet > &final_results)
Append annotation info to the final results.
Definition: igblast.cpp:2069
void x_SetupNoOverlapDSearch(const vector< CRef< CIgAnnotation > > &annots, CRef< CSearchResultSet > &results, CRef< IQueryFactory > &qf, CRef< CBlastOptionsHandle > &opts_hndl, int db_type)
Definition: igblast.cpp:692
int m_DframeStart
Definition: igblast.hpp:114
int m_GeneInfo[8]
Definition: igblast.hpp:102
map< string, int > m_Fwr4EndOffset
Definition: igblast.hpp:193
map< string, int > m_DomainIndex
Definition: igblast.hpp:187
int m_DomainInfo[12]
Definition: igblast.hpp:105
CRef< CIgAnnotation > & SetIgAnnotation()
Definition: igblast.hpp:210
void x_ScreenByAlignLength(CRef< CSearchResultSet > &results, int length)
Definition: igblast.cpp:173
int GetFrameOffset(const string sid)
Definition: igblast.hpp:155
int m_NumAlign[4]
Definition: igblast.hpp:82
void x_SetupDJSearch(const vector< CRef< CIgAnnotation > > &annots, CRef< IQueryFactory > &qf, CRef< CBlastOptionsHandle > &opts_hndl, int db_type)
Prepare blast option handle and query for D, J germline database search.
Definition: igblast.cpp:622
vector< string > m_TopGeneIds
Definition: igblast.hpp:97
bool operator()(CRef< CSeq_align > &x, CRef< CSeq_align > &y)
Definition: igblast.hpp:429
bool m_DetectOverlap
Definition: igblast.hpp:89
void SetNumberOfThreads(size_t nthreads)
Set MT mode.
Definition: igblast.hpp:289
bool m_IsLocal
Definition: igblast.hpp:298
CConstRef< CIgBlastOptions > m_IgOptions
Definition: igblast.hpp:305
void x_SetupCRegionSearch(const vector< CRef< CIgAnnotation > > &annots, CRef< IQueryFactory > &qf, CRef< CBlastOptionsHandle > &opts_hndl)
Definition: igblast.cpp:575
CRef< CBlastOptionsHandle > m_Options
Definition: igblast.hpp:304
string m_RID
Definition: igblast.hpp:309
vector< int > m_DomainData
Definition: igblast.hpp:188
static void s_AppendResults(CRef< CSearchResultSet > &results, int num_aligns, int gene, CRef< CSearchResultSet > &final_results)
Append blast results to the final results.
Definition: igblast.cpp:1992
const string GetDomainChainType(const string sid)
Definition: igblast.hpp:148
string GetRid()
Definition: igblast.hpp:293
void x_SetupDbSearch(vector< CRef< CIgAnnotation > > &annot, CRef< IQueryFactory > &qf)
Prepare blast option handle and query for specified database search.
Definition: igblast.cpp:754
string m_Origin
Definition: igblast.hpp:67
map< string, int > m_FrameOffset
Definition: igblast.hpp:190
map< string, string > m_DJChainType
Definition: igblast.hpp:191
size_t m_NumThreads
Definition: igblast.hpp:299
void x_AnnotateD(CRef< CSearchResultSet > &results_D, vector< CRef< CIgAnnotation > > &annot)
Definition: igblast.cpp:1473
bool s_CompareSeqAlignByScoreAndPosition(const CRef< CSeq_align > &x, const CRef< CSeq_align > &y, CRef< CScope > scope)
Definition: igblast.hpp:432
void x_FillJDomain(CRef< CSeq_align > &align, CRef< CIgAnnotation > &annot)
Definition: igblast.cpp:1238
void x_ProcessDJResult(CRef< CSearchResultSet > &results_V, CRef< CSearchResultSet > &results_D, CRef< CSearchResultSet > &results_J, vector< CRef< CIgAnnotation > > &annots)
Definition: igblast.cpp:1454
int m_CDomain[2]
Definition: igblast.hpp:113
const string GetDJChainType(const string sid)
Definition: igblast.hpp:179
CIgBlast(CRef< CBlastQueryVector > query_factory, CRef< CSearchDatabase > blastdb, CRef< IQueryFactory > subjects, CRef< CBlastOptionsHandle > options, CConstRef< CIgBlastOptions > ig_options, string entrez_query, CRef< CScope > scope)
Remote Igblast search API.
Definition: igblast.hpp:264
string m_AuxFilename
Definition: igblast.hpp:74
void x_ExtendAlign3end(CRef< CSearchResultSet > &results)
Definition: igblast.cpp:275
int m_JDomain[5]
Definition: igblast.hpp:111
CIgAnnotationInfo m_AnnotationInfo
Definition: igblast.hpp:306
int GetFwr4EndOffset(const string &sid)
Definition: igblast.hpp:171
~CIgBlast()
Destructor.
Definition: igblast.hpp:283
CRef< CScope > m_Scope
Definition: igblast.hpp:308
string m_IgDataPath
Definition: igblast.hpp:77
CIgBlast(const CIgBlast &rhs)
Prohibit copy constructor.
string m_DFrameFileName
Definition: igblast.hpp:75
string m_SequenceType
Definition: igblast.hpp:69
map< string, int > m_JDomainInfo
Definition: igblast.hpp:192
CRef< CScope > m_scope
Definition: igblast.hpp:424
void x_FindDJ(CRef< CSearchResultSet > &results_D, CRef< CSearchResultSet > &results_J, CRef< CIgAnnotation > &annot, CRef< CSeq_align_set > &align_D, CRef< CSeq_align_set > &align_J, string q_ct, bool q_ms, ENa_strand q_st, int q_ve, int iq)
Definition: igblast.cpp:1169
void x_AnnotateJ(CRef< CSearchResultSet > &results_J, vector< CRef< CIgAnnotation > > &annot)
Definition: igblast.cpp:1561
CRef< CBlastQueryVector > m_Query
Definition: igblast.hpp:300
bool m_MinusStrand
Definition: igblast.hpp:96
CIgAnnotation()
Constructor.
Definition: igblast.hpp:117
CIgBlastResults(CConstRef< objects::CSeq_id > query, CRef< objects::CSeq_align_set > align, const TQueryMessages &errs, CRef< CBlastAncillaryData > ancillary_data)
Constructor.
Definition: igblast.hpp:225
bool m_ExtendAlign3end
Definition: igblast.hpp:86
void x_ExtendAlign5end(CRef< CSearchResultSet > &results)
Definition: igblast.cpp:190
void x_AnnotateV(CRef< CSearchResultSet > &results, vector< CRef< CIgAnnotation > > &annot)
Annotate the V gene based on blast results.
Definition: igblast.cpp:839
void x_ProcessDGeneResult(CRef< CSearchResultSet > &results_V, CRef< CSearchResultSet > &results_D, CRef< CSearchResultSet > &results_J, vector< CRef< CIgAnnotation > > &annots)
Definition: igblast.cpp:1319
void x_SetChainType(CRef< CSearchResultSet > &results, vector< CRef< CIgAnnotation > > &annot)
Set the subject chain type and frame info.
Definition: igblast.cpp:1904
const CRef< CIgAnnotation > & GetIgAnnotation() const
Definition: igblast.hpp:206
string m_CustomInternalData
Definition: igblast.hpp:76
map< string, string > m_DomainChainType
Definition: igblast.hpp:189
CRef< CSearchDatabase > m_RemoteDb
Definition: igblast.hpp:303
CRef< CIgAnnotation > m_Annotation
Definition: igblast.hpp:233
void x_SetupVSearch(CRef< IQueryFactory > &qf, CRef< CBlastOptionsHandle > &opts_hndl)
Prepare blast option handle and query for V germline database search.
Definition: igblast.cpp:553
string m_DomainSystem
Definition: igblast.hpp:68
void x_ConvertResultType(CRef< CSearchResultSet > &results)
Convert bl2seq result to database search mode.
Definition: igblast.cpp:1948
CIgBlast(CRef< CBlastQueryVector > query_factory, CRef< CLocalDbAdapter > blastdb, CRef< CBlastOptionsHandle > options, CConstRef< CIgBlastOptions > ig_options, CRef< CScope > scope)
Local Igblast search API.
Definition: igblast.hpp:244
bool m_Translate
Definition: igblast.hpp:84
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
Definition: Seq_id.cpp:2040
@ eContent
Untagged human-readable accession or the like.
Definition: Seq_id.hpp:605
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
TSeqPos GetBioseqLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#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 NcbiEmptyString
Definition: ncbistr.hpp:122
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
@ eNa_strand_minus
Definition: Na_strand_.hpp:67
int i
Declares class which provides internal BLAST database representations to the internal BLAST APIs.
#define abs(a)
Definition: ncbi_heapmgr.c:130
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
static string query
Uniform BLAST Search Interface.
Modified on Wed Apr 17 13:10:08 2024 by modify_doxy.py rev. 669887