NCBI C++ ToolKit
cuPssmScorer.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cuPssmScorer.hpp 41133 2009-02-23 16:42:57Z lanczyck $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Charlie Liu
27  *
28  * File Description:
29  *
30  * Score an seq-align against PSSM
31  *
32  * ===========================================================================
33  */
34 
35 
36 #ifndef CU_PSSM_SCORER_HPP
37 #define CU_PSSM_SCORER_HPP
38 
41 #include <objects/seq/Bioseq.hpp>
43 
46 BEGIN_SCOPE(cd_utils)
47 
49 {
50 public:
52  //assume the master is the query/consensus in pssm
53  int score(const CRef<CSeq_align> align, const CRef<CBioseq> bioseq);
54  int score(BlockModelPair& bmp, const CRef<CBioseq> bioseq);
55 
56  // Get the raw scores: index by score[column][row]
57  const vector< vector<int> >& getRawScores() const { return m_scoresFromPssm;}
58 
59 private:
60  inline int scoreOneColumn(int col, char aa);
62  vector< vector<int> > m_scoresFromPssm;
63 };
64 
65 END_SCOPE(cd_utils)
67 
68 #endif
69 
70 
User-defined methods of the data storage class.
CRef< CPssmWithParameters > m_pssm
vector< vector< int > > m_scoresFromPssm
const vector< vector< int > > & getRawScores() const
USING_SCOPE(objects)
thread_local unique_ptr< FtaMsgPost > bmp
Definition: ftaerr.cpp:120
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
Modified on Fri Feb 23 11:42:15 2024 by modify_doxy.py rev. 669887