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

Go to the SVN repository for this file.

1 /* $Id$
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  */
27 
28 /// @file GC_Scaf_stats_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/genome_collection.asn">genome_collection.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/genomecoll/genome_collection.def">genome_collection.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef OBJECTS_GENOMECOLL_GC_SCAF_STATS_BASE_HPP
42 #define OBJECTS_GENOMECOLL_GC_SCAF_STATS_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
47 
48 #ifndef BEGIN_objects_SCOPE
49 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
50 # define END_objects_SCOPE END_SCOPE(objects)
51 #endif
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 
55 // generated classes
56 
57 
58 /** @addtogroup dataspec_NCBI_GenomeCollection
59  *
60  * @{
61  */
62 
63 /////////////////////////////////////////////////////////////////////////////
64 ///
65 /// CGC_Scaf_stats_Base --
66 ///
67 
69 {
71 public:
72  // constructor
73  CGC_Scaf_stats_Base(void);
74  // destructor
75  virtual ~CGC_Scaf_stats_Base(void);
76 
77  // type info
79 
80  ///NOTE: These values equal to the stats_cd values in CodeStatistics table in GenomeColl
82  eStats_category_replicon_count = 70,
83  eStats_category_scaffold_count = 22,
84  eStats_category_component_count = 23, ///< How many components
85  eStats_category_component_span_count = 24, ///< How many placements of components
86  eStats_category_total_length = 1,
87  eStats_category_ungapped_length = 2,
88  eStats_category_min_gapped_scaf_length = 25,
89  eStats_category_max_gapped_scaf_length = 26,
90  eStats_category_min_ungapped_scaf_length = 27,
91  eStats_category_max_ungapped_scaf_length = 28,
92  eStats_category_active_finishing_bases = 3,
93  eStats_category_draft_bases = 5,
94  eStats_category_finished_bases = 7,
95  eStats_category_whole_genome_finishing_bases = 9,
96  eStats_category_other_sequences = 11,
97  eStats_category_pre_draft = 13,
98  eStats_category_wgs_bases = 15,
99  eStats_category_bases_in_spanned_gaps = 17,
100  eStats_category_n50 = 19,
101  eStats_category_spanned_gaps = 20,
102  eStats_category_unspanned_gaps = 21,
103  eStats_category_bases_in_unspanned_gaps = 29,
104  eStats_category_count_contig = 30, ///< contig count
105  eStats_category_contig_n50 = 31, ///< contig N50
106  eStats_category_contig_L50 = 32, ///< contig L50
107  eStats_category_contig_n75 = 33, ///< contig N75
108  eStats_category_contig_n90 = 34, ///< contig N90
109  eStats_category_scaf_L50 = 35, ///< scaffold L50
110  eStats_category_scaf_n75 = 36, ///< scaffold N75
111  eStats_category_scaf_n90 = 37, ///< scaffold N90
112  eStats_category_gc_count = 38, ///< base counts for G,C
113  eStats_category_atgc_count = 39, ///< base count for A,T,G,C
114  eStats_category_gc_perc = 40, ///< gc-count / atgc-count as percentage.
115  eStats_category_is_there_unplaced_scaf = 72, ///< 1 means there is unplaced scaffold. 0 means none
116  eStats_category_count_singleton_unordered_scaffold = 73,
117  eStats_category_count_chr_made_of_singleton_ordered_scaffold = 74,
118  eStats_category_count_chr_with_single_component = 75, ///< GCOL-675 - assembly release review stats. Meaningful only at assembly level. Do any of the chromosomes have a single component each? if yes, do all chromosomes have single component each? INTEGER OPTIONAL, number of unplaced/unlocalized singleton scaffolds in minus orientation
119  eStats_category_count_singleton_in_minus_orientation = 76, ///< INTEGER OPTIONAL, chr-terminal-gap-types SET OF GC-ChrGapTypes OPTIONAL, are any gaps flagged as 'unknown' and how many? 0 means none.
120  eStats_category_count_unknown_gaps = 80, ///< INTEGER OPTIONAL, 1.2c Scaffold source names: count implicit/explicit
121  eStats_category_count_implicit_scaf_src_name = 82, ///< INTEGER OPTIONAL,
122  eStats_category_count_explicit_scaf_src_name = 83, ///< INTEGER OPTIONAL
123  eStats_category_all_chr_has_single_component = 84, ///< if 1 yes, 0 no. BOOLEAN OPTIONAL, Do any scaffolds have terminal gaps? How many?
124  eStats_category_count_scaf_with_terminal_gaps = 85, ///< INTEGER OPTIONAL, Do any chromosome have terminal gaps? what is the gap type for each?
125  eStats_category_count_chr_with_terminal_gaps = 86, ///< INTEGER OPTIONAL, Number of component GIs (uniq components). Is the count different from the count in the latest GenBank/Refseq release for the same assembly, by how many?
126  eStats_category_count_uniq_components = 87, ///<INTEGER OPTIONAL ,
127  eStats_category_count_uniq_component_diff_from_last_release = 88, ///<INTEGER OPTIONAL,
128  eStats_category_count_chromosome_types = 89, ///<INTEGER OPTIONAL,
129  eStats_category_count_chromosome_terminal_gap_types = 90, ///< # of chromosome terminal gap types
130  eStats_category_count_dropped_components = 91, ///< dropped component due to foreign screen
131  eStats_category_count_non_chromosome_replicon = 92, ///< number of non-Chromosome replicons
132  eStats_category_count_assembly_units = 93, ///< # of assembly-units
133  eStats_category_count_alt_loci_units = 94, ///< # of alt-loci units
134  eStats_category_count_fixed_patches = 95, ///< # of fixed patches
135  eStats_category_count_novel_patches = 96, ///< # of novel patches
136  eStats_category_count_regions = 97, ///< # of regions
137  eStats_category_count_patches = 98, ///< # of patches
138  eStats_category_count_par_regions = 99, ///< # of PAR regions
139  eStats_category_count_genomic_regions = 100, ///< # of genomic regions
140  eStats_category_count_chromosome_replicons = 101, ///< # of chromosomal replicons
141  eStats_category_assembly_status = 102, ///< Assembly status 1 - Contig only;2 - Unplaced scaffolds only; 3 - Some chromosomes assembled; 4 - all chromosomes assembled; 5 - complete sequence genome; 6-unlocalized and unplaced scaffolds.
142  eStats_category_net_count_scaffold = 103, ///< number of scaffolds that are not also chromosomes (22 - 75)
143  eStats_category_net_count_component = 104, ///< number of components that are not also chromosomes or scaffolds (30 - 75 -73)
144  eStats_category_count_regions_contain_alt_loci = 105, ///< number of regions containing alt-loci
145  eStats_category_count_regions_contain_fix_patch = 106, ///< number of regions containing fix patch
146  eStats_category_count_regions_contain_novel_patch = 107, ///< number of regions containing novel patch
147  eStats_category_count_fix_patch_with_alignment = 108, ///< number of fix patch with alignment to primary assembly
148  eStats_category_count_novel_patch_with_alignment = 109, ///< number of novel patch with alignment to primary assembly
149  eStats_category_count_alt_scaf_with_alignment = 110, ///< number of alt scaffolds with alignment to primary assembly
150  eStats_category_count_alt_loci_scaf = 111, ///< number of alt-loci scaffolds.
151  eStats_category_count_real_scaffolds = 112, ///< number of scaffolds with gb_is_skipped = 0.
152  eStats_category_top_level_count = 113, ///< Number of chromosomes or plasmids, unplaced/unlocalized scaffolds, alt-loci scaffolds, and patch scaffolds
153  eStats_category_total_gap_length = 114, ///< Total length of gaps
154  eStats_category_count_replicons_without_ordered_scaf = 115, ///< count of replicons without ordered scaffold
155  eStats_category_other = 255 ///< catch all
156  };
157 
158  /// Access to EStats_category's attributes (values, names) as defined in spec
159  static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EStats_category)(void);
160 
161  // types
162  typedef int TStats_category;
163  typedef Uint8 TValue;
164 
165  // member index
166  enum class E_memberIndex {
167  e__allMandatory = 0,
168  e_stats_category,
169  e_value
170  };
172 
173  // getters
174  // setters
175 
176  /// Check if a value has been assigned to Stats_category data member.
177  ///
178  /// Data member Stats_category is mandatory;
179  /// its type is defined as 'typedef int TStats_category'
180  /// @return
181  /// - true, if a value has been assigned.
182  /// - false, otherwise.
183  bool IsSetStats_category(void) const;
184 
185  /// Check if it is safe to call GetStats_category method.
186  ///
187  /// @return
188  /// - true, if the data member is getatable.
189  /// - false, otherwise.
190  bool CanGetStats_category(void) const;
191 
192  /// Reset Stats_category data member.
193  void ResetStats_category(void);
194 
195  /// Get the Stats_category member data.
196  ///
197  /// @return
198  /// Copy of the member data.
199  TStats_category GetStats_category(void) const;
200 
201  /// Assign a value to Stats_category data member.
202  ///
203  /// @param value
204  /// Value to assign
205  void SetStats_category(TStats_category value);
206 
207  /// Assign a value to Stats_category data member.
208  ///
209  /// @return
210  /// Reference to the data value.
211  TStats_category& SetStats_category(void);
212 
213  /// Check if a value has been assigned to Value data member.
214  ///
215  /// Data member Value is mandatory;
216  /// its type is defined as 'typedef Uint8 TValue'
217  /// @return
218  /// - true, if a value has been assigned.
219  /// - false, otherwise.
220  bool IsSetValue(void) const;
221 
222  /// Check if it is safe to call GetValue method.
223  ///
224  /// @return
225  /// - true, if the data member is getatable.
226  /// - false, otherwise.
227  bool CanGetValue(void) const;
228 
229  /// Reset Value data member.
230  void ResetValue(void);
231 
232  /// Get the Value member data.
233  ///
234  /// @return
235  /// Copy of the member data.
236  TValue GetValue(void) const;
237 
238  /// Assign a value to Value data member.
239  ///
240  /// @param value
241  /// Value to assign
242  void SetValue(TValue value);
243 
244  /// Assign a value to Value data member.
245  ///
246  /// @return
247  /// Reference to the data value.
248  TValue& SetValue(void);
249 
250  /// Reset the whole object
251  virtual void Reset(void);
252 
253 
254 private:
255  // Prohibit copy constructor and assignment operator
258 
259  // data
260  Uint4 m_set_State[1];
263 };
264 
265 /* @} */
266 
267 
268 
269 
270 
271 ///////////////////////////////////////////////////////////
272 ///////////////////// inline methods //////////////////////
273 ///////////////////////////////////////////////////////////
274 inline
276 {
277  return ((m_set_State[0] & 0x3) != 0);
278 }
279 
280 inline
282 {
283  return IsSetStats_category();
284 }
285 
286 inline
288 {
290  m_set_State[0] &= ~0x3;
291 }
292 
293 inline
295 {
296  if (!CanGetStats_category()) {
297  ThrowUnassigned(0);
298  }
299  return m_Stats_category;
300 }
301 
302 inline
304 {
306  m_set_State[0] |= 0x3;
307 }
308 
309 inline
311 {
312 #ifdef _DEBUG
313  if (!IsSetStats_category()) {
315  }
316 #endif
317  m_set_State[0] |= 0x1;
318  return m_Stats_category;
319 }
320 
321 inline
323 {
324  return ((m_set_State[0] & 0xc) != 0);
325 }
326 
327 inline
329 {
330  return IsSetValue();
331 }
332 
333 inline
335 {
336  m_Value = 0;
337  m_set_State[0] &= ~0xc;
338 }
339 
340 inline
342 {
343  if (!CanGetValue()) {
344  ThrowUnassigned(1);
345  }
346  return m_Value;
347 }
348 
349 inline
351 {
352  m_Value = value;
353  m_set_State[0] |= 0xc;
354 }
355 
356 inline
358 {
359 #ifdef _DEBUG
360  if (!IsSetValue()) {
361  memset(&m_Value,UnassignedByte(),sizeof(m_Value));
362  }
363 #endif
364  m_set_State[0] |= 0x4;
365  return m_Value;
366 }
367 
368 ///////////////////////////////////////////////////////////
369 ////////////////// end of inline methods //////////////////
370 ///////////////////////////////////////////////////////////
371 
372 
373 
374 
375 
376 END_objects_SCOPE // namespace ncbi::objects::
377 
379 
380 
381 #endif // OBJECTS_GENOMECOLL_GC_SCAF_STATS_BASE_HPP
CGC_Scaf_stats_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
char value[7]
Definition: config.c:431
static char UnassignedByte(void)
Definition: serialbase.hpp:181
void ThrowUnassigned(TMemberIndex index) const
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
uint64_t Uint8
8-byte (64-bit) unsigned integer
Definition: ncbitype.h:105
#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_GENOME_COLLECTION_EXPORT
Definition: ncbi_export.h:528
CGC_Scaf_stats_Base & operator=(const CGC_Scaf_stats_Base &)
TStats_category GetStats_category(void) const
Get the Stats_category member data.
void ResetValue(void)
Reset Value data member.
CSerialObject Tparent
bool IsSetValue(void) const
Check if a value has been assigned to Value data member.
TValue GetValue(void) const
Get the Value member data.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
TValue & SetValue(void)
Assign a value to Value data member.
EStats_category
NOTE: These values equal to the stats_cd values in CodeStatistics table in GenomeColl.
CGC_Scaf_stats_Base(const CGC_Scaf_stats_Base &)
bool IsSetStats_category(void) const
Check if a value has been assigned to Stats_category data member.
void ResetStats_category(void)
Reset Stats_category data member.
TStats_category & SetStats_category(void)
Assign a value to Stats_category data member.
bool CanGetStats_category(void) const
Check if it is safe to call GetStats_category method.
bool CanGetValue(void) const
Check if it is safe to call GetValue method.
Modified on Wed Dec 06 07:16:16 2023 by modify_doxy.py rev. 669887