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

Go to the SVN repository for this file.

1 /* $Id: Variation_ref.hpp 71180 2016-02-16 19:46:22Z foleyjp $
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 Variation_ref.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'seqfeat.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: Variation_ref_.hpp
37 
38 
39 #ifndef OBJECTS_SEQFEAT_VARIATION_REF_HPP
40 #define OBJECTS_SEQFEAT_VARIATION_REF_HPP
41 
42 #include <objects/seq/Seq_data.hpp>
44 #include <objects/seq/Seq_data.hpp>
45 
46 // generated includes
48 
49 // generated classes
50 
52 
53 BEGIN_objects_SCOPE // namespace ncbi::objects::
54 
55 /////////////////////////////////////////////////////////////////////////////
57 {
59 public:
60  // constructor
61  CVariation_ref(void);
62  // destructor
63  ~CVariation_ref(void);
64 
65  /// Enum governing sequence types for supplied sequence strings
66  enum ESeqType {
68  eSeqType_aa
69  };
70 
71  /// PostRead() hooks to establish correct, non-deprecated data layout
72  void PostRead();
73 
74 
75  void SetSNV(const CSeq_data& nucleotide,
77 
78  void SetMNP(const CSeq_data& nucleotide,
79  TSeqPos length,
81 
82  void SetMissense(const CSeq_data& amino_acid);
83 
84  void SetDuplication(CRef<CDelta_item> start_offset=null,
85  CRef<CDelta_item> stop_offset=null);
86 
87  void SetIdentity(CRef<CSeq_literal> seq_literal,
88  CRef<CDelta_item> start_offset=null,
89  CRef<CDelta_item> stop_offset=null);
90 
91  /// Set a standard single nucleotide variant. The replaces set can include
92  /// empty strings and/or '-' as a character to indicate a deletion.
93  void SetSNV(const vector<string>& replaces,
94  ESeqType seq_type);
95  bool IsSNV() const;
96 
97  /// Set a standard multinucleotide variant. The replaces set can include
98  /// empty strings and/or '-' as a character to indicate a deletion.
99  void SetMNP(const vector<string>& replaces,
100  ESeqType seq_type);
101  bool IsMNP() const;
102 
103  /// Make this variant a deletion
104  void SetDeletion();
105  bool IsDeletion() const;
106 
107  /// Make this variant an insertion
108  void SetInsertion(const string& sequence, ESeqType seq_type);
109  bool IsInsertion() const;
110 
111  /// Make this variant an insertion of unknown sequence
112  void SetInsertion();
113 
114  /// Make this variant an insertion
115  void SetDeletionInsertion(const string& sequence, ESeqType seq_type);
116  bool IsDeletionInsertion() const;
117 
118  /// Set the standard fields for a microsatellite. This API establishes a
119  /// microsatellite with a range of possible observed repeats.
120  void SetMicrosatellite(const string& nucleotide_seq,
121  TSeqPos min_repeats, TSeqPos max_repeats);
122  bool IsMicrosatellite() const;
123 
124  /// Set the standard fields for a microsatellite. This API establishes a
125  /// microsatellite with a fixed set of possible observed repeats
126  void SetMicrosatellite(const string& nucleotide_seq,
127  const vector<TSeqPos>& observed_repeats);
128 
129  /// Make this variant a copy number variant. NOTE: This API variant
130  /// establishes a CNV of unknown copy number
131  void SetCNV();
132  bool IsCNV() const;
133 
134  /// Special subtype of CNV: 'gain' - an unspecified increase in copy number
135  void SetGain();
136  bool IsGain() const;
137 
138  /// Special subtype of CNV: 'loss' - an unspecified decrease in copy number
139  void SetLoss();
140  bool IsLoss() const;
141 
142  /// Make this variant a copy number variant. NOTE: This API variant
143  /// establishes a CNV with a range of possible copies
144  void SetCNV(TSeqPos min_copy, TSeqPos max_copy);
145 
146  /// Make this variant a copy number variant. NOTE: This API variant
147  /// establishes a CNV with a fixed set of possible copies
148  void SetCNV(const vector<TSeqPos>& observed_copies);
149 
150  /// The feature represents an inversion at the specified location
151  /// The provided location should be upstream and on the opposite strand
152  void SetInversion(const CSeq_loc& other_loc);
153  bool IsInversion() const;
154 
155  /// The feature represents an eversion at the specified location
156  /// The provided location should be downstream and on the opposite strand
157  void SetEversion(const CSeq_loc& other_loc);
158  bool IsEversion() const;
159 
160  /// The feature represents a translocation event
161  /// The provided location can be anywhere; a special case exists when the
162  /// provided location is on a different chromosome, in which case the
163  /// feature is considered a transchromosomal rearrangement
164  void SetTranslocation(const CSeq_loc& other_loc);
165  bool IsTranslocation() const;
166 
167  /// Establish a uniparental disomy mark-up
168  void SetUniparentalDisomy();
169  bool IsUniparentalDisomy() const;
170 
171  /// Create a complex undescribed variant
172  void SetComplex();
173  bool IsComplex() const;
174 
175  /// Create a variant of unknown type
176  void SetUnknown();
177  bool IsUnknown() const;
178 
179  /// Create a variant of type 'other'
180  void SetOther();
181  bool IsOther() const;
182 
183  /// Validate that all semantic fields are correct
184  void Validate();
185 
186  /// @name Deprecated Methods
187  /// @{
188 
189  /// NOTE: THESE ARE GOING AWAY SOON!!
190  NCBI_DEPRECATED bool IsSetLocation(void) const;
191  NCBI_DEPRECATED bool CanGetLocation(void) const;
192  NCBI_DEPRECATED void ResetLocation(void);
193  NCBI_DEPRECATED const TLocation& GetLocation(void) const;
196 
197  NCBI_DEPRECATED bool IsSetExt_locs(void) const;
198  NCBI_DEPRECATED bool CanGetExt_locs(void) const;
199  NCBI_DEPRECATED void ResetExt_locs(void);
200  NCBI_DEPRECATED const TExt_locs& GetExt_locs(void) const;
201  NCBI_DEPRECATED TExt_locs& SetExt_locs(void);
202 
203  NCBI_DEPRECATED bool IsSetExt(void) const;
204  NCBI_DEPRECATED bool CanGetExt(void) const;
205  NCBI_DEPRECATED void ResetExt(void);
206  NCBI_DEPRECATED const TExt& GetExt(void) const;
207  NCBI_DEPRECATED void SetExt(TExt& value);
208  NCBI_DEPRECATED TExt& SetExt(void);
209 
210 
211 
212  NCBI_DEPRECATED bool IsSetValidated(void) const;
213  NCBI_DEPRECATED bool CanGetValidated(void) const;
214  NCBI_DEPRECATED void ResetValidated(void);
215  NCBI_DEPRECATED TValidated GetValidated(void) const;
216  NCBI_DEPRECATED void SetValidated(TValidated value);
217  NCBI_DEPRECATED TValidated& SetValidated(void);
218 
219  NCBI_DEPRECATED bool IsSetClinical_test(void) const;
220  NCBI_DEPRECATED bool CanGetClinical_test(void) const;
222  NCBI_DEPRECATED const TClinical_test& GetClinical_test(void) const;
223  NCBI_DEPRECATED TClinical_test& SetClinical_test(void);
224 
225  NCBI_DEPRECATED bool IsSetAllele_origin(void) const;
226  NCBI_DEPRECATED bool CanGetAllele_origin(void) const;
228  NCBI_DEPRECATED TAllele_origin GetAllele_origin(void) const;
229  NCBI_DEPRECATED void SetAllele_origin(TAllele_origin value);
230  NCBI_DEPRECATED TAllele_origin& SetAllele_origin(void);
231 
232  NCBI_DEPRECATED bool IsSetAllele_state(void) const;
233  NCBI_DEPRECATED bool CanGetAllele_state(void) const;
235  NCBI_DEPRECATED TAllele_state GetAllele_state(void) const;
236  NCBI_DEPRECATED void SetAllele_state(TAllele_state value);
237  NCBI_DEPRECATED TAllele_state& SetAllele_state(void);
238 
239  NCBI_DEPRECATED bool IsSetAllele_frequency(void) const;
240  NCBI_DEPRECATED bool CanGetAllele_frequency(void) const;
242  NCBI_DEPRECATED TAllele_frequency GetAllele_frequency(void) const;
243  NCBI_DEPRECATED void SetAllele_frequency(TAllele_frequency value);
244  NCBI_DEPRECATED TAllele_frequency& SetAllele_frequency(void);
245 
246  NCBI_DEPRECATED bool IsSetIs_ancestral_allele(void) const;
249  NCBI_DEPRECATED TIs_ancestral_allele GetIs_ancestral_allele(void) const;
250  NCBI_DEPRECATED void SetIs_ancestral_allele(TIs_ancestral_allele value);
251  NCBI_DEPRECATED TIs_ancestral_allele& SetIs_ancestral_allele(void);
252  /// @}
253 
254 private:
255  /// Prohibited deprecated functions
256  /// Due to limitations in ASN spec-land, we cannot officially remove these
257  /// data elements from the spec. We can, however, hide them from client
258  /// access.
259  /// @{
260  NCBI_DEPRECATED bool IsSetPopulation_data(void) const;
261  NCBI_DEPRECATED bool CanGetPopulation_data(void) const;
263  NCBI_DEPRECATED const TPopulation_data& GetPopulation_data(void) const;
264  NCBI_DEPRECATED TPopulation_data& SetPopulation_data(void);
265 
266  NCBI_DEPRECATED bool IsSetPub(void) const;
267  NCBI_DEPRECATED bool CanGetPub(void) const;
268  NCBI_DEPRECATED void ResetPub(void);
269  NCBI_DEPRECATED const TPub& GetPub(void) const;
270  NCBI_DEPRECATED void SetPub(TPub& value);
271  NCBI_DEPRECATED TPub& SetPub(void);
272 
273  /// @}
274 
275 private:
276  // Prohibit copy constructor and assignment operator
279 
280 };
281 
283 
284 /////////////////// CVariation_ref inline methods
285 
286 // constructor
287 inline
289 {
290 }
291 
292 /////////////////// end of CVariation_ref inline methods
293 
294 
295 END_objects_SCOPE // namespace ncbi::objects::
296 
298 
299 
300 #endif // OBJECTS_SEQFEAT_VARIATION_REF_HPP
301 /* Original file checksum: lines: 86, chars: 2492, CRC32: ef8e854f */
User-defined methods of the data storage class.
Data storage class.
CRef –.
Definition: ncbiobj.hpp:618
CVariation_ref_Base –.
CVariation_ref(const CVariation_ref &value)
CVariation_ref & operator=(const CVariation_ref &value)
ESeqType
Enum governing sequence types for supplied sequence strings.
CVariation_ref_Base Tparent
char value[7]
Definition: config.c:431
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define NCBISER_HAVE_POST_READ(Class)
Definition: serialbase.hpp:943
ENetStorageObjectLocation
Enumeration that indicates the current location of the object.
Definition: netstorage.hpp:86
#define NCBI_DEPRECATED
#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_SEQFEAT_EXPORT
Definition: ncbi_export.h:768
void ResetClinical_test(void)
Reset Clinical_test data member.
TAllele_origin GetAllele_origin(void) const
Get the Allele_origin member data.
void ResetPopulation_data(void)
Reset Population_data data member.
TIs_ancestral_allele & SetIs_ancestral_allele(void)
Assign a value to Is_ancestral_allele data member.
bool CanGetAllele_frequency(void) const
Check if it is safe to call GetAllele_frequency method.
void ResetValidated(void)
Reset Validated data member.
bool CanGetExt_locs(void) const
Check if it is safe to call GetExt_locs method.
void ResetAllele_frequency(void)
Reset Allele_frequency data member.
bool CanGetExt(void) const
Check if it is safe to call GetExt method.
bool IsSetAllele_origin(void) const
Check if a value has been assigned to Allele_origin data member.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
TValidated & SetValidated(void)
Assign a value to Validated data member.
bool CanGetAllele_state(void) const
Check if it is safe to call GetAllele_state method.
bool CanGetValidated(void) const
Check if it is safe to call GetValidated method.
bool IsSetPopulation_data(void) const
Note about SNP representation and pretinent fields: allele-frequency, population, quality-codes: The ...
bool CanGetAllele_origin(void) const
Check if it is safe to call GetAllele_origin method.
TLocation & SetLocation(void)
Assign a value to Location data member.
bool IsSetPub(void) const
publication support.
void ResetLocation(void)
Reset Location data member.
void ResetExt(void)
Reset Ext data member.
void ResetAllele_state(void)
Reset Allele_state data member.
const TClinical_test & GetClinical_test(void) const
Get the Clinical_test member data.
bool IsSetAllele_frequency(void) const
NOTE: 'allele-frequency' here refers to the minor allele frequency of the default population DEPRECAT...
const TLocation & GetLocation(void) const
Get the Location member data.
TValidated GetValidated(void) const
Get the Validated member data.
TExt_locs & SetExt_locs(void)
Assign a value to Ext_locs data member.
void ResetExt_locs(void)
Reset Ext_locs data member.
TClinical_test & SetClinical_test(void)
Assign a value to Clinical_test data member.
bool IsSetAllele_state(void) const
Check if a value has been assigned to Allele_state data member.
bool IsSetIs_ancestral_allele(void) const
is this variant the ancestral allele? DEPRECATED: new field = VariantProperties.is-ancestral-allele C...
TAllele_state & SetAllele_state(void)
Assign a value to Allele_state data member.
bool IsSetClinical_test(void) const
link-outs to GeneTests database DEPRECATED - do not use Check if a value has been assigned to Clinica...
TAllele_frequency GetAllele_frequency(void) const
Get the Allele_frequency member data.
void ResetAllele_origin(void)
Reset Allele_origin data member.
void ResetPub(void)
Reset Pub data member.
bool IsSetLocation(void) const
Observed location, if different from the parent set or feature.location.
bool IsSetValidated(void) const
has this variant been validated? DEPRECATED: new field = VariantProperties.other-validation Check if ...
TPopulation_data & SetPopulation_data(void)
Assign a value to Population_data data member.
const TPopulation_data & GetPopulation_data(void) const
Get the Population_data member data.
TIs_ancestral_allele GetIs_ancestral_allele(void) const
Get the Is_ancestral_allele member data.
TAllele_origin & SetAllele_origin(void)
Assign a value to Allele_origin data member.
bool CanGetPub(void) const
Check if it is safe to call GetPub method.
bool CanGetPopulation_data(void) const
Check if it is safe to call GetPopulation_data method.
void ResetIs_ancestral_allele(void)
Reset Is_ancestral_allele data member.
TAllele_frequency & SetAllele_frequency(void)
Assign a value to Allele_frequency data member.
bool CanGetClinical_test(void) const
Check if it is safe to call GetClinical_test method.
const TExt_locs & GetExt_locs(void) const
Get the Ext_locs member data.
bool IsSetExt_locs(void) const
reference other locs, e.g.
bool CanGetIs_ancestral_allele(void) const
Check if it is safe to call GetIs_ancestral_allele method.
TPub & SetPub(void)
Assign a value to Pub data member.
const TExt & GetExt(void) const
Get the Ext member data.
const TPub & GetPub(void) const
Get the Pub member data.
TExt & SetExt(void)
Assign a value to Ext data member.
bool IsSetExt(void) const
DEPRECATED - do not use; use Seq-feat.exts instead Check if a value has been assigned to Ext data mem...
TAllele_state GetAllele_state(void) const
Get the Allele_state member data.
int offset
Definition: replacements.h:160
Modified on Fri Dec 08 08:23:36 2023 by modify_doxy.py rev. 669887