include/algo/blast/api/blast_nucl_options.hpp

Go to the documentation of this file.
00001 #ifndef ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP
00002 #define ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP
00003 
00004 /*  $Id: blast_nucl_options.hpp 125908 2008-04-28 17:54:36Z camacho $
00005  * ===========================================================================
00006  *
00007  *                            PUBLIC DOMAIN NOTICE
00008  *               National Center for Biotechnology Information
00009  *
00010  *  This software/database is a "United States Government Work" under the
00011  *  terms of the United States Copyright Act.  It was written as part of
00012  *  the author's official duties as a United States Government employee and
00013  *  thus cannot be copyrighted.  This software/database is freely available
00014  *  to the public for use. The National Library of Medicine and the U.S.
00015  *  Government have not placed any restriction on its use or reproduction.
00016  *
00017  *  Although all reasonable efforts have been taken to ensure the accuracy
00018  *  and reliability of the software and data, the NLM and the U.S.
00019  *  Government do not and cannot warrant the performance or results that
00020  *  may be obtained by using this software or data. The NLM and the U.S.
00021  *  Government disclaim all warranties, express or implied, including
00022  *  warranties of performance, merchantability or fitness for any particular
00023  *  purpose.
00024  *
00025  *  Please cite the author in any work or product based on this material.
00026  *
00027  * ===========================================================================
00028  *
00029  * Authors:  Christiam Camacho
00030  *
00031  */
00032 
00033 /// @file blast_nucl_options.hpp
00034 /// Declares the CBlastNucleotideOptionsHandle class.
00035 
00036 #include <algo/blast/api/blast_options_handle.hpp>
00037 
00038 /** @addtogroup AlgoBlast
00039  *
00040  * @{
00041  */
00042 
00043 BEGIN_NCBI_SCOPE
00044 BEGIN_SCOPE(blast)
00045 
00046 /// Handle to the nucleotide-nucleotide options to the BLAST algorithm.
00047 ///
00048 /// Adapter class for nucleotide-nucleotide BLAST comparisons.
00049 /// Exposes an interface to allow manipulation the options that are relevant to
00050 /// this type of search.
00051 /// 
00052 /// NB: By default, traditional megablast defaults are used. If blastn defaults
00053 /// are desired, please call the appropriate member function:
00054 ///
00055 ///    void SetTraditionalBlastnDefaults();
00056 ///    void SetTraditionalMegablastDefaults();
00057 
00058 class  CBlastNucleotideOptionsHandle : 
00059                                             public CBlastOptionsHandle
00060 {
00061 public:
00062 
00063     /// Creates object with default options set
00064     CBlastNucleotideOptionsHandle(EAPILocality locality = CBlastOptions::eLocal);
00065 
00066     /// Sets Defaults
00067     virtual void SetDefaults();
00068 
00069     /******************* Lookup table options ***********************/
00070     /// Returns LookupTableType
00071     ELookupTableType GetLookupTableType() const { return m_Opts->GetLookupTableType(); }
00072     /// Sets LookupTableType
00073     /// @param type LookupTableType [in]
00074     void SetLookupTableType(ELookupTableType type) 
00075     { 
00076         m_Opts->SetLookupTableType(type); 
00077     }
00078 
00079     /// Returns WordSize
00080     int GetWordSize() const { return m_Opts->GetWordSize(); }
00081     /// Sets WordSize
00082     /// @param ws WordSize [in]
00083     void SetWordSize(int ws) 
00084     { 
00085         m_Opts->SetWordSize(ws); 
00086     }
00087 
00088     /******************* Query setup options ************************/
00089     /// Returns StrandOption
00090     objects::ENa_strand GetStrandOption() const { 
00091         return m_Opts->GetStrandOption();
00092     }
00093     /// Sets StrandOption
00094     /// @param strand StrandOption [in]
00095     void SetStrandOption(objects::ENa_strand strand) {
00096         m_Opts->SetStrandOption(strand);
00097     }
00098 
00099     /// Is dust filtering enabled?
00100     bool GetDustFiltering() const { return m_Opts->GetDustFiltering(); }
00101     /// Enable dust filtering.
00102     /// @param val enable dust filtering [in]
00103     void SetDustFiltering(bool val) { m_Opts->SetDustFiltering(val); }
00104 
00105     /// Get level parameter for dust
00106     int GetDustFilteringLevel() const { return m_Opts->GetDustFilteringLevel(); }
00107     /// Set level parameter for dust.  Acceptable values: 2 < level < 64
00108     /// @param level dust filtering parameter level [in]
00109     void SetDustFilteringLevel(int level) { m_Opts->SetDustFilteringLevel(level); }
00110 
00111     /// Get window parameter for dust
00112     int GetDustFilteringWindow() const { return m_Opts->GetDustFilteringWindow(); }
00113     /// Set window parameter for dust.  Acceptable values: 8 < windowsize < 64
00114     /// @param window dust filtering parameter window [in]
00115     void SetDustFilteringWindow(int window) { m_Opts->SetDustFilteringWindow(window); }
00116 
00117     /// Get linker parameter for dust
00118     int GetDustFilteringLinker() const { return m_Opts->GetDustFilteringLinker(); }
00119     /// Set linker parameter for dust.  Acceptable values: 1 < linker < 32
00120     /// @param linker dust filtering parameter linker [in]
00121     void SetDustFilteringLinker(int linker) { m_Opts->SetDustFilteringLinker(linker); }
00122 
00123     /// Is repeat filtering enabled?
00124     bool GetRepeatFiltering() const { return m_Opts->GetRepeatFiltering(); }
00125     /// Enable repeat filtering.
00126     /// @param val enable repeat filtering [in]
00127     void SetRepeatFiltering(bool val) { m_Opts->SetRepeatFiltering(val); }
00128 
00129     /// Get the repeat filtering database
00130     const char* GetRepeatFilteringDB() const { return m_Opts->GetRepeatFilteringDB(); }
00131     /// Enable repeat filtering.
00132     /// @param db repeat filtering database [in]
00133     void SetRepeatFilteringDB(const char* db) { m_Opts->SetRepeatFilteringDB(db); }
00134     
00135     /// Get the window masker taxid (or 0 if not set).
00136     int GetWindowMaskerTaxId() const { return m_Opts->GetWindowMaskerTaxId(); }
00137     
00138     /// Enable window masker and select a taxid (or 0 to disable).
00139     /// @param taxid Select Window Masker filtering database for this taxid [in]
00140     void SetWindowMaskerTaxId(int taxid) { m_Opts->SetWindowMaskerTaxId(taxid); }
00141     
00142     /// Get the window masker database name (or NULL if not set).
00143     const char* GetWindowMaskerDatabase() const
00144     {
00145         return m_Opts->GetWindowMaskerDatabase();
00146     }
00147     
00148     /// Enable window masker and select a database (or NULL to disable).
00149     /// @param taxid Select Window Masker filtering database by filename [in]
00150     void SetWindowMaskerDatabase(const char* db)
00151     {
00152         m_Opts->SetWindowMaskerDatabase(db);
00153     }
00154     
00155     /******************* Initial word options ***********************/
00156 
00157     /// Returns XDropoff
00158     double GetXDropoff() const { return m_Opts->GetXDropoff(); } 
00159     /// Sets XDropoff
00160     /// @param x XDropoff [in]
00161     void SetXDropoff(double x) { m_Opts->SetXDropoff(x); }
00162 
00163     /******************* Gapped extension options *******************/
00164     /// Returns GapExtnAlgorithm
00165     EBlastPrelimGapExt GetGapExtnAlgorithm() const { return m_Opts->GetGapExtnAlgorithm(); }
00166 
00167     /// Sets GapExtnAlgorithm
00168     /// @param algo GapExtnAlgorithm [in]
00169     void SetGapExtnAlgorithm(EBlastPrelimGapExt algo) {m_Opts->SetGapExtnAlgorithm(algo);}
00170 
00171     /// Returns GapTracebackAlgorithm
00172     EBlastTbackExt GetGapTracebackAlgorithm() const { return m_Opts->GetGapTracebackAlgorithm(); }
00173 
00174     /// Sets GapTracebackAlgorithm
00175     /// @param algo GapTracebackAlgorithm [in]
00176     void SetGapTracebackAlgorithm(EBlastTbackExt algo) {m_Opts->SetGapTracebackAlgorithm(algo); }
00177 
00178     /************************ Scoring options ************************/
00179     /// Returns MatchReward
00180     int GetMatchReward() const { return m_Opts->GetMatchReward(); }
00181     /// Sets MatchReward
00182     /// @param r MatchReward [in]
00183     void SetMatchReward(int r) { m_Opts->SetMatchReward(r); }
00184 
00185     /// Returns MismatchPenalty
00186     int GetMismatchPenalty() const { return m_Opts->GetMismatchPenalty(); }
00187     /// Sets MismatchPenalty
00188     /// @param p MismatchPenalty [in]
00189     void SetMismatchPenalty(int p) { m_Opts->SetMismatchPenalty(p); }
00190 
00191     /// Returns MatrixName
00192     const char* GetMatrixName() const { return m_Opts->GetMatrixName(); }
00193     /// Sets MatrixName
00194     /// @param matrix MatrixName [in]
00195     void SetMatrixName(const char* matrix) { m_Opts->SetMatrixName(matrix); }
00196 
00197     /// Returns GapOpeningCost
00198     int GetGapOpeningCost() const { return m_Opts->GetGapOpeningCost(); }
00199     /// Sets GapOpeningCost
00200     /// @param g GapOpeningCost [in]
00201     void SetGapOpeningCost(int g) { m_Opts->SetGapOpeningCost(g); }
00202 
00203     /// Returns GapExtensionCost
00204     int GetGapExtensionCost() const { return m_Opts->GetGapExtensionCost(); }
00205     /// Sets GapExtensionCost
00206     /// @param e GapExtensionCost [in]
00207     void SetGapExtensionCost(int e) { m_Opts->SetGapExtensionCost(e); }
00208 
00209     /// Sets TraditionalBlastnDefaults
00210     void SetTraditionalBlastnDefaults();
00211     /// Sets TraditionalMegablastDefaults
00212     void SetTraditionalMegablastDefaults();
00213     
00214 protected:
00215     /// Set the program and service name for remote blast.
00216     virtual void SetRemoteProgramAndService_Blast3()
00217     {
00218         m_Opts->SetRemoteProgramAndService_Blast3("blastn", "megablast");
00219     }
00220     
00221     /// Overrides LookupTableDefaults for nucleotide options
00222     virtual void SetLookupTableDefaults();
00223     /// Overrides MBLookupTableDefaults for nucleotide options
00224     virtual void SetMBLookupTableDefaults();
00225     /// Overrides QueryOptionDefaults for nucleotide options
00226     virtual void SetQueryOptionDefaults();
00227     /// Overrides InitialWordOptionsDefaults for nucleotide options
00228     virtual void SetInitialWordOptionsDefaults();
00229     /// Overrides MBInitialWordOptionsDefaults for nucleotide options
00230     virtual void SetMBInitialWordOptionsDefaults();
00231     /// Overrides GappedExtensionDefaults for nucleotide options
00232     virtual void SetGappedExtensionDefaults();
00233     /// Overrides MBGappedExtensionDefaults for nucleotide options
00234     virtual void SetMBGappedExtensionDefaults();
00235     /// Overrides ScoringOptionsDefaults for nucleotide options
00236     virtual void SetScoringOptionsDefaults();
00237     /// Overrides MBScoringOptionsDefaults for nucleotide options
00238     virtual void SetMBScoringOptionsDefaults();
00239     /// Overrides HitSavingOptionsDefaults for nucleotide options
00240     virtual void SetHitSavingOptionsDefaults();
00241     /// Overrides MBHitSavingOptionsDefaults for nucleotide options
00242     virtual void SetMBHitSavingOptionsDefaults();
00243     /// Overrides EffectiveLengthsOptionsDefaults for nucleotide options
00244     virtual void SetEffectiveLengthsOptionsDefaults();
00245     /// Overrides SubjectSequenceOptionsDefaults for nucleotide options
00246     virtual void SetSubjectSequenceOptionsDefaults();
00247 
00248 private:
00249     /// Disallow copy constructor
00250     CBlastNucleotideOptionsHandle(const CBlastNucleotideOptionsHandle& rhs);
00251     /// Disallow assignment operator
00252     CBlastNucleotideOptionsHandle& operator=(const CBlastNucleotideOptionsHandle& rhs);
00253 };
00254 
00255 END_SCOPE(blast)
00256 END_NCBI_SCOPE
00257 
00258 
00259 /* @} */
00260 
00261 
00262 #endif  /* ALGO_BLAST_API___BLAST_NUCL_OPTIONS__HPP */
00263 
00264 

Generated on Wed Dec 9 02:54:30 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:17:25 2009 by modify_doxy.py rev. 173732