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

Go to the SVN repository for this file.

1 /* $Id: cuConsensusMaker.hpp 33815 2007-05-04 17:18:18Z kazimird $
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
27  *
28  * File Description:
29  *
30  * Make consensus and remaster with it
31  *
32  * ===========================================================================
33  */
34 
35 #ifndef CU_CONSENSUS_MAKER_HPP
36 #define CU_CONSENSUS_MAKER_HPP
37 
42 
45 BEGIN_SCOPE(cd_utils)
46 
48 {
49 public:
50 
51  //ConsensusMaker(CRef<CSeq_align_set> seqAlign, CCdCore* cd);
52  ConsensusMaker(CCdCore* cd, double incl = 0.5);
53  ~ConsensusMaker();
54 
55  void makeConsensus();
57  const string& getConsensus();
58  CRef< CSeq_entry > getConsensusSeqEntry();
59  const BlockModelPair& getGuideAlignment()const;
60  BlockModelPair& getGuideAlignment();
61  CRef< CSeq_align > getGuideSeqAlign();
62  CRef<CSeq_align_set> remasterWithConsensus()const;
63  void remasterWithConsensus(bool extended);
64 
65  void skipUnalignedSeg(int threshold);
66  //void columnInclusionThreshold(double percentage){m_inclusionRule = percentage;};
67 
68  double GetInclusionRule() const {return m_inclusionRule;}
69 
70  static CRef<CSeq_align_set> degapAlignment(CCdCore* cd);
71  static void degapAlignment(CCdCore* cd, list< CRef< CSeq_align > >& seqAligns);
72  static void degapCdAlignment(CCdCore* cd);
73  static void degapCdAlignmentToPending(CCdCore* cd);
74 private:
75 
76  void addRows();
77 
78  string m_consensus;
80  list< CRef< CSeq_align > > m_seqAligns;
83  bool m_made;
86 };
87 
88 END_SCOPE(cd_utils)
90 
91 #endif
ResidueProfiles m_rp
ResidueProfiles & getResidueProfiles()
CRef< CSeq_id > m_conSeqId
CRef< CSeq_id > m_masterSeqId
list< CRef< CSeq_align > > m_seqAligns
double GetInclusionRule() const
USING_SCOPE(objects)
#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
#define NCBI_CDUTILS_EXPORT
Definition: ncbi_export.h:376
Modified on Sat May 25 14:15:46 2024 by modify_doxy.py rev. 669887