include/algo/align/nw/nw_spliced_aligner16.hpp

Go to the documentation of this file.
00001 #ifndef ALGO_ALIGN_SPLICEDALIGNER16__HPP
00002 #define ALGO_ALIGN_SPLICEDALIGNER16__HPP
00003 
00004 /* $Id: nw_spliced_aligner16.hpp 124578 2008-04-15 18:30:18Z 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, Alexander Souvorov
00030 *
00031 */
00032 
00033 #include "nw_spliced_aligner.hpp"
00034 
00035 
00036 /** @addtogroup AlgoAlignSpliced
00037  *
00038  * @{
00039  */
00040 
00041 
00042 BEGIN_NCBI_SCOPE
00043 
00044 const size_t splice_type_count_16 (4);
00045 
00046 class  CSplicedAligner16: public CSplicedAligner
00047 {
00048 public:
00049 
00050     CSplicedAligner16(void);
00051 
00052     CSplicedAligner16(const char* seq1, size_t len1,
00053                       const char* seq2, size_t len2);
00054 
00055     CSplicedAligner16(const string& seq1, const string& seq2);
00056 
00057     // Getters
00058     static TScore  GetDefaultWi  (unsigned char splice_type);
00059 
00060     // returns the size of a single backtrace matrix element
00061     virtual size_t GetElemSize(void) const {
00062 #ifdef ALGOALIGN_NW_SPLIGN_MAKE_PUBLIC_BINARY
00063         return 2;
00064 #else
00065         return 3;
00066 #endif
00067     }
00068 
00069     virtual size_t GetSpliceTypeCount(void) {
00070         return splice_type_count_16;
00071     }
00072 
00073     virtual TScore ScoreFromTranscript(const TTranscript& transcript,
00074                                        size_t start1 = kMax_UInt,
00075                                        size_t start2 = kMax_UInt ) const;
00076 
00077 protected:
00078 
00079     TScore m_Wi [splice_type_count_16];
00080 
00081     virtual TScore* x_GetSpliceScores(void) {
00082         return m_Wi;
00083     }
00084     virtual TScore  x_Align (CNWAligner::SAlignInOut* data);
00085 
00086 #ifdef ALGOALIGN_NW_SPLIGN_MAKE_PUBLIC_BINARY
00087     void x_DoBackTrace(const Uint2* backtrace_matrix,
00088                        CNWAligner::SAlignInOut* data,
00089                        int i_global_max,
00090                        int j_global_max);
00091 #else
00092     void x_DoBackTrace(const Uint2* backtrace_matrix,
00093                        const Uint1* backtrace_matrix_ext,
00094                        CNWAligner::SAlignInOut* data);
00095 #endif
00096 };
00097 
00098 
00099 END_NCBI_SCOPE
00100 
00101 /* @} */
00102 
00103 #endif  /* ALGO_ALIGN_SPLICEDALIGNER16__HPP */
00104 
00105 

Generated on Sun Dec 6 21:55:29 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:20:32 2009 by modify_doxy.py rev. 173732