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

Go to the SVN repository for this file.

1 
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_options_cxx.cpp
31 /// Implements the CBlastOptions class, which encapsulates options structures
32 /// from algo/blast/core
33 
34 #include <ncbi_pch.hpp>
36 #include "blast_setup.hpp"
38 #include "blast_memento_priv.hpp"
39 
41 
46 #include <objects/blast/names.hpp>
47 
48 /** @addtogroup AlgoBlast
49  *
50  * @{
51  */
52 
55 BEGIN_SCOPE(blast)
56 
57 #ifndef SKIP_DOXYGEN_PROCESSING
58 
59 /// Encapsulates all blast input parameters
61 {
62 public:
64  : m_DefaultsMode(false)
65  {
66  m_ReqOpts.Reset(new objects::CBlast4_parameters);
67  }
68 
70  {
71  }
72 
73  /// Copy constructor
75  : m_DefaultsMode(false)
76  {
77  x_DoDeepCopy(optsRemote);
78  }
79 
80  /// Assignment operator
82  {
83  x_DoDeepCopy(optsRemote);
84  return *this;
85  }
86 
87  // the "new paradigm"
88  typedef ncbi::objects::CBlast4_parameters TBlast4Opts;
90  {
91  return m_ReqOpts;
92  }
93 
94  typedef vector< CConstRef<objects::CSeq_loc> > TSeqLocVector;
95 
96  // SetValue(x,y) with different types:
97  void SetValue(EBlastOptIdx opt, const EProgram & x);
98  void SetValue(EBlastOptIdx opt, const int & x);
99  void SetValue(EBlastOptIdx opt, const double & x);
100  void SetValue(EBlastOptIdx opt, const char * x);
101  void SetValue(EBlastOptIdx opt, const TSeqLocVector & x);
102  void SetValue(EBlastOptIdx opt, const ESeedContainerType & x);
103  void SetValue(EBlastOptIdx opt, const bool & x);
104  void SetValue(EBlastOptIdx opt, const Int8 & x);
105 
106  // Pseudo-types:
107  void SetValue(EBlastOptIdx opt, const short & x)
108  {
109  int x2 = x; SetValue(opt, x2);
110  }
111 
112  void SetValue(EBlastOptIdx opt, const unsigned int & x)
113  {
114  int x2 = x; SetValue(opt, x2);
115  }
116 
117  void SetValue(EBlastOptIdx opt, const unsigned char & x)
118  {
119  int x2 = x; SetValue(opt, x2);
120  }
121 
123  {
124  int x2 = x; SetValue(opt, x2);
125  }
126 
127  /// Remove any objects matching this Blast4 field object.
128  ///
129  /// The given field object represents a Blast4 field to remove
130  /// from the list of remote options.
131  ///
132  /// @param opt Field object representing option to remove.
134  {
135  x_ResetValue(opt);
136  }
137 
138  void SetDefaultsMode(bool dmode)
139  {
140  m_DefaultsMode = dmode;
141  }
142 
144  {
145  return m_DefaultsMode;
146  }
147 
148 
149 private:
150  //CRef<objects::CBlast4_queue_search_request> m_Req;
152 
154 
155  /// Perform a "deep copy" of remote Blast options
156  /// @param optsRemote remote Blast options object to copy from.
157  void x_DoDeepCopy(const CBlastOptionsRemote& optsRemote)
158  {
159  if (&optsRemote != this)
160  {
161  m_ReqOpts.Reset(new objects::CBlast4_parameters);
162  m_ReqOpts->Assign(*optsRemote.m_ReqOpts);
163  m_DefaultsMode = optsRemote.m_DefaultsMode;
164  }
165  }
166 
167  template<class T>
168  void x_SetParam(CBlast4Field & name, T & value)
169  {
170  x_SetOneParam(name, & value);
171  }
172 
173  void x_SetOneParam(CBlast4Field & field, const int * x)
174  {
175  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
176  v->SetInteger(*x);
177 
178  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
179  p->SetName(field.GetName());
180  p->SetValue(*v);
181 
182  x_AttachValue(p);
183  }
184 
185  void x_SetOneParam(CBlast4Field & field, const char ** x)
186  {
187  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
188  v->SetString().assign((x && (*x)) ? (*x) : "");
189 
190  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
191  p->SetName(field.GetName());
192  p->SetValue(*v);
193 
194  x_AttachValue(p);
195  }
196 
197  void x_SetOneParam(CBlast4Field & field, const bool * x)
198  {
199  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
200  v->SetBoolean(*x);
201 
202  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
203  p->SetName(field.GetName());
204  p->SetValue(*v);
205 
206  x_AttachValue(p);
207  }
208 
210  {
211  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
212  v->SetCutoff(**x);
213 
214  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
215  p->SetName(field.GetName());
216  p->SetValue(*v);
217 
218  x_AttachValue(p);
219  }
220 
221  void x_SetOneParam(CBlast4Field & field, const double * x)
222  {
223  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
224  v->SetReal(*x);
225 
226  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
227  p->SetName(field.GetName());
228  p->SetValue(*v);
229 
230  x_AttachValue(p);
231  }
232 
233  void x_SetOneParam(CBlast4Field & field, const Int8 * x)
234  {
235  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
236  v->SetBig_integer(*x);
237 
238  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
239  p->SetName(field.GetName());
240  p->SetValue(*v);
241 
242  x_AttachValue(p);
243  }
244 
246  {
247  CRef<objects::CBlast4_value> v(new objects::CBlast4_value);
248  v->SetStrand_type(*x);
249 
250  CRef<objects::CBlast4_parameter> p(new objects::CBlast4_parameter);
251  p->SetName(field.GetName());
252  p->SetValue(*v);
253 
254  x_AttachValue(p);
255  }
256 
258  {
259  typedef objects::CBlast4_parameter TParam;
260 
261  NON_CONST_ITERATE(list< CRef<TParam> >, iter, m_ReqOpts->Set()) {
262  if ((**iter).GetName() == p->GetName()) {
263  (*iter) = p;
264  return;
265  }
266  }
267 
268  m_ReqOpts->Set().push_back(p);
269  }
270 
271  /// Remove values for a given Blast4 field.
272  /// @param f Field to search for and remove.
274  {
275  typedef list< CRef<objects::CBlast4_parameter> > TParamList;
276  typedef TParamList::iterator TParamIter;
277 
278  const string & nm = f.GetName();
279  TParamList & lst = m_ReqOpts->Set();
280  TParamIter pos = lst.begin(), end = lst.end();
281 
282  while(pos != end) {
283  TParamIter current = pos;
284  pos++;
285 
286  if ((**current).GetName() == nm) {
287  lst.erase(current);
288  }
289  }
290  }
291 
292  void x_Throwx(const string& msg) const
293  {
294  NCBI_THROW(CBlastException, eInvalidOptions, msg);
295  }
296 };
297 
298 
300  : m_Local (0),
301  m_Remote(0),
302  m_DefaultsMode(false)
303 {
304  if (locality == eRemote)
305  locality = eBoth;
306 
307  if (locality != eRemote) {
308  m_Local = new CBlastOptionsLocal();
309  }
310  if (locality != eLocal) {
312  }
313 }
314 
316 {
317  if (m_Local) {
318  delete m_Local;
319  }
320  if (m_Remote) {
321  delete m_Remote;
322  }
323 }
324 
326 {
327  CRef<CBlastOptions> optsRef;
328  optsRef.Reset(new CBlastOptions(GetLocality()));
329  optsRef->x_DoDeepCopy(*this);
330  return optsRef;
331 }
332 
335 {
336  if (! m_Remote) {
337  return eLocal;
338  }
339  if (! m_Local) {
340  return eRemote;
341  }
342  return eBoth;
343 }
344 
345 // Note: only some of the options are supported for the remote case;
346 // An exception is thrown if the option is not available.
347 
349 {
350  if (m_DefaultsMode) {
351  return;
352  }
353 
354  switch(opt) {
355  case eBlastOpt_Program:
356  return;
357 
358  default:
359  break;
360  }
361 
362  char errbuf[1024];
363 
364  sprintf(errbuf, "tried to set option (%d) and value (%d), line (%d).",
365  int(opt), v, __LINE__);
366 
367  x_Throwx(string("err:") + errbuf);
368 }
369 
371 {
372  if (m_DefaultsMode) {
373  return;
374  }
375 
376  switch(opt) {
377  case eBlastOpt_WordSize:
378  x_SetParam(CBlast4Field::Get(opt), v);
379  return;
380 
381  // Added for rmblastn and the new masklevel option. -RMH-
382  case eBlastOpt_MaskLevel:
384  return;
385 
387  // do nothing, should be specified by the task
388  return;
389 
391  {
392  typedef objects::EBlast4_strand_type TSType;
393  TSType strand;
394  bool set_strand = true;
395 
396  switch(v) {
397  case 1:
399  break;
400 
401  case 2:
403  break;
404 
405  case 3:
407  break;
408 
409  default:
410  set_strand = false;
411  }
412 
413  if (set_strand) {
414  x_SetParam(CBlast4Field::Get(opt), strand);
415  return;
416  }
417  }
418 
420  x_SetParam(CBlast4Field::Get(opt), v);
421  return;
422 
424  x_SetParam(CBlast4Field::Get(opt), v);
425  return;
426 
428  x_SetParam(CBlast4Field::Get(opt), v);
429  return;
430 
432  x_SetParam(CBlast4Field::Get(opt), v);
433  return;
434 
436  if (0) {
437  typedef objects::CBlast4_cutoff TCutoff;
438  CRef<TCutoff> cutoff(new TCutoff);
439  cutoff->SetRaw_score(v);
440 
441  x_SetParam(CBlast4Field::Get(opt), cutoff);
442  }
443  return;
444 
446  x_SetParam(CBlast4Field::Get(opt), v);
447  return;
448 
450  x_SetParam(CBlast4Field::Get(opt), v);
451  return;
452 
454  x_SetParam(CBlast4Field::Get(opt), v);
455  return;
456 
458  x_SetParam(CBlast4Field::Get(opt), v);
459  return;
460 
462  if (v < eNumCompoAdjustModes) {
463  x_SetParam(CBlast4Field::Get(opt), v);
464  return;
465  }
466 
468  x_SetParam(CBlast4Field::Get(opt), v);
469  return;
470 
472  x_SetParam(CBlast4Field::Get(opt), v);
473  return;
474 
476  x_SetParam(CBlast4Field::Get(opt), v);
477  return;
478 
480  x_SetParam(CBlast4Field::Get(opt), v);
481  return;
482 
484  x_SetParam(CBlast4Field::Get(opt), v);
485  return;
486 
488  x_SetParam(CBlast4Field::Get(opt), v);
489  return;
490 
492  x_SetParam(CBlast4Field::Get(opt), v);
493  return;
494 
496  x_SetParam(CBlast4Field::Get(opt), v);
497  return;
498 
500  x_SetParam(CBlast4Field::Get(opt), v);
501  return;
502 
504  x_SetParam(CBlast4Field::Get(opt), v);
505  return;
506 
508  x_SetParam(CBlast4Field::Get(opt), v);
509  return;
510 
512  x_SetParam(CBlast4Field::Get(opt), v);
513  return;
514 
515  case eBlastOpt_UnifiedP:
516  x_SetParam(CBlast4Field::Get(opt), v);
517  return;
518 
520  x_SetParam(CBlast4Field::Get(opt), v);
521  return;
522 
524  x_SetParam(CBlast4Field::Get(opt), v);
525  return;
526  //For handling rpsblast save search strategy with mutli-dbs
527  case eBlastOpt_DbSeqNum:
528  case eBlastOpt_DbLength:
529  return;
530 
531  default:
532  break;
533  }
534 
535  char errbuf[1024];
536 
537  sprintf(errbuf, "tried to set option (%d) and value (%d), line (%d).",
538  int(opt), v, __LINE__);
539 
540  x_Throwx(string("err:") + errbuf);
541 }
542 
543 void CBlastOptionsRemote::SetValue(EBlastOptIdx opt, const double & v)
544 {
545  if(opt == eBlastOpt_EvalueThreshold) {
546  typedef objects::CBlast4_cutoff TCutoff;
547  CRef<TCutoff> cutoff(new TCutoff);
548  cutoff->SetE_value(v);
549  x_SetParam(CBlast4Field::Get(opt), cutoff);
550  return;
551  }
552 
553  if (m_DefaultsMode) {
554  return;
555  }
556 
557  switch(opt) {
559  {
560  typedef objects::CBlast4_cutoff TCutoff;
561  CRef<TCutoff> cutoff(new TCutoff);
562  cutoff->SetE_value(v);
563 
564  x_SetParam(CBlast4Field::Get(opt), cutoff);
565  }
566  return;
567 
569  x_SetParam(CBlast4Field::Get(opt), v);
570  return;
571 
573  x_SetParam(CBlast4Field::Get(opt), v);
574  return;
575 
577  x_SetParam(CBlast4Field::Get(opt), v);
578  return;
579 
581  x_SetParam(CBlast4Field::Get(opt), v);
582  return;
583 
585  x_SetParam(CBlast4Field::Get(opt), v);
586  return;
587 
588  case eBlastOpt_XDropoff:
589  //x_SetParam(B4Param_XDropoff, v);
590  return;
591 
593  x_SetParam(CBlast4Field::Get(opt), v);
594  return;
595 
597  x_SetParam(CBlast4Field::Get(opt), v);
598  return;
599 
601  x_SetParam(CBlast4Field::Get(opt), v);
602  return;
603 
605  x_SetParam(CBlast4Field::Get(opt), v);
606  return;
607 
609  x_SetParam(CBlast4Field::Get(opt), v);
610  return;
611 
613  x_SetParam(CBlast4Field::Get(opt), v);
614  return;
615 
616  default:
617  break;
618  }
619 
620  char errbuf[1024];
621 
622  sprintf(errbuf, "tried to set option (%d) and value (%f), line (%d).",
623  int(opt), v, __LINE__);
624 
625  x_Throwx(string("err:") + errbuf);
626 }
627 
629 {
630  if (m_DefaultsMode) {
631  return;
632  }
633 
634  switch(opt) {
636  x_SetParam(CBlast4Field::Get(opt), v);
637  return;
638 
640  x_SetParam(CBlast4Field::Get(opt), v);
641  return;
642 
644  x_SetParam(CBlast4Field::Get(opt), v);
645  return;
646 
648  x_SetParam(CBlast4Field::Get(opt), v);
649  return;
650 
652  x_SetParam(CBlast4Field::Get(opt), v);
653  return;
654 
656  x_SetParam(CBlast4Field::Get(opt), v);
657  return;
658 
659  default:
660  break;
661  }
662 
663  char errbuf[1024];
664 
665  sprintf(errbuf, "tried to set option (%d) and value (%.20s), line (%d).",
666  int(opt), v, __LINE__);
667 
668  x_Throwx(string("err:") + errbuf);
669 }
670 
672 {
673  if (m_DefaultsMode) {
674  return;
675  }
676 
677  char errbuf[1024];
678 
679  sprintf(errbuf, "tried to set option (%d) and TSeqLocVector (size %zd), line (%d).",
680  int(opt), v.size(), __LINE__);
681 
682  x_Throwx(string("err:") + errbuf);
683 }
684 
686 {
687  if (m_DefaultsMode) {
688  return;
689  }
690 
691  char errbuf[1024];
692 
693  sprintf(errbuf, "tried to set option (%d) and value (%d), line (%d).",
694  int(opt), v, __LINE__);
695 
696  x_Throwx(string("err:") + errbuf);
697 }
698 
700 {
701  if (m_DefaultsMode) {
702  return;
703  }
704 
705  switch(opt) {
707  {
708  bool ungapped = ! v;
709  x_SetParam(CBlast4Field::Get(opt), ungapped); // inverted
710  return;
711  }
712 
713  // Added for rmblastn and the new complexity adjusted scoring -RMH-
715  x_SetParam(CBlast4Field::Get(opt), v);
716  return;
717 
719  x_SetParam(CBlast4Field::Get(opt), v);
720  return;
721 
723  x_SetParam(CBlast4Field::Get(opt), v);
724  return;
725 
727  x_SetParam(CBlast4Field::Get(opt), v);
728  return;
729 
731  x_SetParam(CBlast4Field::Get(opt), v);
732  return;
733 
735  x_SetParam(CBlast4Field::Get(opt), v);
736  return;
737 
739  x_SetParam(CBlast4Field::Get(opt), v);
740  return;
741 
743  x_SetParam(CBlast4Field::Get(opt), v);
744  return;
745 
747  x_SetParam(CBlast4Field::Get(opt), v);
748  return;
749 
751  x_SetParam(CBlast4Field::Get(opt), v);
752  return;
753 
755  x_SetParam(CBlast4Field::Get(opt), v);
756  return;
757  default:
758  break;
759  }
760 
761  char errbuf[1024];
762 
763  sprintf(errbuf, "tried to set option (%d) and value (%s), line (%d).",
764  int(opt), (v ? "true" : "false"), __LINE__);
765 
766  x_Throwx(string("err:") + errbuf);
767 }
768 
770 {
771  if (m_DefaultsMode) {
772  return;
773  }
774 
775  switch(opt) {
777  x_SetParam(CBlast4Field::Get(opt), v);
778  return;
779 
780  case eBlastOpt_DbLength:
781  x_SetParam(CBlast4Field::Get(opt), v);
782  return;
783 
784  default:
785  break;
786  }
787 
788  char errbuf[1024];
789 
790  sprintf(errbuf, "tried to set option (%d) and value (%f), line (%d).",
791  int(opt), double(v), __LINE__);
792 
793  x_Throwx(string("err:") + errbuf);
794 }
795 
798 {
799  if ( !m_Local ) {
800  NCBI_THROW(CBlastException, eInvalidArgument,
801  "Cannot create CBlastOptionsMemento without a local "
802  "CBlastOptions object");
803  }
804  return new CBlastOptionsMemento(m_Local);
805 }
806 
807 bool
809 {
810  if (m_Local && rhs.m_Local) {
811  return (*m_Local == *rhs.m_Local);
812  } else {
813  NCBI_THROW(CBlastException, eNotSupported,
814  "Equality operator unsupported for arguments");
815  }
816 }
817 
818 bool
820 {
821  return !(*this == rhs);
822 }
823 
824 bool
826 {
827  bool local_okay = m_Local ? (m_Local ->Validate()) : true;
828 
829  return local_okay;
830 }
831 
832 EProgram
834 {
835  if (! m_Local) {
836  x_Throwx("Error: GetProgram() not available.");
837  }
838  return m_Local->GetProgram();
839 }
840 
843 {
844  if (! m_Local) {
845  x_Throwx("Error: GetProgramType() not available.");
846  }
847  return m_Local->GetProgramType();
848 }
849 
850 void
852 {
853  if (m_Local) {
854  m_Local->SetProgram(p);
855  }
856  if (m_Remote) {
858  }
859 }
860 
861 bool
863  switch ( GetProgram()) {
864  case ePSIBlast :
865  case ePSITblastn :
866  case eDeltaBlast :
867  return true;
868  break;
869  default :
870  return false;
871  }
872 }
873 /******************* Lookup table options ***********************/
874 double
876 {
877  if (! m_Local) {
878  x_Throwx("Error: GetWordThreshold() not available.");
879  }
880  return m_Local->GetWordThreshold();
881 }
882 
883 void
885 {
886  if (m_Local) {
888  }
889  if (m_Remote) {
890  m_Remote->SetValue(eBlastOpt_WordThreshold, static_cast<int>(w));
891  }
892 }
893 
896 {
897  if (! m_Local) {
898  x_Throwx("Error: GetLookupTableType() not available.");
899  }
900  return m_Local->GetLookupTableType();
901 }
902 void
904 {
905  if (m_Local) {
907  }
908  if (m_Remote) {
910  }
911 }
912 
913 int
915 {
916  if (! m_Local) {
917  x_Throwx("Error: GetWordSize() not available.");
918  }
919  return m_Local->GetWordSize();
920 }
921 void
923 {
924  if (m_Local) {
925  m_Local->SetWordSize(ws);
926  }
927  if (m_Remote) {
929  }
930 }
931 
933 {
934  if (!m_Local) {
935  x_Throwx("Error: GetLookupTableStride not available.");
936  }
937  return m_Local->GetLookupTableStride();
938 }
940 {
941  if (!m_Local) {
942  x_Throwx("Error: SetLookupTableStride not available.");
943  }
945 }
946 
948 {
949  if (!m_Local) {
950  x_Throwx("Error: GetLookupDbFilter not available.");
951  }
952  return m_Local->GetLookupDbFilter();
953 }
954 
956 {
957  if (!m_Local) {
958  x_Throwx("Error: SetLookupDbFilter not yet available.");
959  }
961 }
962 
964 {
965  if (!m_Local) {
966  x_Throwx("Error: GetMaxDbWordCount not available.");
967  }
968  return m_Local->GetMaxDbWordCount();
969 }
970 
972 {
973  if (!m_Local) {
974  x_Throwx("Error: SetMaxDbWordCount not yet available.");
975  }
977 }
978 
979 
980 /// Megablast only lookup table options
981 unsigned char
983 {
984  if (! m_Local) {
985  x_Throwx("Error: GetMBTemplateLength() not available.");
986  }
987  return m_Local->GetMBTemplateLength();
988 }
989 void
991 {
992  if (m_Local) {
994  }
995  if (m_Remote) {
997  }
998 }
999 
1000 unsigned char
1002 {
1003  if (! m_Local) {
1004  x_Throwx("Error: GetMBTemplateType() not available.");
1005  }
1006  return m_Local->GetMBTemplateType();
1007 }
1008 void
1010 {
1011  if (m_Local) {
1013  }
1014  if (m_Remote) {
1016  }
1017 }
1018 
1019 /******************* Query setup options ************************/
1020 
1021 void
1023 {
1024  SetDustFiltering(false);
1025  SetSegFiltering(false);
1026  SetRepeatFiltering(false);
1027  SetMaskAtHash(false);
1030  return;
1031 }
1032 
1033 char*
1035 {
1036  if (! m_Local) {
1037  x_Throwx("Error: GetFilterString() not available.");
1038  }
1039  return m_Local->GetFilterString();/* NCBI_FAKE_WARNING */
1040 }
1041 void
1042 CBlastOptions::SetFilterString(const char* f, bool clear)
1043 {
1044  // Clear if clear is true or filtering set to FALSE.
1045  if (clear == true || NStr::CompareNocase("F", f) == 0) {
1047  }
1048 
1049  if (m_Local) {
1050  m_Local->SetFilterString(f);/* NCBI_FAKE_WARNING */
1051  }
1052 
1053  if (m_Remote) {
1054  // When maintaining this code, please insure the following:
1055  //
1056  // 1. This list of items is parallel to the list found
1057  // below, in the "set" block.
1058  //
1059  // 2. Both lists should also correspond to the list of
1060  // options in names.hpp and names.cpp that are related
1061  // to filtering options.
1062  //
1063  // 3. Blast4's code in CCollectFilterOptions should also
1064  // handle the set of options handled here.
1065  //
1066  // 4. CRemoteBlast and CRemoteBlastService's handling of
1067  // filtering options (CBlastOptionsBuilder) should
1068  // include all of these elements.
1069  //
1070  // 5. Libnet2blast should deal with all of these filtering
1071  // options when it builds CBlastOptionsHandle objects.
1072  //
1073  // 6. Probably at least one or two other places that I forgot.
1074 
1076 
1077  bool do_dust(false), do_seg(false), do_rep(false);
1078 
1081  do_seg = m_Local->GetSegFiltering();
1083  } else {
1088  }
1089 
1092  do_dust = m_Local->GetDustFiltering();
1093  do_rep = m_Local->GetRepeatFiltering();
1094 
1097  } else {
1102 
1105  }
1106 
1107  if (do_dust) {
1114  }
1115 
1116  if (do_rep) {
1119  }
1120 
1121  if (do_seg) {
1128  }
1129  }
1130 }
1131 
1132 bool
1134 {
1135  if (! m_Local) {
1136  x_Throwx("Error: GetMaskAtHash() not available.");
1137  }
1138  return m_Local->GetMaskAtHash();
1139 }
1140 
1141 void
1143 {
1144  if (m_Local) {
1146  }
1147  if (m_Remote) {
1149  }
1150 }
1151 
1152 bool
1154 {
1155  if (! m_Local) {
1156  x_Throwx("Error: GetDustFiltering() not available.");
1157  }
1158  return m_Local->GetDustFiltering();
1159 }
1160 void
1162 {
1163  if (m_Local) {
1165  }
1166  if (m_Remote) {
1168  }
1169 }
1170 
1171 int
1173 {
1174  if (! m_Local) {
1175  x_Throwx("Error: GetDustFilteringLevel() not available.");
1176  }
1177  return m_Local->GetDustFilteringLevel();
1178 }
1179 void
1181 {
1182  if (m_Local) {
1184  }
1185  if (m_Remote) {
1187  }
1188 }
1189 
1190 int
1192 {
1193  if (! m_Local) {
1194  x_Throwx("Error: GetDustFilteringWindow() not available.");
1195  }
1196  return m_Local->GetDustFilteringWindow();
1197 }
1198 void
1200 {
1201  if (m_Local) {
1203  }
1204  if (m_Remote) {
1206  }
1207 }
1208 
1209 int
1211 {
1212  if (! m_Local) {
1213  x_Throwx("Error: GetDustFilteringLinker() not available.");
1214  }
1215  return m_Local->GetDustFilteringLinker();
1216 }
1217 void
1219 {
1220  if (m_Local) {
1222  }
1223  if (m_Remote) {
1225  }
1226 }
1227 
1228 bool
1230 {
1231  if (! m_Local) {
1232  x_Throwx("Error: GetSegFiltering() not available.");
1233  }
1234  return m_Local->GetSegFiltering();
1235 }
1236 void
1238 {
1239  if (m_Local) {
1241  }
1242  if (m_Remote) {
1244  }
1245 }
1246 
1247 int
1249 {
1250  if (! m_Local) {
1251  x_Throwx("Error: GetSegFilteringWindow() not available.");
1252  }
1253  return m_Local->GetSegFilteringWindow();
1254 }
1255 void
1257 {
1258  if (m_Local) {
1260  }
1261  if (m_Remote) {
1263  }
1264 }
1265 
1266 double
1268 {
1269  if (! m_Local) {
1270  x_Throwx("Error: GetSegFilteringLocut() not available.");
1271  }
1272  return m_Local->GetSegFilteringLocut();
1273 }
1274 void
1276 {
1277  if (m_Local) {
1279  }
1280  if (m_Remote) {
1282  }
1283 }
1284 
1285 double
1287 {
1288  if (! m_Local) {
1289  x_Throwx("Error: GetSegFilteringHicut() not available.");
1290  }
1291  return m_Local->GetSegFilteringHicut();
1292 }
1293 void
1295 {
1296  if (m_Local) {
1298  }
1299  if (m_Remote) {
1301  }
1302 }
1303 
1304 bool
1306 {
1307  if (! m_Local) {
1308  x_Throwx("Error: GetRepeatFiltering() not available.");
1309  }
1310  return m_Local->GetRepeatFiltering();
1311 }
1312 void
1314 {
1315  if (m_Local) {
1317  }
1318  if (m_Remote) {
1320  }
1321 }
1322 
1323 const char*
1325 {
1326  if (! m_Local) {
1327  x_Throwx("Error: GetRepeatFilteringDB() not available.");
1328  }
1329  return m_Local->GetRepeatFilteringDB();
1330 }
1331 void
1333 {
1334  if (m_Local) {
1336  }
1337  if (m_Remote) {
1339  }
1340 }
1341 
1342 int
1344 {
1345  if (! m_Local) {
1346  x_Throwx("Error: GetWindowMaskerTaxId() not available.");
1347  }
1348  return m_Local->GetWindowMaskerTaxId();
1349 }
1350 
1351 void
1353 {
1354  if (m_Local) {
1356  }
1357  if (m_Remote) {
1358  if (value) {
1360  } else {
1362  }
1363  }
1364 }
1365 
1366 const char *
1368 {
1369  if (! m_Local) {
1370  x_Throwx("Error: GetWindowMaskerDatabase() not available.");
1371  }
1372  return m_Local->GetWindowMaskerDatabase();
1373 }
1374 
1375 void
1377 {
1378  if (m_Local) {
1380  }
1381  if (m_Remote) {
1382  if (value) {
1384  } else {
1386  }
1387  }
1388 }
1389 
1390 bool
1392 {
1393  if (!m_Local) {
1394  x_Throwx("Error: GetReadQualityFiltering() not available.");
1395  }
1396 
1397  return m_Local->GetReadQualityFiltering();
1398 }
1399 
1400 void
1402 {
1403  if (!m_Local) {
1404  x_Throwx("Error: SetReadQualityFiltering() not available.");
1405  }
1406 
1408 }
1409 
1410 double
1412 {
1413  if (!m_Local) {
1414  x_Throwx("Error: GetReadMaxFractionAmbiguous() not available.");
1415  }
1416 
1418 }
1419 
1420 void
1422 {
1423  if (!m_Local) {
1424  x_Throwx("Error: SetReadMaxFractionAmbiguous() not available.");
1425  }
1426 
1428 }
1429 
1430 int
1432 {
1433  if (!m_Local) {
1434  x_Throwx("Error: GetReadMinDimerEntropy() not available.");
1435  }
1436 
1437  return m_Local->GetReadMinDimerEntropy();
1438 }
1439 
1440 void
1442 {
1443  if (!m_Local) {
1444  x_Throwx("Error: SetReadMinDimerEntropy() not available.");
1445  }
1446 
1448 }
1449 
1452 {
1453  if (! m_Local) {
1454  x_Throwx("Error: GetStrandOption() not available.");
1455  }
1456  return m_Local->GetStrandOption();
1457 }
1458 void
1460 {
1461  if (m_Local) {
1463  }
1464  if (m_Remote) {
1466  }
1467 }
1468 
1469 int
1471 {
1472  if (! m_Local) {
1473  x_Throwx("Error: GetQueryGeneticCode() not available.");
1474  }
1475  return m_Local->GetQueryGeneticCode();
1476 }
1477 void
1479 {
1480  if (m_Local) {
1483  }
1484  if (m_Remote) {
1486  }
1487 }
1488 
1489 /******************* Initial word options ***********************/
1490 int
1492 {
1493  if (! m_Local) {
1494  x_Throwx("Error: GetWindowSize() not available.");
1495  }
1496  return m_Local->GetWindowSize();
1497 }
1498 void
1500 {
1501  if (m_Local) {
1502  m_Local->SetWindowSize(w);
1503  }
1504  if (m_Remote) {
1506  }
1507 }
1508 
1509 int
1511 {
1512  if (! m_Local) {
1513  x_Throwx("Error: GetOffDiagonalRange() not available.");
1514  }
1515  return m_Local->GetOffDiagonalRange();
1516 }
1517 void
1519 {
1520  if (m_Local) {
1522  }
1523  // N/A for the time being
1524  //if (m_Remote) {
1525  // m_Remote->SetValue(eBlastOpt_OffDiagonalRange, w);
1526  //}
1527 }
1528 double
1530 {
1531  if (! m_Local) {
1532  x_Throwx("Error: GetXDropoff() not available.");
1533  }
1534  return m_Local->GetXDropoff();
1535 }
1536 void
1538 {
1539  if (m_Local) {
1540  m_Local->SetXDropoff(x);
1541  }
1542  if (m_Remote) {
1544  }
1545 }
1546 
1547 /******************* Gapped extension options *******************/
1548 double
1550 {
1551  if (! m_Local) {
1552  x_Throwx("Error: GetGapXDropoff() not available.");
1553  }
1554  return m_Local->GetGapXDropoff();
1555 }
1556 void
1558 {
1559  if (m_Local) {
1560  m_Local->SetGapXDropoff(x);
1561  }
1562  if (m_Remote) {
1564  }
1565 }
1566 
1567 double
1569 {
1570  if (! m_Local) {
1571  x_Throwx("Error: GetGapXDropoffFinal() not available.");
1572  }
1573  return m_Local->GetGapXDropoffFinal();
1574 }
1575 void
1577 {
1578  if (m_Local) {
1580  }
1581  if (m_Remote) {
1583  }
1584 }
1585 
1586 double
1588 {
1589  if (! m_Local) {
1590  x_Throwx("Error: GetGapTrigger() not available.");
1591  }
1592  return m_Local->GetGapTrigger();
1593 }
1594 void
1596 {
1597  if (m_Local) {
1599  }
1600  if (m_Remote) {
1602  }
1603 }
1604 
1607 {
1608  if (! m_Local) {
1609  x_Throwx("Error: GetGapExtnAlgorithm() not available.");
1610  }
1611  return m_Local->GetGapExtnAlgorithm();
1612 }
1613 void
1615 {
1616  if (m_Local) {
1618  }
1619  if (m_Remote) {
1621  }
1622 }
1623 
1626 {
1627  if (! m_Local) {
1628  x_Throwx("Error: GetGapTracebackAlgorithm() not available.");
1629  }
1631 }
1632 
1633 void
1635 {
1636  if (m_Local) {
1638  }
1639  if (m_Remote) {
1641  }
1642 }
1643 
1646 {
1647  if (! m_Local) {
1648  x_Throwx("Error: GetCompositionBasedStats() not available.");
1649  }
1651 }
1652 
1653 void
1655 {
1656  if (m_Local) {
1658  }
1659  if (m_Remote) {
1661  }
1662 }
1663 
1664 bool
1666 {
1667  if (! m_Local) {
1668  x_Throwx("Error: GetSmithWatermanMode() not available.");
1669  }
1670  return m_Local->GetSmithWatermanMode();
1671 }
1672 
1673 void
1675 {
1676  if (m_Local) {
1678  }
1679  if (m_Remote) {
1681  }
1682 }
1683 
1684 int
1686 {
1687  if (! m_Local) {
1688  x_Throwx("Error: GetUnifiedP() not available.");
1689  }
1690 
1691  return m_Local->GetUnifiedP();
1692 }
1693 
1694 void
1696 {
1697  if (m_Local) {
1698  m_Local->SetUnifiedP(u);
1699  }
1700  if (m_Remote) {
1702  }
1703 }
1704 
1705 int
1707 {
1708  if (! m_Local) {
1709  x_Throwx("Error: GetMaxMismatches() not available.");
1710  }
1711 
1712  return m_Local->GetMaxMismatches();
1713 }
1714 
1715 void
1717 {
1718  if (m_Local) {
1720  }
1721  else {
1722  x_Throwx("Error: GetMaxMismatches() not supported for remote searches");
1723  }
1724 }
1725 
1726 
1727 int
1729 {
1730  if (! m_Local) {
1731  x_Throwx("Error: GetMismatchWindow() not available.");
1732  }
1733 
1734  return m_Local->GetMismatchWindow();
1735 }
1736 
1737 void
1739 {
1740  if (m_Local) {
1742  }
1743  else {
1744  x_Throwx("Error: GetMismatchWindow() not supported for remote searches");
1745  }
1746 }
1747 
1748 
1749 bool
1751 {
1752  if (! m_Local) {
1753  x_Throwx("Error: GetChaining() not available.");
1754  }
1755 
1756  return m_Local->GetChaining();
1757 }
1758 
1759 void
1761 {
1762  if (m_Local) {
1763  m_Local->SetChaining(ch);
1764  }
1765  else {
1766  x_Throwx("Error: SetChaninig() not supported for remote searches");
1767  }
1768 }
1769 
1770 /******************* Hit saving options *************************/
1771 int
1773 {
1774  if (! m_Local) {
1775  x_Throwx("Error: GetHitlistSize() not available.");
1776  }
1777  return m_Local->GetHitlistSize();
1778 }
1779 void
1781 {
1782  if (m_Local) {
1783  m_Local->SetHitlistSize(s);
1784  }
1785  if (m_Remote) {
1787  }
1788 }
1789 
1790 int
1792 {
1793  if (! m_Local) {
1794  x_Throwx("Error: GetMaxNumHspPerSequence() not available.");
1795  }
1796  return m_Local->GetMaxNumHspPerSequence();
1797 }
1798 void
1800 {
1801  if (m_Local) {
1803  }
1804  if (m_Remote) {
1806  }
1807 }
1808 
1809 int
1811 {
1812  if (! m_Local) {
1813  x_Throwx("Error: GetMaxHspsPerSubject() not available.");
1814  }
1815  return m_Local->GetMaxHspsPerSubject();
1816 }
1817 void
1819 {
1820  if (m_Local) {
1822  }
1823  if (m_Remote) {
1825  }
1826 }
1827 
1828 int
1830 {
1831  if (! m_Local) {
1832  x_Throwx("Error: GetCullingMode() not available.");
1833  }
1834  return m_Local->GetCullingLimit();
1835 }
1836 void
1838 {
1839  if (m_Local) {
1841  }
1842  if (m_Remote) {
1844  }
1845 }
1846 
1847 bool
1849 {
1850  if (! m_Local) {
1851  x_Throwx("Error: GetSubjectBestHit() not available.");
1852  }
1853  return m_Local->GetSubjectBestHit();
1854 }
1855 void
1857 {
1858  if (m_Local) {
1860  }
1861  if (m_Remote) {
1863  }
1864 }
1865 
1866 
1867 double
1869 {
1870  if (! m_Local) {
1871  x_Throwx("Error: GetBestHitOverhangMode() not available.");
1872  }
1873  return m_Local->GetBestHitOverhang();
1874 }
1875 void
1877 {
1878  if (m_Local) {
1879  m_Local->SetBestHitOverhang(overhang);
1880  }
1881  if (m_Remote) {
1883  }
1884 }
1885 
1886 double
1888 {
1889  if (! m_Local) {
1890  x_Throwx("Error: GetBestHitScoreEdgeMode() not available.");
1891  }
1892  return m_Local->GetBestHitScoreEdge();
1893 }
1894 void
1896 {
1897  if (m_Local) {
1898  m_Local->SetBestHitScoreEdge(score_edge);
1899  }
1900  if (m_Remote) {
1902  }
1903 }
1904 
1905 double
1907 {
1908  if (! m_Local) {
1909  x_Throwx("Error: GetEvalueThreshold() not available.");
1910  }
1911  return m_Local->GetEvalueThreshold();
1912 }
1913 void
1915 {
1916  if (m_Local) {
1917  m_Local->SetEvalueThreshold(eval);
1918  }
1919  if (m_Remote) {
1921  }
1922 }
1923 
1924 int
1926 {
1927  if (! m_Local) {
1928  x_Throwx("Error: GetCutoffScore() not available.");
1929  }
1930  return m_Local->GetCutoffScore();
1931 }
1932 void
1934 {
1935  if (m_Local) {
1936  m_Local->SetCutoffScore(s);
1937  }
1938  if (m_Remote) {
1940  }
1941 }
1942 
1943 vector<double>
1945 {
1946  if (! m_Local) {
1947  x_Throwx("Error: GetCutoffScoreCoeffs() not available.");
1948  }
1949  return m_Local->GetCutoffScoreCoeffs();
1950 }
1951 void
1952 CBlastOptions::SetCutoffScoreCoeffs(const vector<double>& c)
1953 {
1954  if (!m_Local) {
1955  x_Throwx("Error: SetCutoffScoreCoeffs() not available.");
1956  }
1958 }
1959 
1960 double
1962 {
1963  if (! m_Local) {
1964  x_Throwx("Error: GetPercentIdentity() not available.");
1965  }
1966  return m_Local->GetPercentIdentity();
1967 }
1968 void
1970 {
1971  if (m_Local) {
1973  }
1974  if (m_Remote) {
1976  }
1977 }
1978 
1979 int
1981 {
1982  if (! m_Local) {
1983  x_Throwx("Error: GetMaxEditDistance() not available.");
1984  }
1985  return m_Local->GetMaxEditDistance();
1986 }
1987 void
1989 {
1990  if (m_Local) {
1992  }
1993  if (m_Remote) {
1994  x_Throwx("Error: SetMaxEditDistance() not available.");
1995  }
1996 }
1997 
1998 double
2000 {
2001  if (! m_Local) {
2002  x_Throwx("Error: GetQueryCovHspPerc() not available.");
2003  }
2004  return m_Local->GetQueryCovHspPerc();
2005 }
2006 void
2008 {
2009  if (m_Local) {
2011  }
2012  if (m_Remote) {
2014  }
2015 }
2016 
2017 
2018 int
2020 {
2021  if (! m_Local) {
2022  x_Throwx("Error: GetMinDiagSeparation() not available.");
2023  }
2024  return m_Local->GetMinDiagSeparation();
2025 }
2026 void
2028 {
2029  if (! m_Local) {
2030  x_Throwx("Error: SetMinDiagSeparation() not available.");
2031  }
2033 }
2034 
2035 bool
2037 {
2038  if (! m_Local) {
2039  x_Throwx("Error: GetSumStatisticsMode() not available.");
2040  }
2041  return m_Local->GetSumStatisticsMode();
2042 }
2043 void
2045 {
2046  if (m_Local) {
2048  }
2049  if (m_Remote) {
2051  }
2052 }
2053 
2054 int
2056 {
2057  if (! m_Local) {
2058  x_Throwx("Error: GetLongestIntronLength() not available.");
2059  }
2060  return m_Local->GetLongestIntronLength();
2061 }
2062 void
2064 {
2065  if (m_Local) {
2067  }
2068  if (m_Remote) {
2070  }
2071 }
2072 
2073 
2074 bool
2076 {
2077  if (! m_Local) {
2078  x_Throwx("Error: GetGappedMode() not available.");
2079  }
2080  return m_Local->GetGappedMode();
2081 }
2082 void
2084 {
2085  if (m_Local) {
2086  m_Local->SetGappedMode(m);
2087  }
2088  if (m_Remote) {
2090  }
2091 }
2092 
2093 // -RMH-
2094 int
2096 {
2097  if (! m_Local) {
2098  x_Throwx("Error: GetMaskLevel() not available.");
2099  }
2100  return m_Local->GetMaskLevel();
2101 }
2102 
2103 // -RMH-
2104 void
2106 {
2107  if (m_Local) {
2108  m_Local->SetMaskLevel(s);
2109  }
2110  if (m_Remote) {
2112  }
2113 }
2114 
2115 // -RMH-
2116 bool
2118 {
2119  if (! m_Local) {
2120  x_Throwx("Error: GetComplexityAdjMode() not available.");
2121  }
2122  return m_Local->GetComplexityAdjMode();
2123 }
2124 
2125 // -RMH-
2126 void
2128 {
2129  if (m_Local) {
2131  }
2132  if (m_Remote) {
2134  }
2135 }
2136 
2137 double
2139 {
2140  if (! m_Local) {
2141  x_Throwx("Error: GetLowScorePerc() not available.");
2142  }
2143  return m_Local->GetLowScorePerc();
2144 }
2145 
2146 void
2148 {
2149  if (m_Local)
2151 }
2152 
2153 
2154 bool
2156 {
2157  if (! m_Local) {
2158  x_Throwx("Error: GetPaired() not available.");
2159  }
2160  return m_Local->GetPaired();
2161 }
2162 
2163 void
2165 {
2166  if (m_Local) {
2167  m_Local->SetPaired(p);
2168  }
2169  else {
2170  x_Throwx("Error: SetPaired() not available.");
2171  }
2172 }
2173 
2174 
2175 bool
2177 {
2178  if (! m_Local) {
2179  x_Throwx("Error: GetSplice() not available.");
2180  }
2181  return m_Local->GetSplice();
2182 }
2183 
2184 void
2186 {
2187  if (m_Local) {
2188  m_Local->SetSplice(s);
2189  }
2190  else {
2191  x_Throwx("Error: SetSplice() not available.");
2192  }
2193 }
2194 
2195 
2196 /************************ Scoring options ************************/
2197 const char*
2199 {
2200  if (! m_Local) {
2201  x_Throwx("Error: GetMatrixName() not available.");
2202  }
2203  return m_Local->GetMatrixName();
2204 }
2205 void
2206 CBlastOptions::SetMatrixName(const char* matrix)
2207 {
2208  if (m_Local) {
2209  m_Local->SetMatrixName(matrix);
2210  }
2211  if (m_Remote) {
2213  }
2214 }
2215 
2216 int
2218 {
2219  if (! m_Local) {
2220  x_Throwx("Error: GetMatchReward() not available.");
2221  }
2222  return m_Local->GetMatchReward();
2223 }
2224 void
2226 {
2227  if (m_Local) {
2229  }
2230  if (m_Remote) {
2232  }
2233 }
2234 
2235 int
2237 {
2238  if (! m_Local) {
2239  x_Throwx("Error: GetMismatchPenalty() not available.");
2240  }
2241  return m_Local->GetMismatchPenalty();
2242 }
2243 void
2245 {
2246  if (m_Local) {
2248  }
2249  if (m_Remote) {
2251  }
2252 }
2253 
2254 int
2256 {
2257  if (! m_Local) {
2258  x_Throwx("Error: GetGapOpeningCost() not available.");
2259  }
2260  return m_Local->GetGapOpeningCost();
2261 }
2262 void
2264 {
2265  if (m_Local) {
2267  }
2268  if (m_Remote) {
2270  }
2271 }
2272 
2273 int
2275 {
2276  if (! m_Local) {
2277  x_Throwx("Error: GetGapExtensionCost() not available.");
2278  }
2279  return m_Local->GetGapExtensionCost();
2280 }
2281 void
2283 {
2284  if (m_Local) {
2286  }
2287  if (m_Remote) {
2289  }
2290 }
2291 
2292 int
2294 {
2295  if (! m_Local) {
2296  x_Throwx("Error: GetFrameShiftPenalty() not available.");
2297  }
2298  return m_Local->GetFrameShiftPenalty();
2299 }
2300 void
2302 {
2303  if (m_Local) {
2305  }
2306  if (m_Remote) {
2308  }
2309 }
2310 
2311 bool
2313 {
2314  if (! m_Local) {
2315  x_Throwx("Error: GetOutOfFrameMode() not available.");
2316  }
2317  return m_Local->GetOutOfFrameMode();
2318 }
2319 void
2321 {
2322  if (m_Local) {
2324  }
2325  if (m_Remote) {
2327  }
2328 }
2329 
2330 /******************** Effective Length options *******************/
2331 Int8
2333 {
2334  if (! m_Local) {
2335  x_Throwx("Error: GetDbLength() not available.");
2336  }
2337  return m_Local->GetDbLength();
2338 }
2339 void
2341 {
2342  if (m_Local) {
2343  m_Local->SetDbLength(l);
2344  }
2345  if (m_Remote) {
2347  }
2348 }
2349 
2350 unsigned int
2352 {
2353  if (! m_Local) {
2354  x_Throwx("Error: GetDbSeqNum() not available.");
2355  }
2356  return m_Local->GetDbSeqNum();
2357 }
2358 void
2360 {
2361  if (m_Local) {
2362  m_Local->SetDbSeqNum(n);
2363  }
2364  if (m_Remote) {
2366  }
2367 }
2368 
2369 Int8
2371 {
2372  if (! m_Local) {
2373  x_Throwx("Error: GetEffectiveSearchSpace() not available.");
2374  }
2375  return m_Local->GetEffectiveSearchSpace();
2376 }
2377 void
2379 {
2380  if (m_Local) {
2382  }
2383  if (m_Remote) {
2385  }
2386 }
2387 void
2389 {
2390  if (m_Local) {
2392  }
2393  if (m_Remote) {
2394  _ASSERT( !eff.empty() );
2395  // This is the best we can do because remote BLAST only accepts one
2396  // value for the effective search space
2398  }
2399 }
2400 
2401 int
2403 {
2404  if (! m_Local) {
2405  x_Throwx("Error: GetDbGeneticCode() not available.");
2406  }
2407  return m_Local->GetDbGeneticCode();
2408 }
2409 
2410 void
2412 {
2413  if (m_Local) {
2416  }
2417  if (m_Remote) {
2419  }
2420 }
2421 
2422 const char*
2424 {
2425  if (! m_Local) {
2426  x_Throwx("Error: GetPHIPattern() not available.");
2427  }
2428  return m_Local->GetPHIPattern();
2429 }
2430 void
2431 CBlastOptions::SetPHIPattern(const char* pattern, bool is_dna)
2432 {
2433  if (m_Local) {
2434  m_Local->SetPHIPattern(pattern, is_dna);
2435  }
2436  if (m_Remote) {
2438 
2439 // For now I will assume this is handled when the data is passed to the
2440 // code in blast4_options - i.e. that code will discriminate on the basis
2441 // of the type of *OptionHandle that is passed in.
2442 //
2443 // if (is_dna) {
2444 // m_Remote->SetProgram("blastn");
2445 // } else {
2446 // m_Remote->SetProgram("blastp");
2447 // }
2448 //
2449 // m_Remote->SetService("phi");
2450  }
2451 }
2452 
2453 /******************** PSIBlast options *******************/
2454 double
2456 {
2457  if (! m_Local) {
2458  x_Throwx("Error: GetInclusionThreshold() not available.");
2459  }
2460  return m_Local->GetInclusionThreshold();
2461 }
2462 void
2464 {
2465  if (m_Local) {
2467  }
2468  if (m_Remote) {
2470  }
2471 }
2472 
2473 int
2475 {
2476  if (! m_Local) {
2477  x_Throwx("Error: GetPseudoCount() not available.");
2478  }
2479  return m_Local->GetPseudoCount();
2480 }
2481 void
2483 {
2484  if (m_Local) {
2485  m_Local->SetPseudoCount(u);
2486  }
2487  if (m_Remote) {
2489  }
2490 }
2491 
2492 bool
2494 {
2495  if (! m_Local) {
2496  x_Throwx("Error: GetIgnoreMsaMaster() not available.");
2497  }
2498  return m_Local->GetIgnoreMsaMaster();
2499 }
2500 void
2502 {
2503  if (m_Local) {
2505  }
2506  if (m_Remote) {
2508  }
2509 }
2510 
2511 /******************** DELTA-Blast options *******************/
2512 double
2514 {
2515  if (! m_Local) {
2516  x_Throwx("Error: GetDomainInclusionThreshold() not available.");
2517  }
2519 }
2520 
2521 void
2523 {
2524  if (m_Local) {
2526  }
2527  if (m_Remote) {
2529  }
2530 }
2531 
2532 /// Allows to dump a snapshot of the object
2533 void
2535 {
2536  if (m_Local) {
2537  m_Local->DebugDump(ddc, depth);
2538  }
2539 }
2540 
2541 void
2543 {
2544  if (m_Remote) {
2545  m_Remote->SetDefaultsMode(false);
2546  }
2547 }
2548 
2549 // typedef ncbi::objects::CBlast4_queue_search_request TBlast4Req;
2550 // CRef<TBlast4Req> GetBlast4Request() const
2551 // {
2552 // CRef<TBlast4Req> result;
2553 
2554 // if (m_Remote) {
2555 // result = m_Remote->GetBlast4Request();
2556 // }
2557 
2558 // return result;
2559 // }
2560 
2561 // the "new paradigm"
2564 {
2565  TBlast4Opts * result = 0;
2566 
2567  if (m_Remote) {
2569  }
2570 
2571  return result;
2572 }
2573 
2575 {
2576  if (! m_Local) {
2577  x_Throwx("Error: GetUseIndex() not available.");
2578  }
2579 
2580  return m_Local->GetUseIndex();
2581 }
2582 
2584 {
2585  if (! m_Local) {
2586  x_Throwx("Error: GetForceIndex() not available.");
2587  }
2588 
2589  return m_Local->GetForceIndex();
2590 }
2591 
2593 {
2594  if (! m_Local) {
2595  x_Throwx("Error: GetIsOldStyleMBIndex() not available.");
2596  }
2597 
2598  return m_Local->GetIsOldStyleMBIndex();
2599 }
2600 
2602 {
2603  if (! m_Local) {
2604  x_Throwx("Error: GetMBIndexLoaded() not available.");
2605  }
2606 
2607  return m_Local->GetMBIndexLoaded();
2608 }
2609 
2610 const string CBlastOptions::GetIndexName() const
2611 {
2612  if (! m_Local) {
2613  x_Throwx("Error: GetIndexName() not available.");
2614  }
2615 
2616  return m_Local->GetIndexName();
2617 }
2618 
2620  bool use_index, const string & index_name,
2621  bool force_index, bool old_style_index )
2622 {
2623  if (m_Local) {
2624  m_Local->SetUseIndex(
2625  use_index, index_name, force_index, old_style_index );
2626  }
2627  if (m_Remote) {
2628  m_Remote->SetValue(eBlastOpt_ForceMbIndex, force_index);
2629  if ( !index_name.empty() ) {
2630  m_Remote->SetValue(eBlastOpt_MbIndexName, index_name.c_str());
2631  }
2632  }
2633 
2634 }
2635 
2636 void CBlastOptions::SetMBIndexLoaded( bool index_loaded )
2637 {
2638  if (! m_Local) {
2639  x_Throwx("Error: SetMBIndexLoaded() not available.");
2640  }
2641 
2642  m_Local->SetMBIndexLoaded( index_loaded );
2643 }
2644 
2647 {
2648  return m_Local ? m_Local->GetQueryOpts() : 0;
2649 }
2650 
2653 {
2654  return m_Local ? m_Local->GetLutOpts() : 0;
2655 }
2656 
2659 {
2660  return m_Local ? m_Local->GetInitWordOpts() : 0;
2661 }
2662 
2665 {
2666  return m_Local ? m_Local->GetExtnOpts() : 0;
2667 }
2668 
2671 {
2672  return m_Local ? m_Local->GetHitSaveOpts() : 0;
2673 }
2674 
2675 PSIBlastOptions *
2677 {
2678  return m_Local ? m_Local->GetPSIBlastOpts() : 0;
2679 }
2680 
2683 {
2684  return m_Local ? m_Local->GetDbOpts() : 0;
2685 }
2686 
2689 {
2690  return m_Local ? m_Local->GetScoringOpts() : 0;
2691 }
2692 
2695 {
2696  return m_Local ? m_Local->GetEffLenOpts() : 0;
2697 }
2698 
2699 void
2700 CBlastOptions::x_Throwx(const string& msg) const
2701 {
2702  NCBI_THROW(CBlastException, eInvalidOptions, msg);
2703 }
2704 
2706 {
2707  if (m_Remote) {
2708  m_Remote->SetDefaultsMode(dmode);
2709  }
2710 }
2711 
2713 {
2714  if (m_Remote) {
2715  return m_Remote->GetDefaultsMode();
2716  }
2717  else
2718  return false;
2719 }
2720 
2722 {
2723  if (&opts != this)
2724  {
2725  // Clean up the old object
2726  if (m_Local)
2727  {
2728  delete m_Local;
2729  m_Local = 0;
2730  }
2731  if (m_Remote)
2732  {
2733  delete m_Remote;
2734  m_Remote = 0;
2735  }
2736 
2737  // Copy the contents of the new object
2738  if (opts.m_Remote)
2739  {
2740  m_Remote = new CBlastOptionsRemote(*opts.m_Remote);
2741  }
2742  if (opts.m_Local)
2743  {
2744  m_Local = new CBlastOptionsLocal(*opts.m_Local);
2745  }
2749  }
2750 }
2751 
2752 #endif /* SKIP_DOXYGEN_PROCESSING */
2753 
2754 END_SCOPE(blast)
2756 
2757 /* @} */
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
Ungapped extension structures that are common to nucleotide and protein extension routines.
Classes that capture the state of the BLAST options (or subsets of options) and restore them later (u...
EBlastPrelimGapExt
The algorithm to be used for preliminary gapped extensions.
EBlastTbackExt
The algorithm to be used for final gapped extensions with traceback.
ELookupTableType
Types of the lookup table.
Declares class to encapsulate all BLAST options.
Private header for local representation of BLAST options.
ESeedContainerType
specifies the data structures used for bookkeeping during computation of ungapped extensions
Boolean Blast_QueryIsTranslated(EBlastProgramType p)
Returns true if the query is translated.
Definition: blast_program.c:60
Boolean Blast_QueryIsNucleotide(EBlastProgramType p)
Returns true if the query is nucleotide.
Definition: blast_program.c:43
Boolean Blast_QueryIsProtein(EBlastProgramType p)
Returns true if the query is protein.
Definition: blast_program.c:40
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Definition: blast_program.h:72
Internal auxiliary setup classes/functions for C++ BLAST APIs.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
Definition: blast_types.hpp:56
@ ePSIBlast
PSI Blast.
Definition: blast_types.hpp:67
@ eDeltaBlast
Delta Blast.
Definition: blast_types.hpp:71
@ ePSITblastn
PSI Tblastn.
Definition: blast_types.hpp:68
Field properties for options in a Blast4 parameter list.
Definition: names.hpp:166
static const string & GetName(EBlastOptIdx opt)
Definition: names.cpp:352
static CBlast4Field & Get(EBlastOptIdx opt)
Definition: names.cpp:45
Defines BLAST error codes (user errors included)
Encapsulates all blast input parameters.
Class that allows the transfer of data structures from the CBlastOptionsLocal class to either the BLA...
Encapsulates all blast input parameters.
Encapsulates ALL the BLAST algorithm's options.
ncbi::objects::CBlast4_parameters TBlast4Opts
This returns a list of parameters for remote searches.
CBlastOptionsLocal * m_Local
bool m_DefaultsMode
Defaults mode (remote options will ignore Set ops).
CAutomaticGenCodeSingleton m_GenCodeSingletonVar
This field is add.
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
@ eLocal
To be used for running BLAST locally.
@ eRemote
To be used when running BLAST remotely.
string m_ServiceName
Service Name for Blast3.
string m_ProgramName
Program Name for Blast3.
CBlastOptionsRemote * m_Remote
CObject –.
Definition: ncbiobj.hpp:180
ECompoAdjustModes
An collection of constants that specify all permissible modes of composition adjustment.
@ eNumCompoAdjustModes
static unsigned char depth[2 *(256+1+29)+1]
#define T(s)
Definition: common.h:230
#define false
Definition: bool.h:36
static FILE * f
Definition: readconf.c:23
vector< double > GetCutoffScoreCoeffs() const
void SetPHIPattern(const char *pattern, bool is_dna)
BlastHitSavingOptions * GetHitSaveOpts() const
Returns BlastHitSavingOptions for eLocal objects, NULL for eRemote.
int GetUnifiedP() const
void SetMBTemplateType(unsigned char type)
CBlastOptions(EAPILocality locality=eLocal)
Constructor which allows specification of local or remote version of the options (might change in the...
int GetDbGeneticCode() const
void SetValue(EBlastOptIdx opt, const unsigned char &x)
double GetSegFilteringLocut() const
void SetInclusionThreshold(double u)
void SetCompositionBasedStats(ECompoAdjustModes mode)
void DebugDump(CDebugDumpContext ddc, unsigned int depth) const
Allows to dump a snapshot of the object.
void x_SetOneParam(CBlast4Field &field, const Int8 *x)
BlastScoringOptions * GetScoringOpts() const
void SetPHIPattern(const char *pattern, bool is_dna)
int GetWindowMaskerTaxId() const
Returns the tax id used for the windowmasker database to use, if set via SetWindowMaskerTaxId (otherw...
LookupTableOptions * GetLutOpts() const
Returns LookupTableOptions for eLocal objects, NULL for eRemote.
BlastExtensionOptions * GetExtnOpts() const
int GetMaxHspsPerSubject() const
void SetStrandOption(objects::ENa_strand s)
void x_Throwx(const string &msg) const
void SetOutOfFrameMode(bool m=true)
void SetLookupDbFilter(bool val)
CRef< objects::CBlast4_parameters > m_ReqOpts
void SetPseudoCount(int u)
void SetWindowSize(int w)
bool GetReadQualityFiltering(void) const
double GetEvalueThreshold() const
Uint4 GetLookupTableStride() const
Skip words after each collected one while creating a lookup table (currently only for megablast)
double GetLowScorePerc() const
Sets low score percentages.
int GetDustFilteringLevel() const
unsigned char GetMBTemplateType() const
unsigned char GetMBTemplateType() const
const CBlastOptionsMemento * CreateSnapshot() const
Create a snapshot of the state of this object for internal use of its data structures (BLAST C++ APIs...
void SetGapExtnAlgorithm(EBlastPrelimGapExt a)
EBlastPrelimGapExt GetGapExtnAlgorithm() const
EAPILocality GetLocality() const
Return the locality used when the object was created.
EProgram GetProgram() const
Accessors/Mutators for individual options.
void SetEvalueThreshold(double eval)
void SetWindowMaskerTaxId(int taxid)
Sets the tax id to select an appropriate windowmasker database Conversion algorithm from tax id to da...
ECompoAdjustModes GetCompositionBasedStats() const
int GetFrameShiftPenalty() const
void SetQueryCovHspPerc(double p)
const char * GetPHIPattern() const
void SetOutOfFrameMode(bool m=true)
const char * GetMatrixName() const
void SetReadMaxFractionAmbiguous(double val)
Set maximum fraction of ambiguous bases for next-generation read quality filtering.
void SetRepeatFiltering(bool val=true)
void SetDomainInclusionThreshold(double th)
void SetValue(EBlastOptIdx opt, const EProgram &x)
PSIBlastOptions * GetPSIBlastOpts() const
void SetDustFilteringLinker(int m)
bool operator==(const CBlastOptions &rhs) const
BlastHitSavingOptions * GetHitSaveOpts() const
BlastExtensionOptions * GetExtnOpts() const
Returns BlastExtensionOptions for eLocal objects, NULL for eRemote.
int GetMaxEditDistance() const
const string GetIndexName() const
void SetPaired(bool p)
Uint1 GetMaxDbWordCount(void) const
void SetEvalueThreshold(double eval)
const char * GetPHIPattern() const
void SetSegFilteringHicut(double m)
void SetGapOpeningCost(int g)
BlastInitialWordOptions * GetInitWordOpts() const
Returns BlastInitialWordOptions for eLocal objects, NULL for eRemote.
EBlastTbackExt GetGapTracebackAlgorithm() const
void SetHitlistSize(int s)
void SetQueryGeneticCode(int gc)
double GetDomainInclusionThreshold(void) const
void SetDustFiltering(bool val=true)
double GetBestHitOverhang() const
ELookupTableType GetLookupTableType() const
objects::ENa_strand GetStrandOption() const
void SetReadMaxFractionAmbiguous(double val)
void x_SetOneParam(CBlast4Field &field, const int *x)
void SetEffectiveSearchSpace(Int8 eff)
int GetMinDiagSeparation() const
void SetComplexityAdjMode(bool m=true)
void SetBestHitScoreEdge(double score_edge)
int GetOffDiagonalRange() const
vector< double > GetCutoffScoreCoeffs() const
double GetDomainInclusionThreshold() const
void SetFrameShiftPenalty(int p)
bool GetGappedMode() const
Returns true if gapped BLAST is set, false otherwise.
void SetReadQualityFiltering(bool val=true)
Turn on/off next-generation read quality filtering with deafult parameters.
void ResetValue(CBlast4Field &opt)
Remove any objects matching this Blast4 field object.
void SetRepeatFilteringDB(const char *db)
Sets the repeat filtering database to use.
void SetGapTracebackAlgorithm(EBlastTbackExt a)
int GetCutoffScore() const
QuerySetUpOptions * GetQueryOpts() const
void SetWindowMaskerDatabase(const char *db)
Sets the windowmasker database to use.
void SetIgnoreMsaMaster(bool val)
int GetHitlistSize() const
void SetWordThreshold(double w)
Sets WordThreshold.
double GetQueryCovHspPerc() const
bool GetLookupDbFilter(void) const
void SetDbSeqNum(unsigned int n)
void SetRepeatFilteringDB(const char *db)
void SetGapExtensionCost(int e)
bool GetSpliceAlignments() const
Splice HSPs for each query (for mappring RNA-Seq reads to a genome)
int GetMismatchWindow() const
void SetSumStatisticsMode(bool m=true)
void SetUnifiedP(int u=0)
bool GetLookupDbFilter(void) const
void SetLowScorePerc(double p=0.0)
void SetProgram(EProgram p)
Sets the task this object is best suited for.
void SetGapExtnAlgorithm(EBlastPrelimGapExt a)
BlastDatabaseOptions * GetDbOpts() const
void SetUseIndex(bool use_index=true, const string &index_name="", bool force_index=false, bool old_style_index=false)
void SetDustFilteringWindow(int m)
bool IsIterativeSearch() const
void x_AttachValue(CRef< objects::CBlast4_parameter > p)
void SetMBIndexLoaded(bool index_loaded=true)
void SetCutoffScoreCoeffs(const vector< double > &c)
int GetGapExtensionCost() const
void SetMismatchPenalty(int p)
bool GetSumStatisticsMode() const
Sum statistics options.
void SetCutoffScoreCoeffs(const vector< double > &c)
void SetOffDiagonalRange(int r)
void SetReadQualityFiltering(bool val=true)
void SetGapXDropoffFinal(double x)
void SetValue(EBlastOptIdx opt, const short &x)
void SetMatrixName(const char *matrix)
bool GetComplexityAdjMode() const
Returns true if cross_match-like complexity adjusted.
void SetDbLength(Int8 l)
BlastEffectiveLengthsOptions * GetEffLenOpts() const
Returns BlastEffectiveLengthsOptions for eLocal objects, NULL for eRemote.
void SetMaskAtHash(bool val=true)
void SetUseIndex(bool use_index=true, const string &index_name="", bool force_index=false, bool old_style_index=false)
void SetValue(EBlastOptIdx opt, const unsigned int &x)
const string GetIndexName() const
EBlastProgramType GetProgramType() const
Returns the CORE BLAST notion of program type.
void x_Throwx(const string &msg) const
Auxiliary to throw CBlastExceptions.
double GetSegFilteringHicut() const
bool GetDefaultsMode() const
int GetPseudoCount() const
void SetLowScorePerc(double p=0.0)
void SetMaskLevel(int s)
BlastInitialWordOptions * GetInitWordOpts() const
bool Validate() const
Validate the options.
bool GetDustFiltering() const
void SetMBTemplateLength(unsigned char len)
int GetLongestIntronLength() const
for linking HSPs with uneven gaps
void SetBestHitOverhang(double overhang)
bool GetComplexityAdjMode() const
Returns true if cross_match-like complexity adjusted.
void SetSpliceAlignments(bool s)
void SetGapXDropoff(double x)
bool GetOutOfFrameMode() const
void SetWordSize(int ws)
void SetSumStatisticsMode(bool m=true)
int GetMaxNumHspPerSequence() const
void SetLookupTableStride(Uint4 val)
EProgram GetProgram() const
Accessors/Mutators for individual options.
Int8 GetDbLength() const
void SetPercentIdentity(double p)
bool GetMaskAtHash() const
LookupTableOptions * GetLutOpts() const
CRef< CBlastOptions > Clone() const
Explicit deep copy of the Blast options object.
const char * GetWindowMaskerDatabase() const
int GetQueryGeneticCode() const
void DebugDump(CDebugDumpContext ddc, unsigned int depth) const
Allows to dump a snapshot of the object.
int GetReadMinDimerEntropy(void) const
int GetMaskLevel() const
Masklevel filtering option -RMH-.
bool GetSplice() const
Splice HSPs for each query.
void x_DoDeepCopy(const CBlastOptions &opts)
Perform a "deep copy" of Blast options.
unsigned int GetDbSeqNum() const
void SetSegFilteringLocut(double m)
char * GetFilterString() const
Return the filtering string used.
void SetFilterString(const char *f, bool clear=true)
unsigned int GetDbSeqNum() const
double GetWordThreshold() const
Returns WordThreshold.
BlastScoringOptions * GetScoringOpts() const
Returns BlastScoringOptions for eLocal objects, NULL for eRemote.
void SetMinDiagSeparation(int d)
CBlastOptionsRemote & operator=(const CBlastOptionsRemote &optsRemote)
Assignment operator.
int GetMismatchPenalty() const
EBlastPrelimGapExt GetGapExtnAlgorithm() const
void SetFilterString(const char *f)
bool GetSumStatisticsMode() const
Sum statistics options.
bool operator!=(const CBlastOptions &rhs) const
void SetValue(EBlastOptIdx opt, const objects::ENa_strand &x)
void x_SetParam(CBlast4Field &name, T &value)
bool Validate() const
Validate the options.
int GetMaxMismatches() const
void SetLookupTableType(ELookupTableType type)
EBlastTbackExt GetGapTracebackAlgorithm() const
bool GetForceIndex() const
void SetReadMinDimerEntropy(int val)
Set minimum dimer entropy for next-generation read quality filtering.
QuerySetUpOptions * GetQueryOpts() const
Returns QuerySetUpOptions for eLocal objects, NULL for eRemote.
int GetSegFilteringWindow() const
void SetMBTemplateType(unsigned char type)
double GetInclusionThreshold() const
double GetXDropoff() const
bool GetSmithWatermanMode() const
int GetMatchReward() const
void SetGapTrigger(double g)
CBlastOptionsRemote(const CBlastOptionsRemote &optsRemote)
Copy constructor.
void SetComplexityAdjMode(bool m=true)
void SetDefaultsMode(bool dmode)
If this is true, remote options will ignore "Set" calls.
void SetDbGeneticCode(int gc)
void SetGapTracebackAlgorithm(EBlastTbackExt a)
ECompoAdjustModes GetCompositionBasedStats() const
double GetLowScorePerc() const
Sets a low score to drop ungapped alignments if hit list is full.
int GetDustFilteringLinker() const
void x_SetOneParam(CBlast4Field &field, CRef< objects::CBlast4_cutoff > *x)
unsigned char GetMBTemplateLength() const
Megablast only lookup table options.
void SetMBTemplateLength(unsigned char len)
double GetGapTrigger() const
double GetGapXDropoffFinal() const
bool GetIgnoreMsaMaster() const
vector< CConstRef< objects::CSeq_loc > > TSeqLocVector
void SetXDropoff(double x)
BlastDatabaseOptions * GetDbOpts() const
Returns BlastDatabaseOptions for eLocal objects, NULL for eRemote.
void SetChaining(bool ch)
bool GetMBIndexLoaded() const
void SetSegFiltering(bool val=true)
int GetReadMinDimerEntropy() const
Get minimum dimer entropy for next-generation read quality filtering.
PSIBlastOptions * GetPSIBlastOpts() const
Returns PSIBlastOptions for eLocal objects, NULL for eRemote.
const char * GetWindowMaskerDatabase() const
Return the name of the windowmasker database to use.
void x_SetOneParam(CBlast4Field &field, const char **x)
ELookupTableType GetLookupTableType() const
unsigned char GetMBTemplateLength() const
Megablast only lookup table options.
void SetMaskAtHash(bool val=true)
objects::ENa_strand GetStrandOption() const
double GetGapXDropoff() const
~CBlastOptions()
Destructor.
void x_SetOneParam(CBlast4Field &field, objects::EBlast4_strand_type *x)
bool GetRepeatFiltering() const
Returns true if repeat filtering is on.
void SetBestHitScoreEdge(double score_edge)
bool GetSegFiltering() const
void SetDefaultsMode(bool dmode)
void SetDustFilteringLevel(int m)
int GetGapOpeningCost() const
void SetDustFiltering(bool val=true)
void SetSegFiltering(bool val=true)
void SetSegFilteringWindow(int m)
bool GetReadQualityFiltering() const
Returns true if next-generation read quality filtering is turned on.
bool GetPaired() const
ncbi::objects::CBlast4_parameters TBlast4Opts
void x_SetOneParam(CBlast4Field &field, const bool *x)
void x_SetOneParam(CBlast4Field &field, const double *x)
int GetWindowSize() const
void SetCompositionBasedStats(ECompoAdjustModes mode)
bool GetChaining() const
int GetCullingLimit() const
TBlast4Opts * GetBlast4AlgoOpts()
void SetMBIndexLoaded(bool index_loaded=true)
void SetCutoffScore(int s)
void SetMaxMismatches(int m)
const char * GetRepeatFilteringDB() const
const char * GetRepeatFilteringDB() const
Returns the name of the repeat filtering database to use.
void SetWindowMaskerTaxId(int taxid)
double GetBestHitScoreEdge() const
void SetSmithWatermanMode(bool m=true)
bool GetUseIndex() const
void SetMaxDbWordCount(Uint1 num)
Set maximum word count for lookup table word masking by database frequency.
void SetGappedMode(bool m=true)
Int8 GetEffectiveSearchSpace() const
TBlast4Opts * GetBlast4AlgoOpts()
void DoneDefaults() const
const char * GetMatrixName() const
EBlastProgramType GetProgramType() const
int GetDustFilteringWindow() const
void AddGeneticCode(int genetic_code)
Add the genetic code to the genetic code singleton.
Definition: blast_aux.cpp:653
void SetLongestIntronLength(int l)
for linking HSPs with uneven gaps
int GetMaskLevel() const
Masklevel filtering option -RMH-.
bool GetIsOldStyleMBIndex() const
double GetReadMaxFractionAmbiguous() const
Get maximum fraction of ambiguous bases for next-generation read quality filtering.
void SetMaxEditDistance(int e)
void x_ResetValue(CBlast4Field &f)
Remove values for a given Blast4 field.
void SetDomainInclusionThreshold(double incthr)
void SetDbSeqNum(unsigned int n)
void SetLookupTableStride(Uint4 val)
double GetPercentIdentity() const
void SetMaxHspsPerSubject(int m)
void SetSmithWatermanMode(bool m=true)
void SetInclusionThreshold(double incthr)
void SetStrandOption(objects::ENa_strand s)
int GetWordSize() const
void SetMismatchWindow(int w)
void SetCullingLimit(int s)
bool GetSubjectBestHit() const
Uint1 GetMaxDbWordCount(void) const
Get maximum word count for lookup table word masking by database frequency.
void SetLookupTableType(ELookupTableType type)
void SetWindowMaskerDatabase(const char *db)
Uint4 GetLookupTableStride() const
void SetRepeatFiltering(bool val=true)
Turns on repeat filtering using the default repeat database, namely kDefaultRepeatFilterDb.
bool GetGappedMode() const
Returns true if gapped BLAST is set, false otherwise.
void SetMatrixName(const char *matrix)
void SetMaxNumHspPerSequence(int m)
double GetReadMaxFractionAmbiguous(void) const
void x_DoDeepCopy(const CBlastOptionsRemote &optsRemote)
Perform a "deep copy" of remote Blast options.
void SetMatchReward(int r)
BlastEffectiveLengthsOptions * GetEffLenOpts() const
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
#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
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
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
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
Definition: ncbistr.cpp:219
EBlast4_strand_type
Access to EBlast4_strand_type's attributes (values, names) as defined in spec.
@ eBlast4_strand_type_reverse_strand
@ eBlast4_strand_type_forward_strand
@ eBlast4_strand_type_both_strands
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n th
yy_size_t n
int len
Names used in blast4 network communications.
EBlastOptIdx
Index of remote BLAST options.
Definition: names.hpp:57
@ eBlastOpt_WordThreshold
Definition: names.hpp:59
@ eBlastOpt_ComplexityAdjMode
Definition: names.hpp:98
@ eBlastOpt_MismatchPenalty
Definition: names.hpp:103
@ eBlastOpt_MaskLevel
Definition: names.hpp:99
@ eBlastOpt_CompositionBasedStats
Definition: names.hpp:116
@ eBlastOpt_SubjectBestHit
Definition: names.hpp:129
@ eBlastOpt_LookupTableType
Definition: names.hpp:60
@ eBlastOpt_QueryGeneticCode
Definition: names.hpp:78
@ eBlastOpt_DbLength
Definition: names.hpp:108
@ eBlastOpt_Program
Definition: names.hpp:58
@ eBlastOpt_WordSize
Definition: names.hpp:61
@ eBlastOpt_SegFilteringHicut
Definition: names.hpp:74
@ eBlastOpt_HitlistSize
Definition: names.hpp:87
@ eBlastOpt_FilterString
Definition: names.hpp:65
@ eBlastOpt_StrandOption
Definition: names.hpp:77
@ eBlastOpt_QueryCovHspPerc
Definition: names.hpp:94
@ eBlastOpt_GapXDropoffFinal
Definition: names.hpp:84
@ eBlastOpt_DustFilteringLevel
Definition: names.hpp:68
@ eBlastOpt_OutOfFrameMode
Definition: names.hpp:107
@ eBlastOpt_MBTemplateLength
Definition: names.hpp:63
@ eBlastOpt_BestHitOverhang
Definition: names.hpp:124
@ eBlastOpt_CullingLimit
Definition: names.hpp:90
@ eBlastOpt_XDropoff
Definition: names.hpp:82
@ eBlastOpt_PercentIdentity
Definition: names.hpp:93
@ eBlastOpt_SegFilteringWindow
Definition: names.hpp:72
@ eBlastOpt_IgnoreMsaMaster
Definition: names.hpp:125
@ eBlastOpt_WindowMaskerTaxId
Definition: names.hpp:120
@ eBlastOpt_GapExtensionCost
Definition: names.hpp:105
@ eBlastOpt_GapOpeningCost
Definition: names.hpp:104
@ eBlastOpt_WindowSize
Definition: names.hpp:79
@ eBlastOpt_MatchReward
Definition: names.hpp:102
@ eBlastOpt_MaskAtHash
Definition: names.hpp:66
@ eBlastOpt_MaxHspsPerSubject
Definition: names.hpp:89
@ eBlastOpt_SmithWatermanMode
Definition: names.hpp:117
@ eBlastOpt_SegFiltering
Definition: names.hpp:71
@ eBlastOpt_GapExtnAlgorithm
Definition: names.hpp:86
@ eBlastOpt_EvalueThreshold
Definition: names.hpp:91
@ eBlastOpt_RepeatFilteringDB
Definition: names.hpp:76
@ eBlastOpt_MatrixName
Definition: names.hpp:100
@ eBlastOpt_DomainInclusionThreshold
Definition: names.hpp:126
@ eBlastOpt_BestHitScoreEdge
Definition: names.hpp:123
@ eBlastOpt_LongestIntronLength
Definition: names.hpp:96
@ eBlastOpt_DustFilteringLinker
Definition: names.hpp:70
@ eBlastOpt_ForceMbIndex
Definition: names.hpp:121
@ eBlastOpt_GapTrigger
Definition: names.hpp:85
@ eBlastOpt_DbSeqNum
Definition: names.hpp:109
@ eBlastOpt_DustFiltering
Definition: names.hpp:67
@ eBlastOpt_DbGeneticCode
Definition: names.hpp:111
@ eBlastOpt_RepeatFiltering
Definition: names.hpp:75
@ eBlastOpt_SegFilteringLocut
Definition: names.hpp:73
@ eBlastOpt_MBTemplateType
Definition: names.hpp:64
@ eBlastOpt_GapXDropoff
Definition: names.hpp:83
@ eBlastOpt_GappedMode
Definition: names.hpp:97
@ eBlastOpt_PseudoCount
Definition: names.hpp:114
@ eBlastOpt_WindowMaskerDatabase
Definition: names.hpp:119
@ eBlastOpt_EffectiveSearchSpace
Definition: names.hpp:110
@ eBlastOpt_SumStatisticsMode
Definition: names.hpp:95
@ eBlastOpt_PHIPattern
Definition: names.hpp:112
@ eBlastOpt_FrameShiftPenalty
Definition: names.hpp:106
@ eBlastOpt_MbIndexName
Definition: names.hpp:122
@ eBlastOpt_MaxNumHspPerSequence
Definition: names.hpp:88
@ eBlastOpt_GapTracebackAlgorithm
Definition: names.hpp:115
@ eBlastOpt_DustFilteringWindow
Definition: names.hpp:69
@ eBlastOpt_CutoffScore
Definition: names.hpp:92
@ eBlastOpt_InclusionThreshold
Definition: names.hpp:113
@ eBlastOpt_UnifiedP
Definition: names.hpp:118
mdb_mode_t mode
Definition: lmdb++.h:38
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
unsigned int a
Definition: ncbi_localip.c:102
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Options used to create the ReadDBFILE structure Include database name and various information for res...
Options for setting up effective lengths and search spaces.
Options used for gapped extension These include: a.
Options used when evaluating and saving hits These include: a.
Options needed for initial word finding and processing.
Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lo...
Options needed to construct a lookup table Also needed: query sequence and query length.
Options used in protein BLAST only (PSI, PHI, RPS and translated BLAST) Some of these possibly should...
Options required for setting up the query sequence.
Definition: type.c:6
#define _ASSERT
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
Definition: thrddgri.c:44
else result
Definition: token2.c:20
Modified on Fri Sep 20 14:57:31 2024 by modify_doxy.py rev. 669887