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

Go to the SVN repository for this file.

1 /* $Id: text_object_description.cpp 94996 2021-09-27 14:11:38Z grichenk $
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 * Author: Sema Kachalo
27 *
28 * File Description:
29 * Getting text description for CSeq_feat / CSeqdesc / CBioseq / CBioseq_set objects
30 */
31 
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbistd.hpp>
34 #include <objects/general/Date.hpp>
39 #include <objects/seq/MolInfo.hpp>
40 #include <objects/seq/Pubdesc.hpp>
41 #include <objects/seq/Seqdesc.hpp>
47 #include <objmgr/bioseq_ci.hpp>
48 #include <objmgr/util/sequence.hpp>
50 
51 
55 
57 {
58  return id.Which() == CSeq_id::e_Genbank
59  || id.Which() == CSeq_id::e_Ddbj
60  || id.Which() == CSeq_id::e_Embl
61  || id.Which() == CSeq_id::e_Other;
62 }
63 
64 
65 static CConstRef<CSeq_id> GetBestId(const CBioseq& bioseq)
66 {
67  const CBioseq::TId& seq_id_ls = bioseq.GetId();
68  CConstRef<CSeq_id> best_seq_id;
69  int best_score = CSeq_id::kMaxScore;
70  for (auto it: seq_id_ls) {
71  if (IsAccession(*it)) {
72  return it;
73  }
74  else {
75  int score = it->BaseBestRankScore();
76  if (best_score > score) {
77  best_seq_id = it;
78  best_score = score;
79  }
80  }
81  }
82  return best_seq_id;
83 }
84 
85 
87 {
88  CNcbiOstrstream result_strm;
89 
90  CBioseq_set::EClass bioseq_set_class = bssh.IsSetClass() ? bssh.GetClass() : CBioseq_set::eClass_not_set;
91  if (bioseq_set_class == CBioseq_set::eClass_segset || bioseq_set_class == CBioseq_set::eClass_nuc_prot) {
92  switch (bioseq_set_class) {
94  result_strm << "ss|";
95  break;
97  result_strm << "np|";
98  break;
99  default:
100  _TROUBLE;
101  }
102 
103  // get representative bioseq from bioseq-set
104  CBioseq_CI bioseq_ci(bssh);
105  if (!bioseq_ci) {
106  return "(EMPTY BIOSEQ-SET)";
107  }
108  const CBioseq_Handle & main_bsh = *bioseq_ci;
109  CConstRef<CSeq_id> best_seq_id = GetBestId(*main_bsh.GetCompleteBioseq());
110  _ASSERT(best_seq_id); // a Bioseq must have at least one Seq-id
111  {
112  string seq_id_str;
113  best_seq_id->GetLabel(&seq_id_str, CSeq_id::eContent);
114  result_strm << seq_id_str;
115  }
116 
117  }
118  else {
119  // get first child of bssh (which could be a bioseq or bioseq-set)
120  CSeq_entry_CI direct_child_ci(bssh); // NOT recursive
121  if (!direct_child_ci) {
122  // no child, so this is the best we can do
123  return "BioseqSet";
124  }
125 
126  result_strm << "Set containing ";
127  if (direct_child_ci->IsSeq()) {
128  CConstRef<CSeq_id> best_seq_id = GetBestId(*direct_child_ci->GetSeq().GetCompleteBioseq());
129  _ASSERT(best_seq_id); // a Bioseq must have at least one Seq-id
130  {
131  string seq_id_str;
132  best_seq_id->GetLabel(&seq_id_str, CSeq_id::eContent);
133  result_strm << seq_id_str;
134  }
135  }
136  else {
137  _ASSERT(direct_child_ci->IsSet());
138  result_strm << GetTextObjectDescription(direct_child_ci->GetSet());
139  }
140  }
141 
142  return CNcbiOstrstreamToString(result_strm);
143 }
144 
145 
146 static void GetSeqFeatLabel(const CSeq_feat& seq_feat, string& label)
147 {
148  label = kEmptyStr;
149 
151  size_t pos;
152  if (seq_feat.GetData().IsRna() && !label.empty() && (string::npos != (pos = label.find("RNA-")))) {
153  label = label.substr(pos + 4);
154  }
155  string number = "/number=";
156  if (!label.empty()
158  || seq_feat.GetData().GetSubtype()
160  && (string::npos != (pos = label.find(number)))) {
161  label = label.substr(pos + number.size());
162  if (label.find("exon") == 0 || label.find("intron") == 0) { // pos
163  label = label.substr(0, label.find(' '));
164  }
165  }
166 }
167 
168 
169 static void UpgradeSeqLocId(CSeq_point& pnt, CScope& scope)
170 {
171  if (pnt.IsSetId()) {
172  CBioseq_Handle bsh = scope.GetBioseqHandle(pnt.GetId());
173  if (bsh) {
175  if (best_id) {
176  pnt.SetId().Assign(*best_id);
177  }
178  }
179  }
180 }
181 
182 
183 static void UpgradeSeqLocId(CSeq_interval& interval, CScope& scope)
184 {
185  if (interval.IsSetId()) {
186  CBioseq_Handle bsh = scope.GetBioseqHandle(interval.GetId());
187  if (bsh) {
189  if (best_id) {
190  interval.SetId().Assign(*best_id);
191  }
192  }
193  }
194 }
195 
196 
197 static void UpgradeSeqLocId(CSeq_loc& loc, CScope& scope)
198 {
199  switch (loc.Which()) {
200  case CSeq_loc::e_Bond:
201  if (loc.GetBond().IsSetA()) {
202  UpgradeSeqLocId(loc.SetBond().SetA(), scope);
203  }
204  if (loc.GetBond().IsSetB()) {
205  UpgradeSeqLocId(loc.SetBond().SetB(), scope);
206  }
207  break;
208  case CSeq_loc::e_Equiv:
209  for (auto it: loc.SetEquiv().Set()) {
210  UpgradeSeqLocId(*it, scope);
211  }
212  break;
213  case CSeq_loc::e_Int:
214  UpgradeSeqLocId(loc.SetInt(), scope);
215  break;
216 
217  case CSeq_loc::e_Mix:
218  for (auto it: loc.SetMix().Set()) {
219  UpgradeSeqLocId(*it, scope);
220  }
221  break;
223  for (auto it: loc.SetPacked_int().Set()) {
224  UpgradeSeqLocId(*it, scope);
225  }
226  break;
228  if (loc.GetPacked_pnt().IsSetId()) {
229  CBioseq_Handle bsh = scope.GetBioseqHandle(loc.GetPacked_pnt().GetId());
230  if (bsh) {
232  if (best_id) {
233  loc.SetPacked_pnt().SetId().Assign(*best_id);
234  }
235  }
236  }
237  break;
238  case CSeq_loc::e_Pnt:
239  UpgradeSeqLocId(loc.SetPnt(), scope);
240  break;
241  case CSeq_loc::e_Whole:
242  {
243  CBioseq_Handle bsh = scope.GetBioseqHandle(loc.GetPacked_pnt().GetId());
244  if (bsh) {
246  if (best_id) {
247  loc.SetWhole().Assign(*best_id);
248  }
249  }
250  }
251  break;
252  case CSeq_loc::e_Null:
253  case CSeq_loc::e_Empty:
254  case CSeq_loc::e_Feat:
255  case CSeq_loc::e_not_set:
256  break;
257  }
258 }
259 
260 
261 static string GetLocusTagForFeature(const CSeq_feat& seq_feat, CScope& scope)
262 {
263  string tag(kEmptyStr);
264  if (seq_feat.GetData().IsGene()) {
265  const CGene_ref& gene = seq_feat.GetData().GetGene();
266  tag = (gene.CanGetLocus_tag()) ? gene.GetLocus_tag() : kEmptyStr;
267  }
268  else {
269  const CGene_ref* gene = seq_feat.GetGeneXref();
270  if (gene) {
271  tag = (gene->CanGetLocus_tag()) ? gene->GetLocus_tag() : kEmptyStr;
272  }
273  else {
274  CConstRef<CSeq_feat> gene = sequence::GetGeneForFeature(seq_feat, scope);
275  if (gene.NotEmpty()) {
276  tag = (gene->GetData().GetGene().CanGetLocus_tag()) ? gene->GetData().GetGene().GetLocus_tag() : kEmptyStr;
277  }
278  }
279  }
280  return tag;
281 }
282 
283 
284 static string GetProduct(const CProt_ref& prot_ref)
285 {
286  string rval;
287  if (prot_ref.CanGetName() && !prot_ref.GetName().empty()) {
288  rval = prot_ref.GetName().front();
289  }
290  return rval;
291 }
292 
293 
294 static string GetProductForCDS(const CSeq_feat& cds, CScope& scope)
295 {
296  // use protein xref if available
297  const CProt_ref* prot = cds.GetProtXref();
298  if (prot) {
299  return GetProduct(*prot);
300  }
301 
302  // should be the longest protein feature on the bioseq pointed by the cds.GetProduct()
303  if (cds.IsSetProduct()) {
307  scope);
308  if (prot_seq_feat && prot_seq_feat->GetData().IsProt()) {
309  return GetProduct(prot_seq_feat->GetData().GetProt());
310  }
311  }
312  return (kEmptyStr);
313 }
314 
315 
316 static string GetSeqLocDescription(const CSeq_loc& loc, CScope& scope)
317 {
318  string location;
319 
320  CRef<CSeq_loc> cpy(new CSeq_loc());
321  cpy->Assign(loc);
322  UpgradeSeqLocId(*cpy, scope);
323  cpy->GetLabel(&location);
324  return location;
325 }
326 
327 
328 static void GetTextObjectDescription(const CSeq_feat& seq_feat, CScope& scope, string &label, string &location, string &locus_tag)
329 {
330  location = GetSeqLocDescription(seq_feat.GetLocation(), scope);
331  label = seq_feat.GetData().GetKey();
332  locus_tag = GetLocusTagForFeature(seq_feat, scope);
333 }
334 
335 
336 static string GetTextObjectDescription(const CSeq_feat& seq_feat, CScope& scope, const string& product)
337 {
338  string location;
339  string label;
340  string locus_tag;
341  GetTextObjectDescription(seq_feat, scope, label, location, locus_tag);
342  string rval = label + "\t" + product + "\t" + location + "\t" + locus_tag; // + "\n";
343  return rval;
344 }
345 
346 
347 void GetTextObjectDescription(const CSeq_feat& seq_feat, CScope& scope, string &label, string &context, string &location, string &locus_tag)
348 {
349  if (seq_feat.GetData().IsProt()) {
351  if (bioseq) {
352  const CSeq_feat* cds = sequence::GetCDSForProduct(*bioseq, &scope);
353  if (cds) {
354  context = GetProduct(seq_feat.GetData().GetProt());
355  GetTextObjectDescription(*cds, scope, label, location, locus_tag);
356  return;
357  }
358  }
359  }
360  else if (seq_feat.GetData().IsBiosrc() && seq_feat.GetData().GetBiosrc().IsSetOrg()) {
361  const COrg_ref& org = seq_feat.GetData().GetBiosrc().GetOrg();
362  label = (org.CanGetTaxname() ? org.GetTaxname()
363  : (org.CanGetCommon() ? org.GetCommon() : kEmptyStr));
364  location = GetSeqLocDescription(seq_feat.GetLocation(), scope);
365  locus_tag.clear();
366  return;
367  }
368 
369  GetTextObjectDescription(seq_feat, scope, label, location, locus_tag);
370  context.clear();
371  if (seq_feat.GetData().IsCdregion()) {
372  context = GetProductForCDS(seq_feat, scope);
373  if (NStr::IsBlank(context)) {
374  GetSeqFeatLabel(seq_feat, context);
375  }
376  }
377  else if (seq_feat.GetData().IsPub()) {
378  seq_feat.GetData().GetPub().GetPub().GetLabel(&context);
379  }
380  else if (seq_feat.GetData().IsGene()) {
381  if (seq_feat.GetData().GetGene().CanGetLocus() &&
382  !NStr::IsBlank(seq_feat.GetData().GetGene().GetLocus())) {
383  context = seq_feat.GetData().GetGene().GetLocus();
384  }
385  else if (seq_feat.GetData().GetGene().CanGetDesc()) {
386  context = seq_feat.GetData().GetGene().GetDesc();
387  }
388  else context = GetLocusTagForFeature(seq_feat, scope);
389  }
390  else GetSeqFeatLabel(seq_feat, context);
391 }
392 
393 
394 string GetTextObjectDescription(const CSeq_feat& sf, CScope& scope)
395 {
396  string type;
397  string location;
398  string context;
399  string locus_tag;
400  GetTextObjectDescription(sf, scope, type, context, location, locus_tag);
401  return type + "\t" + context + "\t" + location + "\t" + locus_tag;
402 }
403 
404 
405 string GetTextObjectDescription(const CSeqdesc& sd, CScope& scope)
406 {
407  string label(kEmptyStr);
408  switch (sd.Which()) {
409  case CSeqdesc::e_Comment: return (sd.GetComment());
410  case CSeqdesc::e_Region: return (sd.GetRegion());
411  case CSeqdesc::e_Het: return (sd.GetHet());
412  case CSeqdesc::e_Title: return (sd.GetTitle());
413  case CSeqdesc::e_Name: return (sd.GetName());
416  break;
419  break;
420  case CSeqdesc::e_Org:
421  {
422  const COrg_ref& org = sd.GetOrg();
423  label = (org.CanGetTaxname() ? org.GetTaxname() : (org.CanGetCommon() ? org.GetCommon() : kEmptyStr));
424  }
425  break;
426  case CSeqdesc::e_Pub:
427  sd.GetPub().GetPub().GetLabel(&label);
428  break;
429  case CSeqdesc::e_User:
430  {
431  const CUser_object& uop = sd.GetUser();
432  label = (uop.CanGetClass() ? uop.GetClass() : (uop.GetType().IsStr() ? uop.GetType().GetStr() : kEmptyStr));
433  }
434  break;
435  case CSeqdesc::e_Method:
436  label = (ENUM_METHOD_NAME(EGIBB_method)()->FindName(sd.GetMethod(), true));
437  break;
439  label = (ENUM_METHOD_NAME(EGIBB_mol)()->FindName(sd.GetMol_type(), true));
440  break;
441  case CSeqdesc::e_Modif:
442  for (auto it: sd.GetModif()) {
443  label += ENUM_METHOD_NAME(EGIBB_mod)()->FindName(it, true) + ", ";
444  }
445  label = label.substr(0, label.size() - 2);
446  break;
447  case CSeqdesc::e_Source:
448  {
449  const COrg_ref& org = sd.GetSource().GetOrg();
450  label = (org.CanGetTaxname() ? org.GetTaxname() : (org.CanGetCommon() ? org.GetCommon() : kEmptyStr));
451  }
452  break;
453  case CSeqdesc::e_Maploc:
454  sd.GetMaploc().GetLabel(&label);
455  break;
456  case CSeqdesc::e_Molinfo:
457  sd.GetMolinfo().GetLabel(&label);
458  break;
459  case CSeqdesc::e_Dbxref:
460  sd.GetDbxref().GetLabel(&label);
461  break;
462  default:
463  break;
464  }
465  return label;
466 }
467 
468 
469 string GetTextObjectDescription(const CBioseq& bs, CScope& scope)
470 {
471  string rval;
472  CConstRef<CSeq_id> id = GetBestId(bs);
473  id->GetLabel(&rval, CSeq_id::eContent);
474  return rval;
475 }
476 
477 
478 string GetTextObjectDescription(const CBioseq_set& bs, CScope& scope)
479 {
481 }
482 
483 
487 
#define static
User-defined methods of the data storage class.
CBioseq_CI –.
Definition: bioseq_ci.hpp:69
CBioseq_Handle –.
CBioseq_set_Handle –.
void GetDate(string *label, bool year_only=false) const
Append a standardized string representation of the date to the label.
Definition: Date.hpp:149
void GetLabel(string *label) const
Definition: Dbtag.cpp:187
void GetLabel(string *label) const
Definition: MolInfo.cpp:56
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Definition: ncbistre.hpp:802
bool GetLabel(string *label, TLabelFlags flags=0, ELabelVersion version=eLabel_DefaultVersion) const override
Append a label to "label" based on content.
Definition: Pub_equiv.cpp:56
CScope –.
Definition: scope.hpp:92
ESubtype GetSubtype(void) const
string GetKey(EVocabulary vocab=eVocabulary_full) const
CSeq_entry_CI –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
const CProt_ref * GetProtXref(void) const
get protein (if present) from Seq-feat.xref list
Definition: Seq_feat.cpp:222
const CGene_ref * GetGeneXref(void) const
See related function in util/feature.hpp.
Definition: Seq_feat.cpp:181
Include a standard set of the NCBI C++ Toolkit most basic headers.
static int type
Definition: getdata.c:31
static const char location[]
Definition: config.c:97
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
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
string GetLabel(const CSeq_id &id)
@ kMaxScore
Definition: Seq_id.hpp:733
@ eContent
Untagged human-readable accession or the like.
Definition: Seq_id.hpp:605
void SetPacked_int(TPacked_int &v)
Definition: Seq_loc.hpp:984
void SetMix(TMix &v)
Definition: Seq_loc.hpp:987
void SetWhole(TWhole &v)
Definition: Seq_loc.hpp:982
void SetPacked_pnt(TPacked_pnt &v)
Definition: Seq_loc.hpp:986
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
Definition: Seq_loc.cpp:337
void SetPnt(TPnt &v)
Definition: Seq_loc.hpp:985
void SetInt(TInt &v)
Definition: Seq_loc.hpp:983
void SetEquiv(TEquiv &v)
Definition: Seq_loc.hpp:988
void SetBond(TBond &v)
Definition: Seq_loc.hpp:989
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
CMappedFeat GetBestOverlappingFeat(const CMappedFeat &feat, CSeqFeatData::ESubtype need_subtype, sequence::EOverlapType overlap_type, CFeatTree *feat_tree=0, const SAnnotSelector *base_sel=0)
Definition: feature.cpp:3653
@ fFGL_Content
Include its content if there is any.
Definition: feature.hpp:73
@ eOverlap_Contains
2nd contains 1st extremes
const CSeq_feat * GetCDSForProduct(const CBioseq &product, CScope *scope)
Get the encoding CDS feature of a given protein sequence.
Definition: sequence.cpp:2549
CBioseq_Handle GetBioseqFromSeqLoc(const CSeq_loc &loc, CScope &scope, CScope::EGetBioseqFlag flag=CScope::eGetBioseq_Loaded)
Retrieve the Bioseq Handle from a location.
Definition: sequence.cpp:308
CConstRef< CSeq_feat > GetGeneForFeature(const CSeq_feat &feat, CScope &scope)
Finds gene for feature, but obeys SeqFeatXref directives.
Definition: sequence.cpp:1529
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
CBioseq_set_Handle GetBioseq_setHandle(const CBioseq_set &seqset, EMissing action=eMissing_Default)
Definition: scope.cpp:176
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
TClass GetClass(void) const
TSet GetSet(void) const
TSeq GetSeq(void) const
bool IsSetClass(void) const
bool IsSet(void) const
bool IsSeq(void) const
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty – pointing to an object and has a non-null value.
Definition: ncbiobj.hpp:1392
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define kEmptyStr
Definition: ncbistr.hpp:123
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
static const char label[]
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
Definition: BioSource_.hpp:497
const TOrg & GetOrg(void) const
Get the Org member data.
Definition: BioSource_.hpp:509
const TDesc & GetDesc(void) const
Get the Desc member data.
Definition: Gene_ref_.hpp:599
bool CanGetLocus(void) const
Check if it is safe to call GetLocus method.
Definition: Gene_ref_.hpp:499
bool CanGetLocus_tag(void) const
Check if it is safe to call GetLocus_tag method.
Definition: Gene_ref_.hpp:787
bool CanGetDesc(void) const
Check if it is safe to call GetDesc method.
Definition: Gene_ref_.hpp:593
const TLocus_tag & GetLocus_tag(void) const
Get the Locus_tag member data.
Definition: Gene_ref_.hpp:793
const TLocus & GetLocus(void) const
Get the Locus member data.
Definition: Gene_ref_.hpp:505
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
const TName & GetName(void) const
Get the Name member data.
Definition: Prot_ref_.hpp:378
bool CanGetName(void) const
Check if it is safe to call GetName method.
Definition: Prot_ref_.hpp:372
const TPub & GetPub(void) const
Get the variant data.
bool IsProt(void) const
Check if variant Prot is selected.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
bool IsGene(void) const
Check if variant Gene is selected.
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
bool IsPub(void) const
Check if variant Pub is selected.
const TBiosrc & GetBiosrc(void) const
Get the variant data.
const TProduct & GetProduct(void) const
Get the Product member data.
Definition: Seq_feat_.hpp:1096
bool IsBiosrc(void) const
Check if variant Biosrc is selected.
const TGene & GetGene(void) const
Get the variant data.
const TProt & GetProt(void) const
Get the variant data.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
Definition: Seq_feat_.hpp:1084
bool IsRna(void) const
Check if variant Rna is selected.
void SetId(TId &value)
Assign a value to Id data member.
Definition: Seq_point_.cpp:61
bool IsSetId(void) const
WARNING: this used to be optional Check if a value has been assigned to Id data member.
Definition: Seq_point_.hpp:378
const TId & GetId(void) const
Get the Id member data.
bool IsSetA(void) const
connection to a least one residue Check if a value has been assigned to A data member.
Definition: Seq_bond_.hpp:201
void SetId(TId &value)
Assign a value to Id data member.
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_loc_.hpp:475
const TId & GetId(void) const
Get the Id member data.
const TId & GetId(void) const
Get the Id member data.
Definition: Seq_point_.hpp:390
const TPacked_pnt & GetPacked_pnt(void) const
Get the variant data.
Definition: Seq_loc_.cpp:260
bool IsSetId(void) const
WARNING: this used to be optional Check if a value has been assigned to Id data member.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
bool IsSetB(void) const
other end may not be available Check if a value has been assigned to B data member.
Definition: Seq_bond_.hpp:231
const TBond & GetBond(void) const
Get the variant data.
Definition: Seq_loc_.cpp:326
@ e_Other
for historical reasons, 'other' = 'refseq'
Definition: Seq_id_.hpp:104
@ e_Ddbj
DDBJ.
Definition: Seq_id_.hpp:107
@ e_not_set
No variant selected.
Definition: Seq_loc_.hpp:97
@ e_Null
not placed
Definition: Seq_loc_.hpp:98
@ e_Equiv
equivalent sets of locations
Definition: Seq_loc_.hpp:106
@ e_Empty
to NULL one Seq-id in a collection
Definition: Seq_loc_.hpp:99
@ e_Feat
indirect, through a Seq-feat
Definition: Seq_loc_.hpp:108
@ e_Int
from to
Definition: Seq_loc_.hpp:101
@ e_Whole
whole sequence
Definition: Seq_loc_.hpp:100
@ eClass_nuc_prot
nuc acid and coded proteins
Definition: Bioseq_set_.hpp:99
@ eClass_segset
segmented sequence + parts
EGIBB_method
sequencing methods
const THet & GetHet(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1176
const TUser & GetUser(void) const
Get the variant data.
Definition: Seqdesc_.cpp:384
const TDbxref & GetDbxref(void) const
Get the variant data.
Definition: Seqdesc_.cpp:428
const TUpdate_date & GetUpdate_date(void) const
Get the variant data.
Definition: Seqdesc_.cpp:494
const TTitle & GetTitle(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1032
const TSource & GetSource(void) const
Get the variant data.
Definition: Seqdesc_.cpp:566
const TPub & GetPub(void) const
Get the variant data.
Definition: Seqdesc_.cpp:356
const TMaploc & GetMaploc(void) const
Get the variant data.
Definition: Seqdesc_.cpp:290
TMethod GetMethod(void) const
Get the variant data.
Definition: Seqdesc_.hpp:985
const TId & GetId(void) const
Get the Id member data.
Definition: Bioseq_.hpp:290
const TOrg & GetOrg(void) const
Get the variant data.
Definition: Seqdesc_.cpp:240
list< CRef< CSeq_id > > TId
Definition: Bioseq_.hpp:94
EGIBB_mod
GenInfo Backbone modifiers.
Definition: GIBB_mod_.hpp:64
TMol_type GetMol_type(void) const
Get the variant data.
Definition: Seqdesc_.hpp:938
const TModif & GetModif(void) const
Get the variant data.
Definition: Seqdesc_.hpp:965
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seqdesc_.hpp:903
const TCreate_date & GetCreate_date(void) const
Get the variant data.
Definition: Seqdesc_.cpp:472
EGIBB_mol
type of molecule represented
Definition: GIBB_mol_.hpp:64
const TPub & GetPub(void) const
Get the Pub member data.
Definition: Pubdesc_.hpp:605
const TComment & GetComment(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1058
const TMolinfo & GetMolinfo(void) const
Get the variant data.
Definition: Seqdesc_.cpp:588
const TName & GetName(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1012
const TRegion & GetRegion(void) const
Get the variant data.
Definition: Seqdesc_.hpp:1108
@ e_Het
cofactor, etc associated but not bound
Definition: Seqdesc_.hpp:132
@ e_Org
if all from one organism
Definition: Seqdesc_.hpp:116
@ 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_Mol_type
type of molecule
Definition: Seqdesc_.hpp:111
@ 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_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_Name
a name for this sequence
Definition: Seqdesc_.hpp:114
@ e_Source
source of materials, includes Org-ref
Definition: Seqdesc_.hpp:133
Definition: fix_pub.hpp:45
const char * tag
static BOOL number
Definition: pcregrep.c:193
Definition: type.c:6
#define _TROUBLE
#define _ASSERT
static CConstRef< CSeq_id > GetBestId(const CBioseq &bioseq)
static bool IsAccession(const CSeq_id &id)
static void GetSeqFeatLabel(const CSeq_feat &seq_feat, string &label)
static string GetTextObjectDescription(CBioseq_set_Handle bssh)
static string GetLocusTagForFeature(const CSeq_feat &seq_feat, CScope &scope)
static void UpgradeSeqLocId(CSeq_point &pnt, CScope &scope)
static string GetSeqLocDescription(const CSeq_loc &loc, CScope &scope)
static string GetProductForCDS(const CSeq_feat &cds, CScope &scope)
static string GetProduct(const CProt_ref &prot_ref)
static CS_CONTEXT * context
Definition: will_convert.c:21
#define const
Definition: zconf.h:232
Modified on Mon May 13 04:33:31 2024 by modify_doxy.py rev. 669887