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 /******************* Hit saving options *************************/
1750 int
1752 {
1753  if (! m_Local) {
1754  x_Throwx("Error: GetHitlistSize() not available.");
1755  }
1756  return m_Local->GetHitlistSize();
1757 }
1758 void
1760 {
1761  if (m_Local) {
1762  m_Local->SetHitlistSize(s);
1763  }
1764  if (m_Remote) {
1766  }
1767 }
1768 
1769 int
1771 {
1772  if (! m_Local) {
1773  x_Throwx("Error: GetMaxNumHspPerSequence() not available.");
1774  }
1775  return m_Local->GetMaxNumHspPerSequence();
1776 }
1777 void
1779 {
1780  if (m_Local) {
1782  }
1783  if (m_Remote) {
1785  }
1786 }
1787 
1788 int
1790 {
1791  if (! m_Local) {
1792  x_Throwx("Error: GetMaxHspsPerSubject() not available.");
1793  }
1794  return m_Local->GetMaxHspsPerSubject();
1795 }
1796 void
1798 {
1799  if (m_Local) {
1801  }
1802  if (m_Remote) {
1804  }
1805 }
1806 
1807 int
1809 {
1810  if (! m_Local) {
1811  x_Throwx("Error: GetCullingMode() not available.");
1812  }
1813  return m_Local->GetCullingLimit();
1814 }
1815 void
1817 {
1818  if (m_Local) {
1820  }
1821  if (m_Remote) {
1823  }
1824 }
1825 
1826 bool
1828 {
1829  if (! m_Local) {
1830  x_Throwx("Error: GetSubjectBestHit() not available.");
1831  }
1832  return m_Local->GetSubjectBestHit();
1833 }
1834 void
1836 {
1837  if (m_Local) {
1839  }
1840  if (m_Remote) {
1842  }
1843 }
1844 
1845 
1846 double
1848 {
1849  if (! m_Local) {
1850  x_Throwx("Error: GetBestHitOverhangMode() not available.");
1851  }
1852  return m_Local->GetBestHitOverhang();
1853 }
1854 void
1856 {
1857  if (m_Local) {
1858  m_Local->SetBestHitOverhang(overhang);
1859  }
1860  if (m_Remote) {
1862  }
1863 }
1864 
1865 double
1867 {
1868  if (! m_Local) {
1869  x_Throwx("Error: GetBestHitScoreEdgeMode() not available.");
1870  }
1871  return m_Local->GetBestHitScoreEdge();
1872 }
1873 void
1875 {
1876  if (m_Local) {
1877  m_Local->SetBestHitScoreEdge(score_edge);
1878  }
1879  if (m_Remote) {
1881  }
1882 }
1883 
1884 double
1886 {
1887  if (! m_Local) {
1888  x_Throwx("Error: GetEvalueThreshold() not available.");
1889  }
1890  return m_Local->GetEvalueThreshold();
1891 }
1892 void
1894 {
1895  if (m_Local) {
1896  m_Local->SetEvalueThreshold(eval);
1897  }
1898  if (m_Remote) {
1900  }
1901 }
1902 
1903 int
1905 {
1906  if (! m_Local) {
1907  x_Throwx("Error: GetCutoffScore() not available.");
1908  }
1909  return m_Local->GetCutoffScore();
1910 }
1911 void
1913 {
1914  if (m_Local) {
1915  m_Local->SetCutoffScore(s);
1916  }
1917  if (m_Remote) {
1919  }
1920 }
1921 
1922 vector<double>
1924 {
1925  if (! m_Local) {
1926  x_Throwx("Error: GetCutoffScoreCoeffs() not available.");
1927  }
1928  return m_Local->GetCutoffScoreCoeffs();
1929 }
1930 void
1931 CBlastOptions::SetCutoffScoreCoeffs(const vector<double>& c)
1932 {
1933  if (!m_Local) {
1934  x_Throwx("Error: SetCutoffScoreCoeffs() not available.");
1935  }
1937 }
1938 
1939 double
1941 {
1942  if (! m_Local) {
1943  x_Throwx("Error: GetPercentIdentity() not available.");
1944  }
1945  return m_Local->GetPercentIdentity();
1946 }
1947 void
1949 {
1950  if (m_Local) {
1952  }
1953  if (m_Remote) {
1955  }
1956 }
1957 
1958 int
1960 {
1961  if (! m_Local) {
1962  x_Throwx("Error: GetMaxEditDistance() not available.");
1963  }
1964  return m_Local->GetMaxEditDistance();
1965 }
1966 void
1968 {
1969  if (m_Local) {
1971  }
1972  if (m_Remote) {
1973  x_Throwx("Error: SetMaxEditDistance() not available.");
1974  }
1975 }
1976 
1977 double
1979 {
1980  if (! m_Local) {
1981  x_Throwx("Error: GetQueryCovHspPerc() not available.");
1982  }
1983  return m_Local->GetQueryCovHspPerc();
1984 }
1985 void
1987 {
1988  if (m_Local) {
1990  }
1991  if (m_Remote) {
1993  }
1994 }
1995 
1996 
1997 int
1999 {
2000  if (! m_Local) {
2001  x_Throwx("Error: GetMinDiagSeparation() not available.");
2002  }
2003  return m_Local->GetMinDiagSeparation();
2004 }
2005 void
2007 {
2008  if (! m_Local) {
2009  x_Throwx("Error: SetMinDiagSeparation() not available.");
2010  }
2012 }
2013 
2014 bool
2016 {
2017  if (! m_Local) {
2018  x_Throwx("Error: GetSumStatisticsMode() not available.");
2019  }
2020  return m_Local->GetSumStatisticsMode();
2021 }
2022 void
2024 {
2025  if (m_Local) {
2027  }
2028  if (m_Remote) {
2030  }
2031 }
2032 
2033 int
2035 {
2036  if (! m_Local) {
2037  x_Throwx("Error: GetLongestIntronLength() not available.");
2038  }
2039  return m_Local->GetLongestIntronLength();
2040 }
2041 void
2043 {
2044  if (m_Local) {
2046  }
2047  if (m_Remote) {
2049  }
2050 }
2051 
2052 
2053 bool
2055 {
2056  if (! m_Local) {
2057  x_Throwx("Error: GetGappedMode() not available.");
2058  }
2059  return m_Local->GetGappedMode();
2060 }
2061 void
2063 {
2064  if (m_Local) {
2065  m_Local->SetGappedMode(m);
2066  }
2067  if (m_Remote) {
2069  }
2070 }
2071 
2072 // -RMH-
2073 int
2075 {
2076  if (! m_Local) {
2077  x_Throwx("Error: GetMaskLevel() not available.");
2078  }
2079  return m_Local->GetMaskLevel();
2080 }
2081 
2082 // -RMH-
2083 void
2085 {
2086  if (m_Local) {
2087  m_Local->SetMaskLevel(s);
2088  }
2089  if (m_Remote) {
2091  }
2092 }
2093 
2094 // -RMH-
2095 bool
2097 {
2098  if (! m_Local) {
2099  x_Throwx("Error: GetComplexityAdjMode() not available.");
2100  }
2101  return m_Local->GetComplexityAdjMode();
2102 }
2103 
2104 // -RMH-
2105 void
2107 {
2108  if (m_Local) {
2110  }
2111  if (m_Remote) {
2113  }
2114 }
2115 
2116 double
2118 {
2119  if (! m_Local) {
2120  x_Throwx("Error: GetLowScorePerc() not available.");
2121  }
2122  return m_Local->GetLowScorePerc();
2123 }
2124 
2125 void
2127 {
2128  if (m_Local)
2130 }
2131 
2132 
2133 bool
2135 {
2136  if (! m_Local) {
2137  x_Throwx("Error: GetPaired() not available.");
2138  }
2139  return m_Local->GetPaired();
2140 }
2141 
2142 void
2144 {
2145  if (m_Local) {
2146  m_Local->SetPaired(p);
2147  }
2148  else {
2149  x_Throwx("Error: SetPaired() not available.");
2150  }
2151 }
2152 
2153 
2154 bool
2156 {
2157  if (! m_Local) {
2158  x_Throwx("Error: GetSplice() not available.");
2159  }
2160  return m_Local->GetSplice();
2161 }
2162 
2163 void
2165 {
2166  if (m_Local) {
2167  m_Local->SetSplice(s);
2168  }
2169  else {
2170  x_Throwx("Error: SetSplice() not available.");
2171  }
2172 }
2173 
2174 
2175 /************************ Scoring options ************************/
2176 const char*
2178 {
2179  if (! m_Local) {
2180  x_Throwx("Error: GetMatrixName() not available.");
2181  }
2182  return m_Local->GetMatrixName();
2183 }
2184 void
2185 CBlastOptions::SetMatrixName(const char* matrix)
2186 {
2187  if (m_Local) {
2188  m_Local->SetMatrixName(matrix);
2189  }
2190  if (m_Remote) {
2192  }
2193 }
2194 
2195 int
2197 {
2198  if (! m_Local) {
2199  x_Throwx("Error: GetMatchReward() not available.");
2200  }
2201  return m_Local->GetMatchReward();
2202 }
2203 void
2205 {
2206  if (m_Local) {
2208  }
2209  if (m_Remote) {
2211  }
2212 }
2213 
2214 int
2216 {
2217  if (! m_Local) {
2218  x_Throwx("Error: GetMismatchPenalty() not available.");
2219  }
2220  return m_Local->GetMismatchPenalty();
2221 }
2222 void
2224 {
2225  if (m_Local) {
2227  }
2228  if (m_Remote) {
2230  }
2231 }
2232 
2233 int
2235 {
2236  if (! m_Local) {
2237  x_Throwx("Error: GetGapOpeningCost() not available.");
2238  }
2239  return m_Local->GetGapOpeningCost();
2240 }
2241 void
2243 {
2244  if (m_Local) {
2246  }
2247  if (m_Remote) {
2249  }
2250 }
2251 
2252 int
2254 {
2255  if (! m_Local) {
2256  x_Throwx("Error: GetGapExtensionCost() not available.");
2257  }
2258  return m_Local->GetGapExtensionCost();
2259 }
2260 void
2262 {
2263  if (m_Local) {
2265  }
2266  if (m_Remote) {
2268  }
2269 }
2270 
2271 int
2273 {
2274  if (! m_Local) {
2275  x_Throwx("Error: GetFrameShiftPenalty() not available.");
2276  }
2277  return m_Local->GetFrameShiftPenalty();
2278 }
2279 void
2281 {
2282  if (m_Local) {
2284  }
2285  if (m_Remote) {
2287  }
2288 }
2289 
2290 bool
2292 {
2293  if (! m_Local) {
2294  x_Throwx("Error: GetOutOfFrameMode() not available.");
2295  }
2296  return m_Local->GetOutOfFrameMode();
2297 }
2298 void
2300 {
2301  if (m_Local) {
2303  }
2304  if (m_Remote) {
2306  }
2307 }
2308 
2309 /******************** Effective Length options *******************/
2310 Int8
2312 {
2313  if (! m_Local) {
2314  x_Throwx("Error: GetDbLength() not available.");
2315  }
2316  return m_Local->GetDbLength();
2317 }
2318 void
2320 {
2321  if (m_Local) {
2322  m_Local->SetDbLength(l);
2323  }
2324  if (m_Remote) {
2326  }
2327 }
2328 
2329 unsigned int
2331 {
2332  if (! m_Local) {
2333  x_Throwx("Error: GetDbSeqNum() not available.");
2334  }
2335  return m_Local->GetDbSeqNum();
2336 }
2337 void
2339 {
2340  if (m_Local) {
2341  m_Local->SetDbSeqNum(n);
2342  }
2343  if (m_Remote) {
2345  }
2346 }
2347 
2348 Int8
2350 {
2351  if (! m_Local) {
2352  x_Throwx("Error: GetEffectiveSearchSpace() not available.");
2353  }
2354  return m_Local->GetEffectiveSearchSpace();
2355 }
2356 void
2358 {
2359  if (m_Local) {
2361  }
2362  if (m_Remote) {
2364  }
2365 }
2366 void
2368 {
2369  if (m_Local) {
2371  }
2372  if (m_Remote) {
2373  _ASSERT( !eff.empty() );
2374  // This is the best we can do because remote BLAST only accepts one
2375  // value for the effective search space
2377  }
2378 }
2379 
2380 int
2382 {
2383  if (! m_Local) {
2384  x_Throwx("Error: GetDbGeneticCode() not available.");
2385  }
2386  return m_Local->GetDbGeneticCode();
2387 }
2388 
2389 void
2391 {
2392  if (m_Local) {
2395  }
2396  if (m_Remote) {
2398  }
2399 }
2400 
2401 const char*
2403 {
2404  if (! m_Local) {
2405  x_Throwx("Error: GetPHIPattern() not available.");
2406  }
2407  return m_Local->GetPHIPattern();
2408 }
2409 void
2410 CBlastOptions::SetPHIPattern(const char* pattern, bool is_dna)
2411 {
2412  if (m_Local) {
2413  m_Local->SetPHIPattern(pattern, is_dna);
2414  }
2415  if (m_Remote) {
2417 
2418 // For now I will assume this is handled when the data is passed to the
2419 // code in blast4_options - i.e. that code will discriminate on the basis
2420 // of the type of *OptionHandle that is passed in.
2421 //
2422 // if (is_dna) {
2423 // m_Remote->SetProgram("blastn");
2424 // } else {
2425 // m_Remote->SetProgram("blastp");
2426 // }
2427 //
2428 // m_Remote->SetService("phi");
2429  }
2430 }
2431 
2432 /******************** PSIBlast options *******************/
2433 double
2435 {
2436  if (! m_Local) {
2437  x_Throwx("Error: GetInclusionThreshold() not available.");
2438  }
2439  return m_Local->GetInclusionThreshold();
2440 }
2441 void
2443 {
2444  if (m_Local) {
2446  }
2447  if (m_Remote) {
2449  }
2450 }
2451 
2452 int
2454 {
2455  if (! m_Local) {
2456  x_Throwx("Error: GetPseudoCount() not available.");
2457  }
2458  return m_Local->GetPseudoCount();
2459 }
2460 void
2462 {
2463  if (m_Local) {
2464  m_Local->SetPseudoCount(u);
2465  }
2466  if (m_Remote) {
2468  }
2469 }
2470 
2471 bool
2473 {
2474  if (! m_Local) {
2475  x_Throwx("Error: GetIgnoreMsaMaster() not available.");
2476  }
2477  return m_Local->GetIgnoreMsaMaster();
2478 }
2479 void
2481 {
2482  if (m_Local) {
2484  }
2485  if (m_Remote) {
2487  }
2488 }
2489 
2490 /******************** DELTA-Blast options *******************/
2491 double
2493 {
2494  if (! m_Local) {
2495  x_Throwx("Error: GetDomainInclusionThreshold() not available.");
2496  }
2498 }
2499 
2500 void
2502 {
2503  if (m_Local) {
2505  }
2506  if (m_Remote) {
2508  }
2509 }
2510 
2511 /// Allows to dump a snapshot of the object
2512 void
2514 {
2515  if (m_Local) {
2516  m_Local->DebugDump(ddc, depth);
2517  }
2518 }
2519 
2520 void
2522 {
2523  if (m_Remote) {
2524  m_Remote->SetDefaultsMode(false);
2525  }
2526 }
2527 
2528 // typedef ncbi::objects::CBlast4_queue_search_request TBlast4Req;
2529 // CRef<TBlast4Req> GetBlast4Request() const
2530 // {
2531 // CRef<TBlast4Req> result;
2532 
2533 // if (m_Remote) {
2534 // result = m_Remote->GetBlast4Request();
2535 // }
2536 
2537 // return result;
2538 // }
2539 
2540 // the "new paradigm"
2543 {
2544  TBlast4Opts * result = 0;
2545 
2546  if (m_Remote) {
2548  }
2549 
2550  return result;
2551 }
2552 
2554 {
2555  if (! m_Local) {
2556  x_Throwx("Error: GetUseIndex() not available.");
2557  }
2558 
2559  return m_Local->GetUseIndex();
2560 }
2561 
2563 {
2564  if (! m_Local) {
2565  x_Throwx("Error: GetForceIndex() not available.");
2566  }
2567 
2568  return m_Local->GetForceIndex();
2569 }
2570 
2572 {
2573  if (! m_Local) {
2574  x_Throwx("Error: GetIsOldStyleMBIndex() not available.");
2575  }
2576 
2577  return m_Local->GetIsOldStyleMBIndex();
2578 }
2579 
2581 {
2582  if (! m_Local) {
2583  x_Throwx("Error: GetMBIndexLoaded() not available.");
2584  }
2585 
2586  return m_Local->GetMBIndexLoaded();
2587 }
2588 
2589 const string CBlastOptions::GetIndexName() const
2590 {
2591  if (! m_Local) {
2592  x_Throwx("Error: GetIndexName() not available.");
2593  }
2594 
2595  return m_Local->GetIndexName();
2596 }
2597 
2599  bool use_index, const string & index_name,
2600  bool force_index, bool old_style_index )
2601 {
2602  if (m_Local) {
2603  m_Local->SetUseIndex(
2604  use_index, index_name, force_index, old_style_index );
2605  }
2606  if (m_Remote) {
2607  m_Remote->SetValue(eBlastOpt_ForceMbIndex, force_index);
2608  if ( !index_name.empty() ) {
2609  m_Remote->SetValue(eBlastOpt_MbIndexName, index_name.c_str());
2610  }
2611  }
2612 
2613 }
2614 
2615 void CBlastOptions::SetMBIndexLoaded( bool index_loaded )
2616 {
2617  if (! m_Local) {
2618  x_Throwx("Error: SetMBIndexLoaded() not available.");
2619  }
2620 
2621  m_Local->SetMBIndexLoaded( index_loaded );
2622 }
2623 
2626 {
2627  return m_Local ? m_Local->GetQueryOpts() : 0;
2628 }
2629 
2632 {
2633  return m_Local ? m_Local->GetLutOpts() : 0;
2634 }
2635 
2638 {
2639  return m_Local ? m_Local->GetInitWordOpts() : 0;
2640 }
2641 
2644 {
2645  return m_Local ? m_Local->GetExtnOpts() : 0;
2646 }
2647 
2650 {
2651  return m_Local ? m_Local->GetHitSaveOpts() : 0;
2652 }
2653 
2654 PSIBlastOptions *
2656 {
2657  return m_Local ? m_Local->GetPSIBlastOpts() : 0;
2658 }
2659 
2662 {
2663  return m_Local ? m_Local->GetDbOpts() : 0;
2664 }
2665 
2668 {
2669  return m_Local ? m_Local->GetScoringOpts() : 0;
2670 }
2671 
2674 {
2675  return m_Local ? m_Local->GetEffLenOpts() : 0;
2676 }
2677 
2678 void
2679 CBlastOptions::x_Throwx(const string& msg) const
2680 {
2681  NCBI_THROW(CBlastException, eInvalidOptions, msg);
2682 }
2683 
2685 {
2686  if (m_Remote) {
2687  m_Remote->SetDefaultsMode(dmode);
2688  }
2689 }
2690 
2692 {
2693  if (m_Remote) {
2694  return m_Remote->GetDefaultsMode();
2695  }
2696  else
2697  return false;
2698 }
2699 
2701 {
2702  if (&opts != this)
2703  {
2704  // Clean up the old object
2705  if (m_Local)
2706  {
2707  delete m_Local;
2708  m_Local = 0;
2709  }
2710  if (m_Remote)
2711  {
2712  delete m_Remote;
2713  m_Remote = 0;
2714  }
2715 
2716  // Copy the contents of the new object
2717  if (opts.m_Remote)
2718  {
2719  m_Remote = new CBlastOptionsRemote(*opts.m_Remote);
2720  }
2721  if (opts.m_Local)
2722  {
2723  m_Local = new CBlastOptionsLocal(*opts.m_Local);
2724  }
2728  }
2729 }
2730 
2731 #endif /* SKIP_DOXYGEN_PROCESSING */
2732 
2733 END_SCOPE(blast)
2735 
2736 /* @} */
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:164
static const string & GetName(EBlastOptIdx opt)
Definition: names.cpp:350
static CBlast4Field & Get(EBlastOptIdx opt)
Definition: names.cpp:44
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
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.
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)
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:55
@ eBlastOpt_WordThreshold
Definition: names.hpp:57
@ eBlastOpt_ComplexityAdjMode
Definition: names.hpp:96
@ eBlastOpt_MismatchPenalty
Definition: names.hpp:101
@ eBlastOpt_MaskLevel
Definition: names.hpp:97
@ eBlastOpt_CompositionBasedStats
Definition: names.hpp:114
@ eBlastOpt_SubjectBestHit
Definition: names.hpp:127
@ eBlastOpt_LookupTableType
Definition: names.hpp:58
@ eBlastOpt_QueryGeneticCode
Definition: names.hpp:76
@ eBlastOpt_DbLength
Definition: names.hpp:106
@ eBlastOpt_Program
Definition: names.hpp:56
@ eBlastOpt_WordSize
Definition: names.hpp:59
@ eBlastOpt_SegFilteringHicut
Definition: names.hpp:72
@ eBlastOpt_HitlistSize
Definition: names.hpp:85
@ eBlastOpt_FilterString
Definition: names.hpp:63
@ eBlastOpt_StrandOption
Definition: names.hpp:75
@ eBlastOpt_QueryCovHspPerc
Definition: names.hpp:92
@ eBlastOpt_GapXDropoffFinal
Definition: names.hpp:82
@ eBlastOpt_DustFilteringLevel
Definition: names.hpp:66
@ eBlastOpt_OutOfFrameMode
Definition: names.hpp:105
@ eBlastOpt_MBTemplateLength
Definition: names.hpp:61
@ eBlastOpt_BestHitOverhang
Definition: names.hpp:122
@ eBlastOpt_CullingLimit
Definition: names.hpp:88
@ eBlastOpt_XDropoff
Definition: names.hpp:80
@ eBlastOpt_PercentIdentity
Definition: names.hpp:91
@ eBlastOpt_SegFilteringWindow
Definition: names.hpp:70
@ eBlastOpt_IgnoreMsaMaster
Definition: names.hpp:123
@ eBlastOpt_WindowMaskerTaxId
Definition: names.hpp:118
@ eBlastOpt_GapExtensionCost
Definition: names.hpp:103
@ eBlastOpt_GapOpeningCost
Definition: names.hpp:102
@ eBlastOpt_WindowSize
Definition: names.hpp:77
@ eBlastOpt_MatchReward
Definition: names.hpp:100
@ eBlastOpt_MaskAtHash
Definition: names.hpp:64
@ eBlastOpt_MaxHspsPerSubject
Definition: names.hpp:87
@ eBlastOpt_SmithWatermanMode
Definition: names.hpp:115
@ eBlastOpt_SegFiltering
Definition: names.hpp:69
@ eBlastOpt_GapExtnAlgorithm
Definition: names.hpp:84
@ eBlastOpt_EvalueThreshold
Definition: names.hpp:89
@ eBlastOpt_RepeatFilteringDB
Definition: names.hpp:74
@ eBlastOpt_MatrixName
Definition: names.hpp:98
@ eBlastOpt_DomainInclusionThreshold
Definition: names.hpp:124
@ eBlastOpt_BestHitScoreEdge
Definition: names.hpp:121
@ eBlastOpt_LongestIntronLength
Definition: names.hpp:94
@ eBlastOpt_DustFilteringLinker
Definition: names.hpp:68
@ eBlastOpt_ForceMbIndex
Definition: names.hpp:119
@ eBlastOpt_GapTrigger
Definition: names.hpp:83
@ eBlastOpt_DbSeqNum
Definition: names.hpp:107
@ eBlastOpt_DustFiltering
Definition: names.hpp:65
@ eBlastOpt_DbGeneticCode
Definition: names.hpp:109
@ eBlastOpt_RepeatFiltering
Definition: names.hpp:73
@ eBlastOpt_SegFilteringLocut
Definition: names.hpp:71
@ eBlastOpt_MBTemplateType
Definition: names.hpp:62
@ eBlastOpt_GapXDropoff
Definition: names.hpp:81
@ eBlastOpt_GappedMode
Definition: names.hpp:95
@ eBlastOpt_PseudoCount
Definition: names.hpp:112
@ eBlastOpt_WindowMaskerDatabase
Definition: names.hpp:117
@ eBlastOpt_EffectiveSearchSpace
Definition: names.hpp:108
@ eBlastOpt_SumStatisticsMode
Definition: names.hpp:93
@ eBlastOpt_PHIPattern
Definition: names.hpp:110
@ eBlastOpt_FrameShiftPenalty
Definition: names.hpp:104
@ eBlastOpt_MbIndexName
Definition: names.hpp:120
@ eBlastOpt_MaxNumHspPerSequence
Definition: names.hpp:86
@ eBlastOpt_GapTracebackAlgorithm
Definition: names.hpp:113
@ eBlastOpt_DustFilteringWindow
Definition: names.hpp:67
@ eBlastOpt_CutoffScore
Definition: names.hpp:90
@ eBlastOpt_InclusionThreshold
Definition: names.hpp:111
@ eBlastOpt_UnifiedP
Definition: names.hpp:116
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_)
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
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 Tue May 14 16:22:00 2024 by modify_doxy.py rev. 669887