include/algo/align/nw/nw_spliced_aligner32.hpp

Go to the documentation of this file.
00001 #ifndef ALGO_ALIGN_SPLICEDALIGNER32__HPP
00002 #define ALGO_ALIGN_SPLICEDALIGNER32__HPP
00003 
00004 /* $Id: nw_spliced_aligner32.hpp 103491 2007-05-04 17:18:18Z kazimird $
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 */
00032 
00033 #include "nw_spliced_aligner.hpp"
00034 
00035 /** @addtogroup AlgoAlignSpliced
00036  *
00037  * @{
00038  */
00039 
00040 
00041 BEGIN_NCBI_SCOPE
00042 
00043 const size_t splice_type_count_32 = 3;
00044 
00045 class  CSplicedAligner32: public CSplicedAligner
00046 {
00047 public:
00048 
00049     CSplicedAligner32(void);
00050 
00051     CSplicedAligner32(const char* seq1, size_t len1,
00052                       const char* seq2, size_t len2);
00053 
00054     CSplicedAligner32(const string& seq1, const string& seq2);
00055 
00056     // Getters
00057     static TScore GetDefaultWi  (unsigned char splice_type);
00058     static TScore GetDefaultWd1 (void) { return  -3; }
00059     static TScore GetDefaultWd2 (void) { return  -5; }
00060 
00061     // returns the size of a single backtrace matrix element
00062     virtual size_t GetElemSize(void) const {
00063         return 4;
00064     }
00065 
00066     virtual size_t GetSpliceTypeCount(void) {
00067         return splice_type_count_32;
00068     }
00069 
00070     virtual TScore ScoreFromTranscript(const TTranscript& transcript,
00071                                        size_t start1 = kMax_UInt,
00072                                        size_t start2 = kMax_UInt ) const;
00073 
00074 protected:
00075 
00076     TScore m_Wi [splice_type_count_32];
00077 
00078     TScore m_Wd1; // applies if only one donor/acceptor char damaged
00079     TScore m_Wd2; // applies if both chars damaged
00080 
00081     virtual TScore* x_GetSpliceScores(void) {
00082         return m_Wi;
00083     }
00084     virtual TScore  x_Align (CNWAligner::SAlignInOut* data);
00085 
00086     void x_DoBackTrace(const Uint4* backtrace_matrix,
00087                        CNWAligner::SAlignInOut* data);
00088 };
00089 
00090 
00091 END_NCBI_SCOPE
00092 
00093 /* @} */
00094 
00095 #endif  /* ALGO_ALIGN_SPLICEDALIGNER32__HPP */
00096 
00097 

Generated on Wed Dec 9 02:54:21 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