1 #ifndef ALGO_BLAST_API___TBLASTN_OPTIONS__HPP
2 #define ALGO_BLAST_API___TBLASTN_OPTIONS__HPP
3 
4 /*  $Id: tblastn_options.hpp 472241 2015-07-08 15:24:13Z fongah2 $
5  * ===========================================================================
6  *
7  *                            PUBLIC DOMAIN NOTICE
8  *               National Center for Biotechnology Information
9  *
10  *  This software/database is a "United States Government Work" under the
11  *  terms of the United States Copyright Act.  It was written as part of
12  *  the author's official duties as a United States Government employee and
13  *  thus cannot be copyrighted.  This software/database is freely available
14  *  to the public for use. The National Library of Medicine and the U.S.
15  *  Government have not placed any restriction on its use or reproduction.
16  *
17  *  Although all reasonable efforts have been taken to ensure the accuracy
18  *  and reliability of the software and data, the NLM and the U.S.
19  *  Government do not and cannot warrant the performance or results that
20  *  may be obtained by using this software or data. The NLM and the U.S.
21  *  Government disclaim all warranties, express or implied, including
22  *  warranties of performance, merchantability or fitness for any particular
23  *  purpose.
24  *
25  *  Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors:  Christiam Camacho
30  *
31  */
32 
33 /// @file tblastn_options.hpp
34 /// Declares the CTBlastnOptionsHandle class.
35 
36 #include <algo/blast/api/blast_advprot_options.hpp>
37 
38 /** @addtogroup AlgoBlast
39  *
40  * @{
41  */
42 
43 BEGIN_NCBI_SCOPE
44 BEGIN_SCOPE(blast)
45 
46 /// Handle to the protein-translated nucleotide options to the BLAST algorithm.
47 ///
48 /// Adapter class for protein-translated nucleotide BLAST comparisons.
49 /// Exposes an interface to allow manipulation the options that are relevant to
50 /// this type of search.
51 
52 class NCBI_XBLAST_EXPORT CTBlastnOptionsHandle :
53                                 public CBlastAdvancedProteinOptionsHandle
54 {
55 public:
56 
57     /// Creates object with default options set
58     CTBlastnOptionsHandle(EAPILocality locality = CBlastOptions::eLocal);
CTBlastnOptionsHandle(CRef<CBlastOptions> opt)59     CTBlastnOptionsHandle(CRef<CBlastOptions> opt):CBlastAdvancedProteinOptionsHandle(opt) {}
~CTBlastnOptionsHandle()60     ~CTBlastnOptionsHandle() {}
61 
62     /************************ Scoring options ************************/
63     /// Returns OutOfFrameMode
64     /// @todo is this needed or can we use a sentinel for the frame shift penalty?
GetOutOfFrameMode() const65     bool GetOutOfFrameMode() const { return m_Opts->GetOutOfFrameMode(); }
66     /// Sets OutOfFrameMode
67     /// @param m OutOfFrameMode [in]
SetOutOfFrameMode(bool m=true)68     void SetOutOfFrameMode(bool m = true) { m_Opts->SetOutOfFrameMode(m); }
69 
70     /// Returns FrameShiftPenalty
GetFrameShiftPenalty() const71     int GetFrameShiftPenalty() const { return m_Opts->GetFrameShiftPenalty(); }
72     /// Sets FrameShiftPenalty
73     /// @param p FrameShiftPenalty [in]
SetFrameShiftPenalty(int p)74     void SetFrameShiftPenalty(int p) { m_Opts->SetFrameShiftPenalty(p); }
75 
76     /// Returns LongestIntronLength
GetLongestIntronLength() const77     int GetLongestIntronLength() const { return m_Opts->GetLongestIntronLength(); }
78     /// Sets LongestIntronLength
79     /// @param l LongestIntronLength [in]
SetLongestIntronLength(int l)80     void SetLongestIntronLength(int l) { m_Opts->SetLongestIntronLength(l); }
81 
82     /******************* Subject sequence options *******************/
83     /// Returns DbGeneticCode
GetDbGeneticCode() const84     int GetDbGeneticCode() const {
85         return m_Opts->GetDbGeneticCode();
86     }
87     /// Sets DbGeneticCode
88     /// @param gc DbGeneticCode [in]
SetDbGeneticCode(int gc)89     void SetDbGeneticCode(int gc) {
90         m_Opts->SetDbGeneticCode(gc);
91     }
92 
93 protected:
94     /// Set the program and service name for remote blast.
SetRemoteProgramAndService_Blast3()95     virtual void SetRemoteProgramAndService_Blast3()
96     {
97         m_Opts->SetRemoteProgramAndService_Blast3("tblastn", "plain");
98     }
99 
100     /// Sets LookupTableDefaults for tblastn options
101     virtual void SetLookupTableDefaults();
102     /// Sets ScoringOptionsDefaults for tblastn options
103     virtual void SetScoringOptionsDefaults();
104     /// Sets HitSavingOptionsDefaults for tblastn options
105     virtual void SetHitSavingOptionsDefaults();
106     /// Sets SubjectSequenceOptionsDefaults for tblastn options
107     virtual void SetSubjectSequenceOptionsDefaults();
108     /// Overrides  SetGappedExtensionDefaults for tblastn options
109     virtual void  SetGappedExtensionDefaults();
110 
111 private:
112     /// Disallow copy constructor
113     CTBlastnOptionsHandle(const CTBlastnOptionsHandle& rhs);
114     /// Disallow assignment operator
115     CTBlastnOptionsHandle& operator=(const CTBlastnOptionsHandle& rhs);
116 };
117 
118 END_SCOPE(blast)
119 END_NCBI_SCOPE
120 
121 
122 /* @} */
123 
124 
125 #endif  /* ALGO_BLAST_API___TBLASTN_OPTIONS__HPP */
126