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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGET_SEQ_GRAPHICS___CLONEFEATSORTER__HPP
2 #define GUI_WIDGET_SEQ_GRAPHICS___CLONEFEATSORTER__HPP
3 
4 /* $Id:
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Liangshou Wu
30  *
31  */
32 
33 
35 #include <set>
36 
38 
39 ///////////////////////////////////////////////////////////////////////////////
40 /// CCloneConcordancySorter is a feature sorter used to sort clone features
41 /// based on clone concordancy. There are three categories:
42 /// - concordant
43 /// - discordant
44 /// - concordancy not set
45 /// Another generic category is 'other'. It may include any other
46 /// categories that are not explicitly listed.
47 ///
48 
50  : public CObject
51  , public IFeatSorter
52 {
53 public:
54  enum EGroup {
55  eInvalid = -1, ///< maybe it is valid, but not considered
56  eConcordant = 0,
59  eOther
60  };
61 
62  CCloneConcordancySorter(const string& sort_str);
63 
64  virtual string GroupIdxToName(int idx) const;
65 
66  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
67 
68  virtual SSorterDescriptor GetThisDescr() const;
69 
70  static const string& GetID();
71  static SSorterDescriptor GetSorterDescr();
72 
73 private:
74  /// Curently intended sorting groups.
75  /// Any feature that doesn't belong to any of the listed groups,
76  /// an invalid group index will be assigned.
78 };
79 
80 
82 
83 
84 #endif // GUI_WIDGET_SEQ_GRAPHICS___CLONEFEATSORTER__HPP
CCloneConcordancySorter is a feature sorter used to sort clone features based on clone concordancy.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CObject –.
Definition: ncbiobj.hpp:180
IFeatSorter is an abstract interface for sorting features based on any criteria.
virtual int GetGroupIdx(const objects::CMappedFeat &feat) const =0
Get the sorted group index for a given feature.
virtual SSorterDescriptor GetThisDescr() const =0
Return a name for the sorter.
virtual string GroupIdxToName(int idx) const =0
Convert group index into group name.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
Definition: gui_export.h:536
Modified on Fri Sep 20 14:57:42 2024 by modify_doxy.py rev. 669887