00001 #ifndef ALGO_ALIGN___NW_BAND_ALIGNER__HPP 00002 #define ALGO_ALIGN___NW_BAND_ALIGNER__HPP 00003 00004 /* $Id: nw_band_aligner.hpp 134720 2008-07-21 18:32:01Z kapustin $ 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 * Author: Yuri Kapustin 00030 * 00031 * File Description: 00032 * CBandAligner class definition 00033 * 00034 * CBandAligner implements a generic global (Needleman-Wunsch) 00035 * alignment algorithm assuming at most K differences between 00036 * input sequences. 00037 */ 00038 00039 #include <algo/align/nw/nw_aligner.hpp> 00040 00041 /** @addtogroup AlgoAlignRoot 00042 * 00043 * @{ 00044 */ 00045 00046 00047 BEGIN_NCBI_SCOPE 00048 00049 00050 class CBandAligner: public CNWAligner 00051 { 00052 public: 00053 00054 // ctors 00055 CBandAligner(size_t band = 0): 00056 m_band(band), 00057 m_Shift(0) 00058 {} 00059 00060 // Null scoremat pointer indicates IUPACna coding 00061 CBandAligner(const char* seq1, size_t len1, 00062 const char* seq2, size_t len2, 00063 const SNCBIPackedScoreMatrix* scoremat = 0, 00064 size_t band = 0); 00065 00066 CBandAligner(const string& seq1, 00067 const string& seq2, 00068 const SNCBIPackedScoreMatrix* scoremat = 0, 00069 size_t band = 0); 00070 00071 virtual ~CBandAligner(void) {} 00072 00073 // Setters 00074 void SetBand(size_t band) { m_band = band; } 00075 void SetShift(Uint1 where, size_t offset); 00076 00077 // Getters 00078 size_t GetBand (void) const { return m_band; } 00079 pair<Uint1,size_t> GetShift(void) const; 00080 00081 protected: 00082 00083 // band width 00084 size_t m_band; 00085 00086 // band shift along the first sequence (can be negative) 00087 long m_Shift; 00088 00089 // backtrace helpers 00090 size_t m_TermK; 00091 size_t m_LastCoordSeq1; 00092 size_t m_LastCoordSeq2; 00093 00094 // core dynamic programming 00095 virtual TScore x_Align (CNWAligner::SAlignInOut* data); 00096 00097 // backtrace 00098 void x_DoBackTrace(const CBacktraceMatrix4 & backtrace, 00099 CNWAligner::SAlignInOut* data); 00100 00101 // other 00102 void x_CheckParameters(const SAlignInOut* data) const; 00103 virtual bool x_CheckMemoryLimit(void); 00104 }; 00105 00106 00107 END_NCBI_SCOPE 00108 00109 00110 /* @} */ 00111 00112 #endif /* ALGO_ALIGN___NW_BAND_ALIGNER__HPP */ 00113 00114
1.4.6
Modified on Wed Dec 09 08:17:25 2009 by modify_doxy.py rev. 173732