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

Go to the SVN repository for this file.

1 /* $Id: disc_nucl_options.cpp 36475 2008-01-07 20:49:19Z camacho $
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  * Authors: Christiam Camacho
27  *
28  */
29 
30 /// @file disc_nucl_options.cpp
31 /// Implements the CDiscNucleotideOptionsHandle class.
32 
33 #include <ncbi_pch.hpp>
36 #include "blast_setup.hpp"
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
43 
45 BEGIN_SCOPE(blast)
46 
49 {
50  SetDefaults();
51  m_Opts->SetProgram(eDiscMegablast);
52 }
53 
54 void
56 {
58  bool defaults_mode = m_Opts->GetDefaultsMode();
59  m_Opts->SetDefaultsMode(false);
60  SetTemplateType(0);
63  m_Opts->SetDefaultsMode(defaults_mode);
64 }
65 
66 void
68 {
70  bool defaults_mode = m_Opts->GetDefaultsMode();
71  m_Opts->SetDefaultsMode(false);
73  m_Opts->SetDefaultsMode(defaults_mode);
74 }
75 
76 void
78 {
84 }
85 
86 void
88 {
90 }
91 
92 void
94 {
95  NCBI_THROW(CBlastException, eNotSupported,
96  "Blastn uses a seed extension method incompatible with discontiguous nuclotide blast");
97 }
98 
99 END_SCOPE(blast)
101 
102 
103 /* @} */
#define BLAST_GAP_X_DROPOFF_NUCL
default dropoff for non-greedy nucleotide gapped extensions
#define BLAST_UNGAPPED_X_DROPOFF_NUCL
ungapped dropoff score for blastn (and megablast)
@ eDynProgScoreOnly
standard affine gapping
#define BLAST_GAP_TRIGGER_NUCL
default bit score that will trigger a gapped extension for blastn
#define BLAST_GAP_X_DROPOFF_FINAL_NUCL
default dropoff for nucleotide gapped extensions)
#define BLAST_WINDOW_SIZE_DISC
default window size (discontiguous megablast)
Definition: blast_options.h:61
@ eDynProgTbck
standard affine gapping
#define BLAST_WORDSIZE_NUCL
default word size (blastn)
Definition: blast_options.h:67
Internal auxiliary setup classes/functions for C++ BLAST APIs.
@ eDiscMegablast
Nucl-Nucl using discontiguous megablast.
Definition: blast_types.hpp:66
Defines BLAST error codes (user errors included)
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
Handle to the nucleotide-nucleotide options to the discontiguous BLAST algorithm.
Declares the CDiscNucleotideOptionsHandle class.
virtual void SetScoringOptionsDefaults()
Overrides ScoringOptionsDefaults for nucleotide options.
void SetMBScoringOptionsDefaults()
Sets MBScoringOptionsDefaults.
virtual void SetMBLookupTableDefaults()
Overrides MBLookupTableDefaults for nucleotide options.
void SetGapTrigger(double g)
Sets GapTrigger.
void SetGapExtnAlgorithm(EBlastPrelimGapExt algo)
Sets GapExtnAlgorithm.
CRef< CBlastOptions > m_Opts
Data type this class controls access to.
void SetMBGappedExtensionDefaults()
Sets MBGappedExtensionDefaults.
void SetGapTracebackAlgorithm(EBlastTbackExt algo)
Sets GapTracebackAlgorithm.
void SetMBInitialWordOptionsDefaults()
Sets MBInitialWordOptionsDefaults.
bool GetDefaultsMode() const
void SetTraditionalBlastnDefaults()
NOTE: Unavailable for discontiguous megablast.
void SetXDropoff(double x)
Sets XDropoff.
void SetWindowSize(int ws)
Sets WindowSize.
void SetWordSize(int ws)
Sets WordSize.
void SetTemplateType(unsigned char type)
Sets TemplateType.
void SetGapXDropoffFinal(double x)
Sets GapXDropoffFinal.
void SetDefaultsMode(bool dmode)
If this is true, remote options will ignore "Set" calls.
void SetGapXDropoff(double x)
Sets GapXDropoff.
void SetMBLookupTableDefaults()
Sets MBLookupTableDefaults.
void SetTemplateLength(unsigned char length)
Sets TemplateLength.
#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
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
Modified on Fri Mar 01 10:06:40 2024 by modify_doxy.py rev. 669887