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

Go to the SVN repository for this file.

1 /* $Id: desktop_typed_items.cpp 39282 2017-09-01 20:08:59Z asztalos $
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: Andrea Asztalos
27 *
28 * File Description:
29 *
30 */
31 
32 #include <ncbi_pch.hpp>
33 #include <serial/typeinfo.hpp>
36 #include <objects/seq/Pubdesc.hpp>
38 #include <objects/general/Date.hpp>
47 #include <objmgr/util/sequence.hpp>
48 #include <objmgr/align_ci.hpp>
49 
51 
54 
56  : m_Bsh(bsh)
57 {
58  _ASSERT(m_Bsh);
59  m_Color = *wxRED;
60  if (m_Bsh.IsAa()) {
61  m_Color.Set(255, 0, 255);
62  }
63 }
64 
65 static const CTempString kSpaces(" ");
66 
68 {
69  string descr;
70  if (m_Bsh.IsSetInst()) {
71  const CSeq_inst& inst = m_Bsh.GetInst();
72  descr = CSeq_inst::ENUM_METHOD_NAME(ERepr)()->FindName(inst.GetRepr(), true);
73  descr += ", " + CSeq_inst::ENUM_METHOD_NAME(EMol)()->FindName(inst.GetMol(), true);
74  descr += ", length = " + NStr::NumericToString(inst.GetLength());
75  }
76 
78  string name;
79  best_idh.GetSeqId()->GetLabel(&name, CSeq_id::eBoth);
80 
81  TLines lines;
82  if (root) {
83  lines.push_back(kSpaces + "Bioseq: " + descr);
84  lines.push_back(kSpaces + name);
85  }
86  else {
87  lines.push_back(kSpaces + name);
88  lines.push_back(kSpaces + kSpaces + descr);
89  }
90 
91  return lines;
92 }
93 
94 
95 const string& CDesktopBioseqItem::GetType() const
96 {
97  return CBioseq::GetTypeInfo()->GetName();
98 }
99 
101 {
102  CConstRef<CBioseq> bseq = m_Bsh.GetCompleteBioseq();
103  return bseq.GetPointerOrNull();
104 }
105 
107 {
108  return m_Bsh.GetSeq_entry_Handle();
109 }
110 
111 // CDesktopBioseqsetItem
112 
114  : m_Bssh(bssh)
115 {
116  _ASSERT(m_Bssh);
117  x_SetBrush();
118 }
119 
121 {
122  CBioseq_set::EClass bioseq_set_class =
123  GET_FIELD_OR_DEFAULT(*m_Bssh.GetCompleteBioseq_set(), Class, CBioseq_set::eClass_not_set);
124  const string classString = CBioseq_set::ENUM_METHOD_NAME(EClass)()->FindName(bioseq_set_class, true);
125 
126  if (!root) {
127  return TLines{ kSpaces + classString };
128  }
129 
130  // get first bioseq within the set
131  CBioseq_CI b_iter(m_Bssh);
132  string name;
133  if (b_iter) {
135  best_idh.GetSeqId()->GetLabel(&name, CSeq_id::eBoth);
136  }
137  else {
138  name.assign("empty bioseqset");
139  }
140 
141  TLines lines;
142  lines.push_back(kSpaces + "BioseqSet: " + classString);
143  lines.push_back(kSpaces + name);
144  return lines;
145 }
146 
147 const string& CDesktopBioseqsetItem::GetType() const
148 {
149  return CBioseq_set::GetTypeInfo()->GetName();
150 }
151 
153 {
154  CConstRef<CBioseq_set> bset = m_Bssh.GetCompleteBioseq_set();
155  return bset.GetPointerOrNull();
156 }
157 
159 {
160  return m_Bssh.GetParentEntry();
161 }
162 
164 {
165  m_BkgdBrush = *wxTRANSPARENT_BRUSH;
166  int col = 255;
167  switch (m_Bssh.GetClass()) {
169  col = 158;
170  break;
172  col = 195;
173  break;
175  col = 210;
176  break;
177  default:
178  col = 162 + (int)(m_Bssh.GetClass());
179  break;
180  }
181  m_BkgdBrush.SetColour(wxColour(col, col, col));
182  m_BkgdBrush.SetStyle(wxBRUSHSTYLE_SOLID);
183 }
184 
185 // CDesktopSeqSubmitItem
186 
188 {
189  string label = kSpaces + "SeqSubmit: ";
190  if (m_Submit->IsEntrys()) {
191  label += "Entries ";
192  }
193  else if (m_Submit->IsAnnots()) {
194  label += "Annotations ";
195  }
196  else if (m_Submit->IsDelete()) {
197  label += "Deletions ";
198  }
199  else {
200  label += "Not Set ";
201  }
202 
203  TLines lines;
204  lines.push_back(label);
205 
206  if (m_Submit->IsSetSub()) {
207  if (m_Submit->GetSub().IsSetContact()) {
208  if (m_Submit->GetSub().GetContact().IsSetContact()) {
209  const CAuthor& author = m_Submit->GetSub().GetContact().GetContact();
210  if (author.IsSetName()) {
211  string name;
212  author.GetName().GetLabel(&name);
213  lines.push_back(kSpaces + name);
214  }
215  }
216  }
217  }
218  return lines;
219 }
220 
221 const string& CDesktopSeqSubmitItem::GetType() const
222 {
223  return CSeq_submit::GetTypeInfo()->GetName();
224 }
225 
227 {
228  return m_Submit.GetPointerOrNull();
229 }
230 
232 {
233  if (m_Submit->IsEntrys()) {
234  const CSeq_submit::TData::TEntrys& entries = m_Submit->GetData().GetEntrys();
235  if (!entries.empty()) {
236  return m_Scope->GetSeq_entryHandle(**entries.begin());
237  }
238  }
239  return CSeq_entry_Handle();
240 }
241 
242 // CDesktopContactInfoItem
243 
245 {
246  string label;
247  if (m_Contact->IsSetContact()) {
248  const CAuthor& author = m_Contact->GetContact();
249  if (author.IsSetName()) {
250  author.GetName().GetLabel(&label);
251  }
252  }
253  return TLines{ kSpaces + "Contact Info: " + label };
254 }
255 
256 const string& CDesktopContactInfoItem::GetType() const
257 {
258  return CContact_info::GetTypeInfo()->GetName();
259 }
260 
262 {
263  return m_Contact.GetPointerOrNull();
264 }
265 
267 {
268  return m_Submit->GetSub();
269 }
270 
272 {
273  if (m_Submit->IsEntrys()) {
274  const CSeq_submit::TData::TEntrys& entries = m_Submit->GetData().GetEntrys();
275  if (!entries.empty()) {
276  return m_Scope->GetSeq_entryHandle(**entries.begin());
277  }
278  }
279  return CSeq_entry_Handle();
280 }
281 
282 // CDesktopCitSubItem
283 
285 {
286  string label;
287  m_CitSub->GetLabel(&label);
288  return TLines{ kSpaces + "Cit: " + label };
289 }
290 
291 const string& CDesktopCitSubItem::GetType() const
292 {
293  return CCit_sub::GetTypeInfo()->GetName();
294 }
295 
297 {
298  return m_CitSub.GetPointerOrNull();
299 }
300 
302 {
303  return m_Submit->GetSub();
304 }
305 
307  {
308  if (m_Submit->IsEntrys()) {
309  const CSeq_submit::TData::TEntrys& entries = m_Submit->GetData().GetEntrys();
310  if (!entries.empty()) {
311  return m_Scope->GetSeq_entryHandle(**entries.begin());
312  }
313  }
314  return CSeq_entry_Handle();
315  }
316 
317 // CDesktopSeqdescItem
318 
320 {
321  switch (m_Seqdesc->Which()) {
322  case CSeqdesc::e_Title:
323  return TLines{ kSpaces + "Title: " + m_Seqdesc->GetTitle() };
324  case CSeqdesc::e_Source:
325  return TLines{ kSpaces + "BioSrc: " +
326  (m_Seqdesc->GetSource().IsSetTaxname() ? m_Seqdesc->GetSource().GetTaxname() : kEmptyStr) };
327  case CSeqdesc::e_Molinfo:
328  {
329  string label;
330  m_Seqdesc->GetMolinfo().GetLabel(&label);
331  return TLines{ kSpaces + "MolInfo: " + label };
332  }
333  case CSeqdesc::e_User:
334  return s_GetDescription(m_Seqdesc->GetUser());
335  case CSeqdesc::e_Pub:
336  {
337  string label;
338  m_Seqdesc->GetPub().GetPub().GetLabel(&label);
339  return TLines{ kSpaces + "Pub: " + label };
340  }
342  {
343  string label;
344  m_Seqdesc->GetUpdate_date().GetDate(&label);
345  return TLines{ kSpaces + "UpdateDate: " + label };
346  }
348  {
349  string label = (ENUM_METHOD_NAME(EGIBB_mol)()->FindName(m_Seqdesc->GetMol_type(), true));
350  return TLines{ kSpaces + "MolType: " + label };
351  }
352  case CSeqdesc::e_Modif:
353  return s_GetDescription(m_Seqdesc->GetModif());
354  case CSeqdesc::e_Method:
355  {
356  string label = (ENUM_METHOD_NAME(EGIBB_method)()->FindName(m_Seqdesc->GetMethod(), true));
357  return TLines{ kSpaces + "Method: " + label };
358  }
359  case CSeqdesc::e_Name:
360  return TLines{ kSpaces + "Name: " + m_Seqdesc->GetName() };
361  case CSeqdesc::e_Org:
362  return s_GetDescription(m_Seqdesc->GetOrg());
363  case CSeqdesc::e_Comment:
364  return TLines{ kSpaces + "Comment: " + m_Seqdesc->GetComment() };
365  case CSeqdesc::e_Num:
366  return TLines{ kSpaces + "Num: " + kSpaces };;
367  case CSeqdesc::e_Maploc:
368  {
369  string label;
370  m_Seqdesc->GetMaploc().GetLabel(&label);
371  return TLines{ kSpaces + "MapLoc: " + label };
372  }
373  case CSeqdesc::e_Pir:
374  return TLines{ kSpaces + "PIR: " + kSpaces };
375  case CSeqdesc::e_Genbank:
376  return TLines{ kSpaces + "Genbank: " + kSpaces };
377  case CSeqdesc::e_Region:
378  return TLines{ kSpaces + "Region: " + m_Seqdesc->GetRegion() };
379  case CSeqdesc::e_Sp:
380  return TLines{ kSpaces + "SP: " + kSpaces };
381  case CSeqdesc::e_Dbxref:
382  {
383  string label;
384  m_Seqdesc->GetDbxref().GetLabel(&label);
385  return TLines{ kSpaces + "Dbxref: " + label };
386  }
387  case CSeqdesc::e_Embl:
388  return TLines{ kSpaces + "EMBL: " + kSpaces };
390  {
391  string label;
392  m_Seqdesc->GetCreate_date().GetDate(&label);
393  return TLines{ kSpaces + "CreateDate: " + label };
394  }
395  case CSeqdesc::e_Prf:
396  return TLines{ kSpaces + "PRF: " + kSpaces };
397  case CSeqdesc::e_Pdb:
398  return TLines{ kSpaces + "PDB: " + kSpaces };
399  case CSeqdesc::e_Het:
400  return TLines{ kSpaces + "Heterogen: " + m_Seqdesc->GetHet() };
401  case CSeqdesc::e_Modelev:
402  return TLines{ kSpaces + "ModelEv: " + kSpaces };
403  default:
404  break;
405  }
406  return TLines{ "unrecognized descriptor" };
407 }
408 
410 {
411  string label = (user_obj.CanGetClass() ? user_obj.GetClass()
412  : (user_obj.GetType().IsStr() ? user_obj.GetType().GetStr() : kEmptyStr));
413  return TLines{ kSpaces + "UserObj: " + label };
414 }
415 
417 {
418  string label = (org.CanGetTaxname() ? org.GetTaxname() : (org.CanGetCommon() ? org.GetCommon() : kEmptyStr));
419  return TLines{ kSpaces + "Org: " + label };
420 }
421 
423 {
424  string label;
425  for (auto& it : modif) {
426  label += ENUM_METHOD_NAME(EGIBB_mod)()->FindName(it, true) + ", ";
427  }
428  label = label.substr(0, label.size() - 2);
429  return TLines{ kSpaces + "Modif: " + label };
430 }
431 
432 const string& CDesktopSeqdescItem::GetType() const
433 {
434  return CSeqdesc::GetTypeInfo()->GetName();
435 }
436 
438 {
439  return m_Seqdesc.GetPointerOrNull();
440 }
441 
442 // CDesktopAnnotItem
443 
445  : m_Annoth(annoth), m_Colour(*wxBLUE)
446 {
447  bool contains_farpointers = false;
448  for (CAlign_CI align_it(m_Annoth); align_it && !contains_farpointers; ++align_it) {
449  CSeq_align_Handle ah = align_it.GetSeq_align_Handle();
450  contains_farpointers = CDesktopAlignItem::s_ContainsFarPointers(ah);
451  }
452 
453  if (contains_farpointers) {
454  m_Colour.Set(0x00458B00);
455  }
456 }
457 
459 {
460  const CSeq_annot& annot = *m_Annoth.GetCompleteSeq_annot();
461  if (!annot.IsSetData()){
462  return TLines{ "No annotation data" };
463  }
464 
465  switch (annot.GetData().Which()) {
467  return TLines{ " Feature Table" };
469  return TLines{ " Alignments" };
471  return TLines{ " Graphs" };
472  default:
473  break;
474  }
475 
476  return TLines{ " Other annotation" };
477 }
478 
479 const string& CDesktopAnnotItem::GetType() const
480 {
481  return CSeq_annot::GetTypeInfo()->GetName();
482 }
483 
485 {
486  CConstRef<CSeq_annot> annot = m_Annoth.GetCompleteSeq_annot();
487  return annot.GetPointerOrNull();
488 }
489 
491 {
492  return m_Annoth.GetParentEntry();
493 }
494 
495 // CDesktopFeatItem
496 
497 static const string& s_GetProtRefName(const CProt_ref& prot)
498 {
499  if (prot.IsSetName() && !prot.GetName().empty()) {
500  return prot.GetName().front();
501  }
502  else {
503  return kEmptyStr;
504  }
505 }
506 
508 {
509  if (fh.IsSetProduct()) {
511  if (prot) {
513  if (feat_it) {
514  return s_GetProtRefName(feat_it->GetData().GetProt());
515  }
516  }
517  }
518  if (fh.IsSetXref()) {
519  for (auto& it : fh.GetXref()) {
520  if (it->IsSetData() && it->GetData().IsProt()) {
521  return s_GetProtRefName(it->GetData().GetProt());
522  }
523  }
524  }
525  return kEmptyStr;
526 }
527 
529 {
530  // get the location label
531  string loc_label;
532  m_Feath.GetLocation().GetLabel(&loc_label);
533 
534  TLines lines;
535  if (m_Feath.GetData().IsCdregion()) {
536  const string& prot_name = s_GetProteinName(m_Feath);
537  if (!prot_name.empty()) {
538  string prod_label;
539  if (m_Feath.IsSetProduct()) {
540  m_Feath.GetProduct().GetLabel(&prod_label);
541  }
542  lines.push_back(kSpaces + "CDS: " + prot_name);
543  lines.push_back(kSpaces + kSpaces + loc_label + "\n" + kSpaces + kSpaces + "product: " + prod_label);
544  return lines;
545  }
546  // else, treat CDS as any other feature
547  }
548 
549  string feat_label;
550  feature::GetLabel(*m_Feath.GetOriginalSeq_feat(), &feat_label, feature::eBoth);
551  lines.push_back(kSpaces + feat_label);
552  lines.push_back(kSpaces + kSpaces + loc_label);
553  return lines;
554 }
555 
556 const string& CDesktopFeatItem::GetType() const
557 {
558  return CSeq_feat::GetTypeInfo()->GetName();
559 }
560 
562 {
563  CConstRef<CSeq_feat> feat = m_Feath.GetOriginalSeq_feat();
564  return feat.GetPointerOrNull();
565 }
566 
568 {
569  CBioseq_Handle bsh = m_Feath.GetScope().GetBioseqHandle(m_Feath.GetLocationId());
570  return (bsh) ? bsh.GetSeq_entry_Handle() : CSeq_entry_Handle();
571 }
572 
573 
574 // CDesktopAlignItem
575 
577  : m_Alignh(ah), m_Colour(*wxBLUE)
578 {
580  // if it contains far pointers color the text in green
581  // as well as the annotation containing this alignment
582  m_Colour.SetRGB(0x00458B00);
583  }
584 }
585 
587 {
588  bool contains_farpointer = false;
589 
590  const CSeq_annot_Handle& annoth = ah.GetAnnot();
591  CSeq_entry_Handle seh = annoth.GetTopLevelEntry();
592  const CSeq_align& align = *ah.GetSeq_align();
593 
594  if (align.IsSetDim()) {
595  for (CSeq_align::TDim row = 0; !contains_farpointer && row < align.GetDim(); ++row) {
596  CRef<CSeq_loc> loc_row = align.CreateRowSeq_loc(row);
597  if (validator::IsFarLocation(*loc_row, seh)) {
598  contains_farpointer = true;
599  }
600  }
601  }
602  return contains_farpointer;
603 }
604 
606 {
607  string label = kSpaces + "SeqAlign: ";
608  const CSeq_align& align = *m_Alignh.GetSeq_align();
609 
610  if (align.IsSetDim()) {
611  for (CSeq_align::TDim row = 0; row < 3 && row < align.GetDim(); ++row) {
612  label += align.GetSeq_id(row).GetSeqIdString(true);
613  label += ", ";
614  }
615  label.pop_back();
616  label += "...";
617  }
618  return TLines{ label };
619 }
620 
621 const string& CDesktopAlignItem::GetType() const
622 {
623  return CSeq_align::GetTypeInfo()->GetName();
624 }
625 
627 {
628  CConstRef<CSeq_align> align = m_Alignh.GetSeq_align();
629  return align.GetPointerOrNull();
630 }
631 
633 {
634  const CSeq_annot_Handle& annoth = m_Alignh.GetAnnot();
635  return (annoth) ? annoth.GetParentEntry() : CSeq_entry_Handle();
636 }
637 
638 
639 // CDesktopGraphItem
640 
642 {
643  string label;
644  const CSeq_graph& graph = *m_Graphh.GetSeq_graph();
645  graph.GetLoc().GetLabel(&label);
646  return TLines{ kSpaces + "SeqGraph: " + label };
647 }
648 
649 const string& CDesktopGraphItem::GetType() const
650 {
651  return CSeq_graph::GetTypeInfo()->GetName();
652 }
653 
655 {
656  CConstRef<CSeq_graph> graph = m_Graphh.GetSeq_graph();
657  return graph.GetPointerOrNull();
658 }
659 
661 {
662  const CSeq_annot_Handle& annoth = m_Graphh.GetAnnot();
663  return (annoth) ? annoth.GetParentEntry() : CSeq_entry_Handle();
664 }
665 
667 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eBoth
Both preliminary and traceback stages.
Definition: blast_def.h:332
CAlign_CI –.
Definition: align_ci.hpp:63
CAuthor –.
Definition: Author.hpp:59
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
CBioseq_set_Handle –.
virtual const string & GetType() const
CDesktopAlignItem(const objects::CSeq_align_Handle &ah)
objects::CSeq_align_Handle m_Alignh
virtual TLines GetDescription(bool root=false) const
static bool s_ContainsFarPointers(const objects::CSeq_align_Handle &ah)
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const CObject * GetObject(void) const
virtual const CObject * GetObject(void) const
objects::CSeq_annot_Handle m_Annoth
virtual TLines GetDescription(bool root=false) const
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const string & GetType() const
CDesktopAnnotItem(const objects::CSeq_annot_Handle &annoth)
CDesktopBioseqItem(const objects::CBioseq_Handle &bsh)
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
objects::CBioseq_Handle m_Bsh
virtual TLines GetDescription(bool root=false) const
virtual const string & GetType() const
virtual const CObject * GetObject(void) const
virtual const CObject * GetObject(void) const
CDesktopBioseqsetItem(const objects::CBioseq_set_Handle &bssh)
virtual TLines GetDescription(bool root=false) const
virtual const string & GetType() const
objects::CBioseq_set_Handle m_Bssh
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const string & GetType() const
CConstRef< objects::CCit_sub > m_CitSub
CRef< objects::CScope > m_Scope
CConstRef< objects::CSeq_submit > m_Submit
const objects::CSubmit_block & GetSubmitBlock() const
virtual TLines GetDescription(bool root=false) const
virtual const CObject * GetObject(void) const
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const CObject * GetObject(void) const
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
CConstRef< objects::CSeq_submit > m_Submit
CConstRef< objects::CContact_info > m_Contact
CRef< objects::CScope > m_Scope
virtual TLines GetDescription(bool root=false) const
virtual const string & GetType() const
const objects::CSubmit_block & GetSubmitBlock() const
virtual const string & GetType() const
virtual const CObject * GetObject(void) const
virtual TLines GetDescription(bool root=false) const
objects::CSeq_feat_Handle m_Feath
static const string & s_GetProteinName(const objects::CSeq_feat_Handle &fh)
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const CObject * GetObject(void) const
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual TLines GetDescription(bool root=false) const
virtual const string & GetType() const
objects::CSeq_graph_Handle m_Graphh
virtual const string & GetType() const
virtual TLines GetDescription(bool root=false) const
CRef< objects::CScope > m_Scope
CConstRef< objects::CSeq_submit > m_Submit
virtual const CObject * GetObject(void) const
virtual objects::CSeq_entry_Handle GetSeqentryHandle() const
virtual const CObject * GetObject(void) const
CConstRef< objects::CSeqdesc > m_Seqdesc
virtual TLines GetDescription(bool root=false) const
virtual const string & GetType() const
static TLines s_GetDescription(const objects::CUser_object &user_obj)
CFeat_CI –.
Definition: feat_ci.hpp:64
CObject –.
Definition: ncbiobj.hpp:180
void GetLabel(string *label, ETypeLabel type=eGenbank) const
Definition: Person_id.cpp:57
CRef< CSeq_loc > CreateRowSeq_loc(TDim row) const
Definition: Seq_align.cpp:2028
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
Definition: Seq_align.cpp:317
CSeq_annot_Handle –.
CSeq_entry_Handle –.
CSeq_feat_Handle –.
CSubmit_block –.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
vector< string > TLines
USING_SCOPE(objects)
static const string & s_GetProtRefName(const CProt_ref &prot)
static const CTempString kSpaces(" ")
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
Definition: Seq_id.cpp:2145
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
Definition: Seq_id.cpp:2040
CConstRef< CSeq_id > GetSeqId(void) const
string GetLabel(const CSeq_id &id)
@ eBoth
Type and content, delimited by a vertical bar.
Definition: Seq_id.hpp:606
void GetLabel(string *label) const
Appends a label suitable for display (e.g., error messages) label must point to an existing string ob...
Definition: Seq_loc.cpp:3467
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
Definition: sequence.hpp:101
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
const CSeq_feat::TXref & GetXref(void) const
const CSeqFeatData & GetData(void) const
bool IsSetXref(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
virtual const CSeq_loc & GetProduct(void) const
bool IsSetProduct(void) const
CConstRef< CSeq_align > GetSeq_align(void) const
Get const reference to current seq-align.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
CScope & GetScope(void) const
Get scope this handle belongs to.
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to the seq-annot.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
TObjectType * GetPointerOrNull(void) const THROWS_NONE
Get pointer value.
Definition: ncbiobj.hpp:1672
#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 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
static const char label[]
const TName & GetName(void) const
Get the Name member data.
Definition: Author_.hpp:352
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
Definition: Author_.hpp:340
bool IsStr(void) const
Check if variant Str is selected.
Definition: Object_id_.hpp:291
bool CanGetClass(void) const
Check if it is safe to call GetClass method.
const TClass & GetClass(void) const
Get the Class member data.
const TStr & GetStr(void) const
Get the variant data.
Definition: Object_id_.hpp:297
const TType & GetType(void) const
Get the Type member data.
bool CanGetCommon(void) const
Check if it is safe to call GetCommon method.
Definition: Org_ref_.hpp:413
const TTaxname & GetTaxname(void) const
Get the Taxname member data.
Definition: Org_ref_.hpp:372
const TCommon & GetCommon(void) const
Get the Common member data.
Definition: Org_ref_.hpp:419
bool CanGetTaxname(void) const
Check if it is safe to call GetTaxname method.
Definition: Org_ref_.hpp:366
TDim GetDim(void) const
Get the Dim member data.
Definition: Seq_align_.hpp:856
bool IsSetDim(void) const
dimensionality Check if a value has been assigned to Dim data member.
Definition: Seq_align_.hpp:837
const TProt & GetProt(void) const
Get the variant data.
const TLoc & GetLoc(void) const
Get the Loc member data.
Definition: Seq_graph_.hpp:869
@ eClass_nuc_prot
nuc acid and coded proteins
Definition: Bioseq_set_.hpp:99
@ eClass_genbank
converted genbank
TRepr GetRepr(void) const
Get the Repr member data.
Definition: Seq_inst_.hpp:565
EGIBB_method
sequencing methods
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
Definition: Seq_annot_.hpp:861
TLength GetLength(void) const
Get the Length member data.
Definition: Seq_inst_.hpp:659
list< EGIBB_mod > TModif
Definition: Seqdesc_.hpp:191
TMol GetMol(void) const
Get the Mol member data.
Definition: Seq_inst_.hpp:612
EGIBB_mod
GenInfo Backbone modifiers.
Definition: GIBB_mod_.hpp:64
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_annot_.hpp:873
EGIBB_mol
type of molecule represented
Definition: GIBB_mol_.hpp:64
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_annot_.hpp:586
@ e_Embl
EMBL specific information.
Definition: Seqdesc_.hpp:127
@ e_Het
cofactor, etc associated but not bound
Definition: Seqdesc_.hpp:132
@ e_Org
if all from one organism
Definition: Seqdesc_.hpp:116
@ e_Num
a numbering system
Definition: Seqdesc_.hpp:118
@ e_User
user defined object
Definition: Seqdesc_.hpp:124
@ e_Update_date
date of last update
Definition: Seqdesc_.hpp:129
@ e_Pub
a reference to the publication
Definition: Seqdesc_.hpp:122
@ e_Pir
PIR specific info.
Definition: Seqdesc_.hpp:120
@ e_Genbank
GenBank specific info.
Definition: Seqdesc_.hpp:121
@ e_Prf
PRF specific information.
Definition: Seqdesc_.hpp:130
@ e_Mol_type
type of molecule
Definition: Seqdesc_.hpp:111
@ e_Sp
SWISSPROT specific info.
Definition: Seqdesc_.hpp:125
@ e_Dbxref
xref to other databases
Definition: Seqdesc_.hpp:126
@ e_Comment
a more extensive comment
Definition: Seqdesc_.hpp:117
@ e_Method
sequencing method
Definition: Seqdesc_.hpp:113
@ e_Modelev
model evidence for XM records
Definition: Seqdesc_.hpp:135
@ e_Region
overall region (globin locus)
Definition: Seqdesc_.hpp:123
@ e_Molinfo
info on the molecule and techniques
Definition: Seqdesc_.hpp:134
@ e_Modif
modifiers
Definition: Seqdesc_.hpp:112
@ e_Maploc
map location of this sequence
Definition: Seqdesc_.hpp:119
@ e_Create_date
date entry first created/released
Definition: Seqdesc_.hpp:128
@ e_Title
a title for this sequence
Definition: Seqdesc_.hpp:115
@ e_Pdb
PDB specific information.
Definition: Seqdesc_.hpp:131
@ e_Name
a name for this sequence
Definition: Seqdesc_.hpp:114
@ e_Source
source of materials, includes Org-ref
Definition: Seqdesc_.hpp:133
list< CRef< CSeq_entry > > TEntrys
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
bool IsFarLocation(const CSeq_loc &loc, const CSeq_entry_Handle &seh)
Definition: utilities.cpp:159
Generic utility macros and templates for exploring NCBI objects.
#define GET_FIELD_OR_DEFAULT(Var, Fld, Dflt)
GET_FIELD_OR_DEFAULT base macro.
#define row(bind, expected)
Definition: string_bind.c:73
#define _ASSERT
static wxAcceleratorEntry entries[3]
Modified on Sun May 05 05:15:57 2024 by modify_doxy.py rev. 669887