NCBI C++ ToolKit
gui_object_info_variant.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: gui_object_info_variant.cpp 44721 2020-02-28 17:28:24Z rudnev $
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 * Authors: Liangshou Wu
27 *
28 * File Description:
29 * Gui Object Info class specifically for structural variations from dbVar.
30 *
31 */
32 
41 #include <gui/objutils/tooltip.hpp>
42 #include <gui/objutils/snp_gui.hpp>
43 
46 
48 {
49 public:
50  virtual string GetSubtype() const;
51  virtual void GetToolTip(ITooltipFormatter& tooltip, string& t_title, TSeqPos at_p = (TSeqPos)-1, bool* isGeneratedBySvc = NULL) const;
52  virtual void GetLinks(ITooltipFormatter& links, bool no_ncbi_base) const;
53 };
54 
55 
57 {
58  return "Structural variant";
59 }
60 
61 
62 static int s_GetChildNum(const objects::CSeq_feat& feat)
63 {
64  string num_str = feat.GetNamedQual("Child Count");
65  if ( !num_str.empty() ) {
66  try {
67  return NStr::StringToInt(num_str);
68  } catch (CException&) {
69  // ingore it
70  }
71  }
72  return -1;
73 }
74 
75 
76 void CGuiObjectInfoVariant::GetToolTip(ITooltipFormatter& tooltip, string& t_title, TSeqPos /*at_p*/, bool* isGeneratedBySvc) const
77 {
78  if(isGeneratedBySvc) {
79  *isGeneratedBySvc = false;
80  }
81 
83 
84  const CVariation_ref& var = m_Feat->GetData().GetVariation();
85  bool is_sv = !var.IsSetId() || (var.GetId().GetTag().IsStr() &&
86  var.GetId().GetTag().GetStr().find("sv") == 1);
87 
88  // variations that came from CVcfReader do not follow some common conventions, so sometimes they need to be
89  // handled in a special way
90  bool is_vcf(NSnpGui::isFromVcf(*m_Feat));
91  string validation = is_vcf ? "" : "Not Tested";
92  string additional_info = kEmptyStr;
93 
94  if (var.IsSetId()) {
95  string id_text;
96  // avoid "local" dbtag when data came from CVcfReader
97  if(is_vcf && var.GetId().GetDb() == "local") {
98  id_text = var.GetId().GetTag().GetStr();
99  } else {
100  var.GetId().GetLabel(&id_text);
101  }
102  tooltip.AddRow("Variation ID:", id_text);
103  }
104 
105  if (var.IsSetData() && var.GetData().IsSet() && var.GetData().GetSet().IsSetVariations()) {
106  list<string> alt_alleles;
107  string ref_allele;
108  int allele_len = -1;
109  bool all_alt_alleles_same_len(true);
110  auto var_list = var.GetData().GetSet().GetVariations();
111  for (auto iVariation = var_list.begin(); iVariation != var_list.end(); ++iVariation) {
112  if ((*iVariation)->IsSetData() && (*iVariation)->GetData().IsInstance()) {
113  const CVariation_ref::TData::TInstance& VarInst((*iVariation)->GetData().GetInstance());
114  if (!VarInst.CanGetDelta())
115  continue;
116 
117  bool isReference(false);
119  isReference = true;
120  }
121 
123  if ((*iDelta)->CanGetSeq()) {
124  const CDelta_item::C_Seq& DeltaSeq((*iDelta)->GetSeq());
125  switch (DeltaSeq.Which()) {
127  {
128  if (DeltaSeq.GetLiteral().CanGetSeq_data()) {
129  const CSeq_data& Seq_data(DeltaSeq.GetLiteral().GetSeq_data());
130  // variations normally use Iupacna/Iupacaa
131  string sAllele;
132  if (Seq_data.IsIupacna())
133  sAllele = Seq_data.GetIupacna().Get().empty() ? "-" : Seq_data.GetIupacna().Get();
134  if (Seq_data.IsIupacaa())
135  sAllele = Seq_data.GetIupacaa().Get().empty() ? "-" : Seq_data.GetIupacaa().Get();
136 
137  if (!sAllele.empty()) {
138  if(isReference) {
139  ref_allele = sAllele;
140  } else {
141  alt_alleles.push_back(sAllele);
142  int new_allele_len(max(allele_len, (int)DeltaSeq.GetLiteral().GetLength()));
143  if(allele_len != -1 && new_allele_len != allele_len) {
144  all_alt_alleles_same_len = false;
145  }
146  allele_len = new_allele_len;
147  }
148  }
149  }
150  break;
151  }
153  // this can be a deletion
154  if(VarInst.GetType() == CVariation_inst::eType_del) {
155  if(!isReference) {
156  alt_alleles.push_back("-");
157  }
158  }
159  default:
160  // no specific processing for other deltas
161  break;
162  }
163  }
164  }
165  }
166  }
167  tooltip.AddRow("Alleles" + string(alt_alleles.size() > 1 ? "s" : "") + ":", string(ref_allele.empty() ? "-" : ref_allele) + "/" + NStr::Join(alt_alleles, "/"));
168  if (allele_len > 0) {
169  tooltip.AddRow(string(all_alt_alleles_same_len ? "A" : "Longest a") + "llele length:", NStr::NumericToString(allele_len, NStr::fWithCommas));
170  }
171  }
172 
173  if (var.IsSetValidated()) {
174  if (var.GetValidated()) {
175  validation = "Yes";
176  } else {
177  validation = "Fail";
178  }
179  } else if (var.IsSetVariant_prop() && var.GetVariant_prop().IsSetOther_validation()) {
180  if (var.GetVariant_prop().GetOther_validation()) {
181  validation = "Yes";
182  } else {
183  validation = "Fail";
184  }
185  } else if (m_Feat->IsSetExts()) {
186  const CSeq_feat::TExts& exts = m_Feat->GetExts();
187  ITERATE (CSeq_feat::TExts, iter, exts) {
188  if ( (*iter)->GetType().IsStr() &&
189  NStr::EqualNocase((*iter)->GetType().GetStr(), "Validation") &&
190  (*iter)->GetFieldRef("Status") &&
191  (*iter)->GetFieldRef("Status")->GetData().IsStr()) {
192  validation = (*iter)->GetFieldRef("Status")->GetData().GetStr();
193  CConstRef<CUser_field> a_field = (*iter)->GetFieldRef("Addition");
194  if (a_field) {
195  additional_info = a_field->GetData().GetStr();
196  }
197  break;
198  }
199  }
200  }
201 
202  // phenotype and clinical-significance
203  string phenotype = "";
204  string clinical_sig = "";
205  if (var.CanGetPhenotype()) {
206  ITERATE (CVariation_ref::TPhenotype, pnt_iter, var.GetPhenotype()) {
207  if (clinical_sig.empty() && (*pnt_iter)->CanGetClinical_significance()) {
208  clinical_sig = NSnp::ClinSigAsString((*pnt_iter)->GetClinical_significance());
209  }
210 
211  if (phenotype.empty() && (*pnt_iter)->CanGetTerm()) {
212  phenotype = (*pnt_iter)->GetTerm();
213  }
214  }
215  }
216 
217  string sample_sex = "";
218  if (var.CanGetSomatic_origin()) {
220  if ((*so_iter)->CanGetSource() &&
221  (*so_iter)->GetSource().GetSubtype() == CSubSource::eSubtype_sex) {
222  sample_sex = (*so_iter)->GetSource().GetName();
223  break;
224  }
225  }
226  }
227 
228  // allele type
229  string variant_type("Unknown");
230  int multiplier = -1;
231  if(!is_vcf) {
232  if (var.IsComplex()) {
233  variant_type = "Complex";
234  } else if (var.IsInsertion()) {
235  variant_type = "Insertion";
236  } else if (var.IsInversion()) {
237  variant_type = "Inversion";
238  } else if (var.IsEversion()) {
239  variant_type = "Tandem duplication";
240  } else if (var.IsTranslocation()) {
241  variant_type = "Translocation";
242  } else if (var.IsDeletion()) {
243  variant_type = "Deletion";
244  } else if (var.IsDeletionInsertion()) {
245  variant_type = "Indel";
246  } else if (var.IsSNV()) {
247  variant_type = "Single nucleotide variant";
248  } else if (var.IsCNV()) {
249  if (var.GetData().GetInstance().IsSetDelta()) {
252  if ((*iter)->IsSetMultiplier()) {
253  multiplier = (*iter)->GetMultiplier();
254  break;
255  }
256  }
257  }
258  if (is_sv) {
259  variant_type = "Copy number variation";
260  } else {
261  if (var.IsGain()) {
262  variant_type = "Copy number gain";
263  } else if (var.IsLoss()) {
264  variant_type = "Copy number loss";
265  } else {
266  variant_type = "Copy number variation";
267  }
268  }
269  }
270  } else {
271  switch(NSnpGui::GetVcfType(*m_Feat)) {
273  variant_type = "SNV";
274  break;
276  variant_type = "MNP";
277  break;
279  variant_type = "Insertion";
280  break;
282  variant_type = "Deletion";
283  break;
285  variant_type = "Delins";
286  break;
287  }
288  }
289  if (is_sv) {
290  int child_num = s_GetChildNum(*m_Feat);
291  if (child_num == 0) {
292  // sv, but treated as ssv
293  is_sv = false;
294  } else {
295  if (child_num > 0) {
296  tooltip.AddRow("Supporting Variant Calls:", NStr::IntToString(child_num));
297  }
298  tooltip.AddRow("Variant Region Type:", variant_type);
299  if (multiplier > -1) {
300  tooltip.AddRow("Copy Number:", NStr::NumericToString(multiplier));
301  }
302  if ( !phenotype.empty() ) {
303  tooltip.AddRow("Phenotype:", phenotype);
304  }
305  if ( !clinical_sig.empty() ) {
306  tooltip.AddRow("Clinical Interpretation:", clinical_sig);
307  }
308  if ( !sample_sex.empty() ) {
309  tooltip.AddRow("Gender:", sample_sex);
310  }
311  tooltip.AddRow("Validation Status:", validation);
312  if ( !additional_info.empty() ) {
313  tooltip.AddRow("Additional Info:", additional_info);
314  }
315  if (m_Feat->IsSetComment()) {
316  tooltip.AddRow("Comment:", m_Feat->GetComment());
317  }
318 
319  if (m_Location) {
320  tooltip.AddRow("Total Length:", NStr::IntToString(m_Location->GetTotalRange().GetLength(), NStr::fWithCommas));
321  }
322  }
323  }
324 
325  if ( !is_sv ) {
326  if (var.CanGetParent_id()) {
327  string parent;
328  if (var.GetParent_id().GetTag().IsId()) {
329  parent = NStr::IntToString(var.GetParent_id().GetTag().GetId());
330  } else {
331  parent = var.GetParent_id().GetTag().GetStr();
332  }
333  tooltip.AddRow("Parent Variant Region:", parent);
334  }
335 
336  tooltip.AddRow("Variant Call Type:", variant_type);
337  if (multiplier > -1) {
338  tooltip.AddRow("Copy Number:", NStr::NumericToString(multiplier));
339  }
340  if ( !phenotype.empty() ) {
341  tooltip.AddRow("Phenotype:", phenotype);
342  }
343  if ( !clinical_sig.empty() ) {
344  tooltip.AddRow("Clinical Interpretation:", clinical_sig);
345  }
346  if ( !sample_sex.empty() ) {
347  tooltip.AddRow("Gender:", sample_sex);
348  }
349 
350  // inheritance
352  if (var.IsSetAllele_origin()) {
353  org = var.GetAllele_origin();
354  } else if (var.IsSetVariant_prop() && var.GetVariant_prop().IsSetAllele_origin()) {
355  org = var.GetVariant_prop().GetAllele_origin();
356  }
357 
358  if (org > 0) {
359  string inh;
361  inh += "somatic ";
362  }
364  inh += "inherited ";
365  }
367  inh += "paternal ";
368  }
370  inh += "maternal ";
371  }
373  inh += "de_novo ";
374  }
376  inh += "biparental ";
377  }
379  inh += "uniparental ";
380  }
382  inh += "not-tested ";
383  }
385  inh += "tested-inconclusive ";
386  }
388  inh += "other";
389  }
390 
392  inh = "unknown";
393  }
394 
395  tooltip.AddRow("Inheritance:", inh);
396  }
397 
398  // validation status
399  // do not report empty validation status for variations obtained from CVcfReader
400  if(!validation.empty()) {
401  tooltip.AddRow("Validation Status:", validation);
402  }
403  if ( !additional_info.empty() ) {
404  tooltip.AddRow("Additional Info:", additional_info);
405  }
406 
407  if (m_Feat->CanGetComment()) {
408  tooltip.AddRow("Comment:", m_Feat->GetComment());
409  }
410  }
411 
412  int allele_len = -1;
413  if (var.GetData().IsInstance() && var.GetData().GetInstance().IsSetDelta()) {
416  if ((*iter)->IsSetSeq() && (*iter)->GetSeq().IsLiteral()) {
417  allele_len = (*iter)->GetSeq().GetLiteral().GetLength();
418  break;
419  }
420  }
421  }
422  if (allele_len > -1) {
423  tooltip.AddRow("Allele Length:", NStr::NumericToString(allele_len, NStr::fWithCommas));
424  }
425  if (var.CanGetSample_id()) {
426  string sample_id;
427  const CVariation_ref::TSample_id& sid = var.GetSample_id();
428  if (sid.IsStr()) {
429  sample_id = sid.GetStr();
430  } else {
431  sample_id = NStr::NumericToString(sid.GetId());
432  }
433  if ( !sample_id.empty() ) {
434  tooltip.AddRow("Sample id:", sample_id);
435  }
436  }
437 }
438 
439 static const string kBaseUrl = "http://ncbi.nlm.nih.gov/dbvar/";
440 
441 void CGuiObjectInfoVariant::GetLinks(ITooltipFormatter& links, bool no_ncbi_base) const
442 {
443  // maps link names to link urls and labels (allows links with same name to be consolidated)
444  // (I don't see for dbvar that links generally require this, but it was an issue in
445  // CGuiObjectInfoSeq_feat
447  CIRef<ITooltipFormatter> tmp_links = links.CreateInstance();
448 
449  const CVariation_ref& var = m_Feat->GetData().GetVariation();
450  string label, name, url;
451  if (var.CanGetId() && var.GetId().GetTag().IsStr() &&
452  var.GetId().GetTag().GetStr().find("sv") == 1) {
454  } else if (var.CanGetParent_id()) {
455  if (var.GetParent_id().GetTag().IsId()) {
457  } else {
458  label = var.GetParent_id().GetTag().GetStr();
459  }
460  }
461 
462  if ( !label.empty() ) {
463  name = "dbVar";
464  url = kBaseUrl + "variants/" + label;
465  tmp_links->AddLinkRow("dbVar", label, url);
466  }
467 
468  if (m_Feat->IsSetExts()) {
469  ITERATE (CSeq_feat::TExts, iter, m_Feat->GetExts()) {
470  if ((*iter)->GetType().IsStr() &&
471  !(*iter)->GetData().empty()) {
472  name = "Other Variant Calls from this Sample";
473  if ((*iter)->GetType().GetStr() == "related calls") {
474  const CUser_object::TData& fields = (*iter)->GetData();
475  if (fields.size() < 5) {
476  ITERATE (CUser_object::TData, f_iter, fields) {
477  label = (*f_iter)->GetLabel().GetStr();
478  url = kBaseUrl + "variants/" + (*f_iter)->GetData().GetStr();
479  //table_rows += CSeqUtils::CreateLinkRow(name, label, url);
480  link_map[name].push_back(std::pair<string, string>(label, url));
481  }
482  } else if (var.CanGetSample_id()) {
483  string term;
484  if (var.GetSample_id().IsStr()) {
485  term = var.GetSample_id().GetStr();
486  } else {
487  term = NStr::NumericToString(var.GetSample_id().GetId());
488  }
489  CConstRef<CDbtag> study_id = m_Feat->GetNamedDbxref("study_accession");
490  if (study_id) {
491  term += " and " + study_id->GetTag().GetStr();
492  }
493 
494  label = NStr::NumericToString(fields.size());
495  url = kBaseUrl + "?term=" + term;
496  //table_rows += CSeqUtils::CreateLinkRow(name, label, url);
497  link_map[name].push_back(std::pair<string, string>(label, url));
498  }
499  break;
500  } else if ((*iter)->GetType().GetStr() == "related call count") {
501  string term;
502  ITERATE (CUser_object::TData, f_iter, (*iter)->GetData()) {
503  if ((*f_iter)->GetLabel().IsStr() && (*f_iter)->GetData().IsStr()) {
504  label = (*f_iter)->GetLabel().GetStr();
505  term = (*f_iter)->GetData().GetStr();
506  break;
507  }
508  }
509 
510  if ( !term.empty() ) {
511  CConstRef<CDbtag> study_id = m_Feat->GetNamedDbxref("study_accession");
512  if (study_id) {
513  term += " and " + study_id->GetTag().GetStr();
514  }
515  url = kBaseUrl + "?term=" + term;
516  //table_rows += CSeqUtils::CreateLinkRow(name, label, url);
517  link_map[name].push_back(std::pair<string, string>(label, url));
518  }
519  break;
520  }
521  }
522  }
523  }
524 
525  // Create links, consolidating links with same name into a single row
526  map<string, vector<pair<string, string> > >::iterator iter;
527  for (iter=link_map.begin(); iter != link_map.end(); ++iter) {
528  string table_rows;
529 
530  for (size_t i=0; i<(*iter).second.size(); ++i) {
531  // This gives a separate row to each link:
532  //tmp_links += CSeqUtils::CreateLinkRow((*iter).first, (*uiter).first, (*uiter).second);
533  if (i>0) table_rows += ",&nbsp;";
534  table_rows += tmp_links->CreateLink((*iter).second[i].first, (*iter).second[i].second);
535  }
536  tmp_links->AddLinkRow((*iter).first, table_rows, 250);
537  }
538 
539  if ( !tmp_links->IsEmpty()) {
540  links.AddLinksTitle("Go To");
541  links.Append(*tmp_links);
542  }
543 }
544 
545 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void GetLabel(string *label) const
Definition: Dbtag.cpp:187
virtual void GetLinks(ITooltipFormatter &links, bool no_ncbi_base) const
Get a set of links.
virtual string GetSubtype() const
virtual void GetToolTip(ITooltipFormatter &tooltip, string &t_title, TSeqPos at_p=(TSeqPos) -1, bool *isGeneratedBySvc=NULL) const
Get tooltip.
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Return a field reference representing the tokenized key, or a NULL reference if the key doesn't exist...
Definition: User_field.cpp:226
CVariation_inst –.
TValidated GetValidated(void) const
bool IsLoss() const
bool IsSetAllele_origin(void) const
TAllele_origin GetAllele_origin(void) const
bool IsComplex() const
bool IsEversion() const
bool IsDeletionInsertion() const
bool IsGain() const
bool IsSetValidated(void) const
bool IsTranslocation() const
bool IsInversion() const
bool IsInsertion() const
bool IsDeletion() const
bool IsSNV() const
bool IsCNV() const
primitive interface to arrange tabular data in the tooltips
Definition: tooltip.hpp:55
static string ClinSigAsString(const CVariation_ref &var, ELetterCase LetterCase=eLetterCase_Mixed)
get a human-readable text for various clinical significance types
Definition: snp_utils.cpp:172
const_iterator begin() const
Definition: map.hpp:151
const_iterator end() const
Definition: map.hpp:152
Definition: map.hpp:338
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
Definition: label.cpp:140
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
virtual CIRef< ITooltipFormatter > CreateInstance()=0
creates another instance of the same tooltip formatter
virtual void AddLinksTitle(const string &sTitle)=0
add a row with the links title
CRef< objects::CScope > m_Scope
static bool isFromVcf(const CSeq_feat &variation_ref)
Definition: snp_gui.cpp:719
CConstRef< objects::CSeq_feat > m_Feat
static CVariation_inst::EType GetVcfType(const CSeq_feat &variation_ref)
Definition: snp_gui.cpp:750
virtual void Append(const ITooltipFormatter &tooltip)=0
appends another formatter to this one
CConstRef< objects::CSeq_loc > m_Location
Mapped location in top sequence coordinate (can be set externally).
@ eContent
Definition: label.hpp:62
const TPrim & Get(void) const
Definition: serialbase.hpp:347
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
#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 kEmptyStr
Definition: ncbistr.hpp:123
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
Definition: ncbistr.cpp:630
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5084
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
Definition: ncbistr.hpp:673
@ fWithCommas
Use commas as thousands separator.
Definition: ncbistr.hpp:254
static const char label[]
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
Definition: Object_id_.hpp:291
const TTag & GetTag(void) const
Get the Tag member data.
Definition: Dbtag_.hpp:267
bool IsId(void) const
Check if variant Id is selected.
Definition: Object_id_.hpp:264
const TData & GetData(void) const
Get the Data member data.
const TDb & GetDb(void) const
Get the Db member data.
Definition: Dbtag_.hpp:220
const TStr & GetStr(void) const
Get the variant data.
Definition: Object_id_.hpp:297
vector< CRef< CUser_field > > TData
TId GetId(void) const
Get the variant data.
Definition: Object_id_.hpp:270
list< CRef< CUser_object > > TExts
Definition: Seq_feat_.hpp:127
const TIupacaa & GetIupacaa(void) const
Get the variant data.
Definition: Seq_data_.hpp:530
bool IsIupacaa(void) const
Check if variant Iupacaa is selected.
Definition: Seq_data_.hpp:524
const TIupacna & GetIupacna(void) const
Get the variant data.
Definition: Seq_data_.hpp:510
TLength GetLength(void) const
Get the Length member data.
bool CanGetSeq_data(void) const
Check if it is safe to call GetSeq_data method.
bool IsIupacna(void) const
Check if variant Iupacna is selected.
Definition: Seq_data_.hpp:504
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
TType GetType(void) const
Get the Type member data.
const TInstance & GetInstance(void) const
Get the variant data.
const TVariant_prop & GetVariant_prop(void) const
Get the Variant_prop member data.
E_Choice Which(void) const
Which variant is currently selected.
TObservation GetObservation(void) const
Get the Observation member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSetDelta(void) const
Sequence that replaces the location, in biological order.
bool IsSetVariant_prop(void) const
variant properties bit fields Check if a value has been assigned to Variant_prop data member.
const TSample_id & GetSample_id(void) const
Get the Sample_id member data.
list< CRef< CPhenotype > > TPhenotype
bool IsSetAllele_origin(void) const
Check if a value has been assigned to Allele_origin data member.
const TId & GetId(void) const
Get the Id member data.
const TDelta & GetDelta(void) const
Get the Delta member data.
list< CRef< C_E_Somatic_origin > > TSomatic_origin
const TData & GetData(void) const
Get the Data member data.
const TPhenotype & GetPhenotype(void) const
Get the Phenotype member data.
bool CanGetSomatic_origin(void) const
Check if it is safe to call GetSomatic_origin method.
bool CanGetDelta(void) const
Check if it is safe to call GetDelta method.
bool IsInstance(void) const
Check if variant Instance is selected.
TOther_validation GetOther_validation(void) const
Get the Other_validation member data.
const TLiteral & GetLiteral(void) const
Get the variant data.
const TSomatic_origin & GetSomatic_origin(void) const
Get the Somatic_origin member data.
bool CanGetObservation(void) const
Check if it is safe to call GetObservation method.
bool IsSet(void) const
Check if variant Set is selected.
const TParent_id & GetParent_id(void) const
Get the Parent_id member data.
list< CRef< CDelta_item > > TDelta
bool IsSetOther_validation(void) const
has this variant been validated? While a boolean flag offers no subtle distinctions of validation met...
bool CanGetParent_id(void) const
Check if it is safe to call GetParent_id method.
bool IsSetVariations(void) const
Check if a value has been assigned to Variations data member.
bool IsSetId(void) const
ids (i.e., SNP rsid / ssid, dbVar nsv/nssv) expected values include 'dbSNP|rs12334',...
bool CanGetSample_id(void) const
Check if it is safe to call GetSample_id method.
bool CanGetPhenotype(void) const
Check if it is safe to call GetPhenotype method.
bool CanGetId(void) const
Check if it is safe to call GetId method.
const TVariations & GetVariations(void) const
Get the Variations member data.
TAllele_origin GetAllele_origin(void) const
Get the Allele_origin member data.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
@ eType_snv
delta=[morph of length 1] NOTE: this is snV not snP; the latter requires frequency-based validation t...
@ eType_mnp
delta=[morph of length >1]
@ eType_delins
delta=[del, ins]
@ eAllele_origin_other
stopper - 2^31
@ e_This
same location as variation-ref itself
@ eObservation_reference
inst represents the reference base at the position
USING_SCOPE(objects)
static const string kBaseUrl
static int s_GetChildNum(const objects::CSeq_feat &feat)
int i
T max(T x_, T y_)
Int4 delta(size_t dimension_, const Int4 *score_)
bool is_sv
Definition: stress32.cpp:37869
Modified on Wed Apr 17 13:08:22 2024 by modify_doxy.py rev. 669887