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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGET_SEQ_GRAPHICS___DBVARFEATSORTER__HPP
2 #define GUI_WIDGET_SEQ_GRAPHICS___DBVARFEATSORTER__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 /// CDbvarQualitySorter is a feature sorter used to sort variant features
41 /// based on variant quality. There are two categories:
42 /// - high (high or not set)
43 /// - low
44 
46  : public CObject
47  , public IFeatSorter
48 {
49 public:
50  enum EGroup {
51  eInvalid = -1, ///< maybe it is valid, but not considered
52  eHigh = 0,
53  eLow
54  };
55 
56  CDbvarQualitySorter(const string& sort_str);
57 
58  virtual string GroupIdxToName(int idx) const;
59 
60  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
61 
62  virtual SSorterDescriptor GetThisDescr() const;
63 
64  static const string& GetID();
65  static SSorterDescriptor GetSorterDescr();
66 
67 private:
68  /// Curently intended sorting groups.
69  /// Any feature that doesn't belong to any of the listed groups,
70  /// an invalid group index will be assigned.
72 };
73 
74 
75 
76 ///////////////////////////////////////////////////////////////////////////////
77 /// CDbvarPilotSorter is a feature sorter used to sort variant features
78 /// based on variant pilot number. There are many categories:
79 /// - pilot1
80 /// - pilot2
81 /// - pilot3
82 /// - pilot4
83 /// - pilot5
84 /// - pilot not set
85 /// - other
86 
88  : public CObject
89  , public IFeatSorter
90 {
91 public:
92  enum EGroup {
93  eInvalid = -1, ///< maybe it is valid, but not considered
94  ePilot1 = 0,
100  eOther
101  };
102 
103  CDbvarPilotSorter(const string& sort_str);
104 
105  virtual string GroupIdxToName(int idx) const;
106 
107  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
108 
109  virtual SSorterDescriptor GetThisDescr() const;
110 
111  static const string& GetID();
112  static SSorterDescriptor GetSorterDescr();
113 
114 private:
115  /// Curently intended sorting groups.
116  /// Any feature that doesn't belong to any of the listed groups,
117  /// an invalid group index will be assigned.
119 };
120 
121 
122 
123 ///////////////////////////////////////////////////////////////////////////////
124 /// CDbvarClinicalAsstSorter is a feature sorter used to sort variant features
125 /// based on variant quality. There are two categories:
126 /// - high (high or not set)
127 /// - low
128 
130  : public CObject
131  , public IFeatSorter
132 {
133 public:
134  enum EGroup {
135  eInvalid = -1, ///< maybe it is valid, but not considered
136  eBenign = 0,
142  eOther
143  };
144 
145  CDbvarClinicalAsstSorter(const string& sort_str);
146 
147  virtual string GroupIdxToName(int idx) const;
148 
149  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
150 
151  virtual SSorterDescriptor GetThisDescr() const;
152 
153  static const string& GetID();
154  static SSorterDescriptor GetSorterDescr();
155 
156 private:
157  /// Curently intended sorting groups.
158  /// Any feature that doesn't belong to any of the listed groups,
159  /// an invalid group index will be assigned.
161 };
162 
163 
164 
165 
166 ///////////////////////////////////////////////////////////////////////////////
167 /// CDbvarSamplesetTypeSorter is a feature sorter used to sort variant features
168 /// based on variant quality. There are two categories:
169 /// - high (high or not set)
170 /// - low
171 
173  : public CObject
174  , public IFeatSorter
175 {
176 public:
177  enum EGroup {
178  eInvalid = -1, ///< maybe it is valid, but not considered
179  eCase = 0,
182  eOther
183  };
184 
185  CDbvarSamplesetTypeSorter(const string& sort_str);
186 
187  virtual string GroupIdxToName(int idx) const;
188 
189  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
190 
191  virtual SSorterDescriptor GetThisDescr() const;
192 
193  static const string& GetID();
194  static SSorterDescriptor GetSorterDescr();
195 
196 private:
197  /// Curently intended sorting groups.
198  /// Any feature that doesn't belong to any of the listed groups,
199  /// an invalid group index will be assigned.
201 };
202 
203 ///////////////////////////////////////////////////////////////////////////////
204 /// CDbvarValidationSorter is a feature sorter used to sort variant features
205 /// based on variant quality. There are two categories:
206 /// - high (high or not set)
207 /// - low
208 
210  : public CObject
211  , public IFeatSorter
212 {
213 public:
214  enum EGroup {
215  eInvalid = -1, ///< maybe it is valid, but not considered
216  eSameSample_DiffPlatform = 0,
222  eOther
223  };
224 
225  CDbvarValidationSorter(const string& sort_str);
226 
227  virtual string GroupIdxToName(int idx) const;
228 
229  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
230 
231  virtual SSorterDescriptor GetThisDescr() const;
232 
233  static const string& GetID();
234  static SSorterDescriptor GetSorterDescr();
235 
236 private:
237  /// Curently intended sorting groups.
238  /// Any feature that doesn't belong to any of the listed groups,
239  /// an invalid group index will be assigned.
241 };
242 
243 
244 ///////////////////////////////////////////////////////////////////////////////
245 /// CGRCStatusSorter is a feature sorter used to sort GRC issue features
246 /// based on resolving status stored in seq-feat::qual.
247 /// There are two categories:
248 /// - resolved
249 /// - unresolved or others
250 
252  : public CObject
253  , public IFeatSorter
254 {
255 public:
256  enum EGroup {
257  eInvalid = -1,
258  eResolved = 0,
259  eOther
260  };
261 
262  CGRCStatusSorter(const string& sort_str);
263 
264  virtual string GroupIdxToName(int idx) const;
265 
266  virtual int GetGroupIdx(const objects::CMappedFeat& feat) const;
267 
268  virtual SSorterDescriptor GetThisDescr() const;
269 
270  static const string& GetID();
271  static SSorterDescriptor GetSorterDescr();
272 
273 private:
274  /// Curently intended sorting groups.
275  /// Any feature that doesn't belong to any of the listed groups,
276  /// an invalid group index will be assigned.
278 };
279 
280 
281 
283 
284 
285 #endif // GUI_WIDGET_SEQ_GRAPHICS___DBVARFEATSORTER__HPP
CDbvarClinicalAsstSorter is a feature sorter used to sort variant features based on variant quality.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CDbvarPilotSorter is a feature sorter used to sort variant features based on variant pilot number.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CDbvarQualitySorter is a feature sorter used to sort variant features based on variant quality.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CDbvarSamplesetTypeSorter is a feature sorter used to sort variant features based on variant quality.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CDbvarValidationSorter is a feature sorter used to sort variant features based on variant quality.
set< EGroup > m_SortGroups
Curently intended sorting groups.
CGRCStatusSorter is a feature sorter used to sort GRC issue features based on resolving status stored...
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:31 2024 by modify_doxy.py rev. 669887