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

Go to the SVN repository for this file.

1 /* $Id: fcleanup.cpp 99284 2023-03-06 16:28:57Z stakhovv $
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  * File Name: fcleanup.cpp
27  *
28  * Author: Alexey Dobronadezhdin
29  *
30  * File Description:
31  * This file contains some specific cleanup functionality
32  */
33 
34 #include <ncbi_pch.hpp>
35 
36 #include <objmgr/scope.hpp>
37 #include <objmgr/seqdesc_ci.hpp>
39 #include <objects/seq/Bioseq.hpp>
40 #include <serial/iterator.hpp>
41 #include <objects/seq/MolInfo.hpp>
43 #include <objmgr/bioseq_ci.hpp>
44 #include <objmgr/feat_ci.hpp>
46 #include <objmgr/util/sequence.hpp>
47 #include <objmgr/util/feature.hpp>
49 
51 
53 
54 #include "utilfun.h"
55 #include "loadfeat.h"
56 #include "fcleanup.h"
57 
58 #ifdef THIS_FILE
59 # undef THIS_FILE
60 #endif
61 #define THIS_FILE "fcleanup.cpp"
62 
65 
66 static void MoveSourceDescrToTop(CSeq_entry& entry)
67 {
68  if (entry.IsSeq())
69  return;
70 
71  CBioseq_set& seq_set = entry.SetSet();
72  const CSeqdesc* source = nullptr;
73  if (seq_set.IsSetDescr()) {
74  for (const auto& desc : seq_set.GetDescr().Get()) {
75  if (desc->IsSource()) {
76  source = desc;
77  break;
78  }
79  }
80  }
81 
82  for (CTypeIterator<CBioseq> bioseq(Begin(entry)); bioseq; ++bioseq) {
83  if (bioseq->IsSetDescr()) {
84  TSeqdescList& descrs = bioseq->SetDescr().Set();
85  for (TSeqdescList::iterator desc = descrs.begin(); desc != descrs.end(); ++desc) {
86  if ((*desc)->IsSource()) {
87  if (! source) {
88  source = *desc;
89  seq_set.SetDescr().Set().push_back(*desc);
90  descrs.erase(desc);
91  }
92  break;
93  }
94  }
95  }
96  }
97 }
98 
99 static bool IsEmptyMolInfo(const CMolInfo& mol_info)
100 {
101  return ! (mol_info.IsSetBiomol() || mol_info.IsSetCompleteness() || mol_info.IsSetGbmoltype() ||
102  mol_info.IsSetTech() || mol_info.IsSetTechexp());
103 }
104 
105 static void MoveAnnotToTop(CSeq_entry& seq_entry)
106 {
107  if (! seq_entry.IsSet() || ! seq_entry.GetSet().IsSetClass() || seq_entry.GetSet().GetClass() != CBioseq_set::eClass_segset)
108  return;
109 
110  CBioseq_set* parts = nullptr;
111  CBioseq_set& bio_set = seq_entry.SetSet();
112 
113  for (auto& entry : bio_set.SetSeq_set()) {
114  if (entry->IsSet() && entry->GetSet().IsSetClass() && entry->GetSet().GetClass() == CBioseq_set::eClass_parts) {
115  parts = &entry->SetSet();
116  break;
117  }
118  }
119 
120  if (parts && parts->IsSetAnnot()) {
121 
122  CBioseq::TAnnot& annot = bio_set.SetSeq_set().front()->SetAnnot();
123  annot.splice(annot.end(), parts->SetAnnot());
124  parts->ResetAnnot();
125  }
126 }
127 
128 static void MoveBiomolToTop(CSeq_entry& seq_entry)
129 {
130  if (! seq_entry.IsSet() || ! seq_entry.GetSet().IsSetClass() || seq_entry.GetSet().GetClass() != CBioseq_set::eClass_segset)
131  return;
132 
133  if (seq_entry.IsSetDescr()) {
134  for (const auto& desc : seq_entry.GetDescr().Get()) {
135  if (desc->IsMolinfo())
136  return;
137  }
138  }
139 
140  CBioseq_set* parts = nullptr;
141  CBioseq_set& bio_set = seq_entry.SetSet();
142 
143  for (auto& entry : bio_set.SetSeq_set()) {
144  if (entry->IsSet() && entry->GetSet().IsSetClass() && entry->GetSet().GetClass() == CBioseq_set::eClass_parts) {
145  parts = &entry->SetSet();
146  break;
147  }
148  }
149 
150  if (parts) {
152  for (const auto& entry : parts->GetSeq_set()) {
153  if (! entry->IsSeq())
154  return;
155 
156  const CBioseq& bioseq = entry->GetSeq();
157  if (bioseq.IsSetDescr()) {
158  for (const auto& desc : bioseq.GetDescr().Get()) {
159  if (desc->IsMolinfo() && desc->GetMolinfo().IsSetBiomol()) {
160  CMolInfo::TBiomol cur_biomol = desc->GetMolinfo().GetBiomol();
161  if (biomol == CMolInfo::eBiomol_unknown)
162  biomol = cur_biomol;
163  else if (biomol != cur_biomol)
164  return;
165  }
166  }
167  }
168  }
169 
170  if (biomol != CMolInfo::eBiomol_unknown) {
171  for (auto& entry : parts->SetSeq_set()) {
172  CBioseq& bioseq = entry->SetSeq();
173  if (bioseq.IsSetDescr()) {
174  TSeqdescList& descrs = bioseq.SetDescr().Set();
175  for (TSeqdescList::iterator desc = descrs.begin(); desc != descrs.end(); ++desc) {
176  if ((*desc)->IsMolinfo()) {
177  (*desc)->SetMolinfo().ResetBiomol();
178  if (IsEmptyMolInfo((*desc)->GetMolinfo()))
179  descrs.erase(desc);
180  break;
181  }
182  }
183  }
184  }
185 
186  CRef<CSeqdesc> new_descr(new CSeqdesc);
187  new_descr->SetMolinfo().SetBiomol(biomol);
188 
189  seq_entry.SetDescr().Set().push_back(new_descr);
190  }
191  }
192 }
193 
194 static void LookForProductName(CSeq_feat& feat)
195 {
196  if (feat.IsSetData() && feat.GetData().IsProt()) {
197  CProt_ref& prot_ref = feat.SetData().SetProt();
198 
199  if (! prot_ref.IsSetName() || prot_ref.GetName().empty() || (prot_ref.GetName().size() == 1 && prot_ref.GetName().front() == "unnamed")) {
200  if (feat.IsSetQual()) {
201  for (TQualVector::iterator qual = feat.SetQual().begin(); qual != feat.SetQual().end(); ++qual) {
202  if ((*qual)->IsSetQual() && (*qual)->GetQual() == "product" && (*qual)->IsSetVal()) {
203  prot_ref.SetName().clear();
204  prot_ref.SetName().push_back((*qual)->GetVal());
205  feat.SetQual().erase(qual);
206 
207  if (feat.GetQual().empty())
208  feat.ResetQual();
209  break;
210  }
211  }
212  }
213  }
214  }
215 }
216 
217 /*
218 bool FeatLocCmp(const CRef<CSeq_feat>& a, const CRef<CSeq_feat>& b)
219 {
220  if (! a->IsSetLocation() || ! b->IsSetLocation())
221  return false;
222 
223  return a->GetLocation().GetStart(eExtreme_Biological) < b->GetLocation().GetStart(eExtreme_Biological);
224 }
225 
226 static void SortFeaturesByLocation(CSeq_annot& annot)
227 {
228  if (! annot.IsFtable())
229  return;
230 
231  TSeqFeatList& feats = annot.SetData().SetFtable();
232  feats.sort(FeatLocCmp);
233 }
234 */
235 
236 static bool IsConversionPossible(const vector<pair<TSeqPos, TSeqPos>>& ranges)
237 {
238  bool convert = true;
239 
240  size_t sz = ranges.size();
241  for (size_t i = 1; i < sz; ++i) {
242  if (ranges[i].first != ranges[i - 1].second && ranges[i].first != ranges[i - 1].second + 1) {
243  convert = false;
244  break;
245  }
246  }
247 
248  return convert;
249 }
250 
251 static void SetNewInterval(const CSeq_interval* first, const CSeq_interval* last, const TSeqPos& from, TSeqPos& to, CSeq_loc& loc)
252 {
253  CRef<CSeq_interval> new_int(new CSeq_interval);
254 
255  if (first) {
256  new_int->Assign(*first);
257  }
258 
259  new_int->SetFrom(from);
260  new_int->SetTo(to);
261 
262  if (last) {
263  if (last->IsSetFuzz_from()) {
264  new_int->SetFuzz_from().Assign(last->GetFuzz_from());
265  }
266  if (last->IsSetFuzz_to()) {
267  new_int->SetFuzz_to().Assign(last->GetFuzz_to());
268  }
269  }
270 
271  loc.SetInt(*new_int);
272 }
273 
275 {
276  const CSeq_loc_mix::Tdata& locs = loc.GetMix().Get();
277  const CSeq_interval* first_interval = nullptr;
278  const CSeq_interval* last_interval = nullptr;
279 
280  vector<pair<TSeqPos, TSeqPos>> ranges;
281  for (const auto& cur_loc : locs) {
282  if (cur_loc->IsInt()) {
283 
284  const CSeq_interval& interval = cur_loc->GetInt();
285  ranges.push_back(make_pair(interval.GetFrom(), interval.GetTo()));
286 
287  if (! first_interval) {
288  first_interval = &interval;
289  } else if (first_interval->GetStart(eExtreme_Biological) > interval.GetStart(eExtreme_Biological)) {
290  first_interval = &interval;
291  }
292 
293  if (! last_interval) {
294  last_interval = &interval;
295  } else if (last_interval->GetStop(eExtreme_Biological) < interval.GetStop(eExtreme_Biological)) {
296  last_interval = &interval;
297  }
298  } else if (cur_loc->IsPnt()) {
299  const CSeq_point& point = cur_loc->GetPnt();
300  ranges.push_back(make_pair(point.GetPoint(), point.GetPoint()));
301  } else {
302  // TODO process the other types of intervals
303  return;
304  }
305  }
306 
307  if (! first_interval) {
308  return;
309  }
310 
311  sort(ranges.begin(), ranges.end());
312 
313  if (IsConversionPossible(ranges)) {
314  SetNewInterval(first_interval, last_interval, ranges.front().first, ranges.back().second, loc);
315  }
316 }
317 
319 {
320  const CPacked_seqint::Tdata& ints = loc.GetPacked_int();
321 
322  vector<pair<TSeqPos, TSeqPos>> ranges;
323  for (const auto& interval : ints) {
324  ranges.push_back(make_pair(interval->GetFrom(), interval->GetTo()));
325  }
326 
327  sort(ranges.begin(), ranges.end());
328 
329  if (IsConversionPossible(ranges)) {
330  SetNewInterval(loc.GetPacked_int().GetStartInt(eExtreme_Biological), loc.GetPacked_int().GetStopInt(eExtreme_Biological), ranges.front().first, ranges.back().second, loc);
331  }
332 }
333 
334 
336 {
338  auto& scope = entryHandle.GetScope();
339 
340  int protein_id_counter = 99;
341 
342  for (CFeat_CI cds_it(entryHandle, sel); cds_it; ++cds_it) {
343  auto pCds = cds_it->GetSeq_feat();
344  if (! sequence::IsPseudo(*pCds, scope)) {
345  if (! pCds->IsSetProduct()) {
346  auto pNewCds = Ref(new CSeq_feat());
347  pNewCds->Assign(*pCds);
348  string idLabel;
349  auto pProteinId =
350  edit::GetNewProtId(scope.GetBioseqHandle(pNewCds->GetLocation()), protein_id_counter, idLabel, false);
351  pNewCds->SetProduct().SetWhole().Assign(*pProteinId);
352  CSeq_feat_EditHandle pCdsEditHandle(*cds_it);
353  pCdsEditHandle.Replace(*pNewCds);
354  pCds = pNewCds;
355  } else if (pCds->GetProduct().GetId() &&
356  scope.Exists(*pCds->GetProduct().GetId())) {
357  continue;
358  }
359  // Add protein
360  CCleanup::AddProtein(*pCds, scope);
361  auto protHandle = scope.GetBioseqHandle(pCds->GetProduct());
362  if (protHandle) {
363  CFeat_CI feat_ci(protHandle, CSeqFeatData::eSubtype_prot);
364  if (! feat_ci) {
365  string protName = CCleanup::GetProteinName(*pCds, entryHandle);
366  if (NStr::IsBlank(protName)) {
367  protName = "hypothetical protein";
368  }
369  feature::AddProteinFeature(*(protHandle.GetCompleteBioseq()), protName, *pCds, scope);
370  }
371  }
372  }
373  }
374 }
375 
376 
377 void FinalCleanup(TEntryList& seq_entries)
378 {
380  cleanup.SetScope(&GetScope());
381 
382  //+++++
383  /*{
384  CBioseq_set bio_set;
385  bio_set.SetClass(CBioseq_set::eClass_genbank);
386 
387  bio_set.SetSeq_set() = seq_entries;
388  CNcbiOfstream ostr("before_cleanup.asn");
389  ostr << MSerial_AsnText << bio_set;
390  }*/
391  //+++++
392 
393  for (auto& entry : seq_entries) {
394  //+++++
395  /*{
396  CNcbiOfstream ostr("ttt.txt");
397  ostr << MSerial_AsnText << *entry;
398  }*/
399  //+++++
400 
401  MoveSourceDescrToTop(*entry);
402 
403  cleanup.ExtendedCleanup(*entry);
404 
405  //+++++
406  /*{
407  CNcbiOfstream ostr("ttt1.txt");
408  ostr << MSerial_AsnText << *entry;
409  }*/
410  //+++++
411 
412  // TODO the functionality below probably should be moved to Cleanup
413  for (CTypeIterator<CBioseq> bioseq(Begin(*entry)); bioseq; ++bioseq) {
414  CSeq_feat* gene = nullptr;
415  bool gene_set = false;
416 
417  for (CTypeIterator<CSeq_feat> feat(Begin(*bioseq)); feat; ++feat) {
418 
419  LookForProductName(*feat);
420 
421  if (feat->IsSetData() && feat->GetData().IsGene()) {
422  if (gene_set) {
423  gene = nullptr;
424  } else {
425  gene_set = true;
426  gene = &(*feat);
427  }
428  }
429 
430  if (feat->IsSetLocation()) {
431  // modification of packed_int location (chenge it to a single interval if possible)
432  CSeq_loc& loc = feat->SetLocation();
433  if (loc.IsPacked_int()) {
435  } else if (loc.IsMix()) {
436 
437  if (feat->IsSetData() && feat->GetData().IsProt()) {
439  }
440  }
441  }
442  }
443 
444  if (gene && gene->IsSetLocation()) {
445 
446  CSeq_loc& loc = gene->SetLocation();
447 
448  // changes in gene
449  if (! loc.GetId()) {
450  continue;
451  }
452 
453  CBioseq_Handle bioseq_h = GetScope().GetBioseqHandle(*bioseq);
454  if (! bioseq_h) {
455  continue;
456  }
457 
458  CSeqdesc_CI mol_info(bioseq_h, CSeqdesc::E_Choice::e_Molinfo);
459 
460  if (mol_info && mol_info->GetMolinfo().IsSetBiomol() && mol_info->GetMolinfo().GetBiomol() == CMolInfo::eBiomol_mRNA && bioseq->IsSetId()) {
461 
462  const CBioseq::TId& ids = bioseq->GetId();
463  if (! ids.empty()) {
464 
465  const CSeq_id& id = *ids.front();
466  if (id.Which() == loc.GetId()->Which()) {
467  loc.SetId(id);
468  }
469  }
470  }
471  }
472  }
473 
474  /*
475  for (CTypeIterator<CSeq_feat> feat(Begin(*entry)); feat; ++feat) {
476  LookForProductName(*feat);
477 
478  // TODO the functionality below probably should be moved to Cleanup
479  if (feat->IsSetLocation()) {
480  CSeq_loc& loc = feat->SetLocation();
481 
482  // changes in gene
483  if (feat->IsSetData() && feat->GetData().IsGene()) {
484  if (! loc.GetId()) {
485  continue;
486  }
487 
488  CBioseq_Handle bioseq_h = GetScope().GetBioseqHandle(loc);
489  if (! bioseq_h) {
490  continue;
491  }
492 
493  CConstRef<CBioseq> bioseq = bioseq_h.GetBioseqCore();
494  CSeqdesc_CI mol_info(bioseq_h, CSeqdesc::E_Choice::e_Molinfo);
495 
496  if (mol_info && mol_info->GetMolinfo().IsSetBiomol() && mol_info->GetMolinfo().GetBiomol() == CMolInfo::eBiomol_mRNA && bioseq->IsSetId()) {
497  const CBioseq::TId& ids = bioseq->GetId();
498  if (! ids.empty()) {
499  const CSeq_id& id = *ids.front();
500  if (id.Which() == loc.GetId()->Which()) {
501  loc.SetId(id);
502  }
503  }
504  }
505  }
506 
507  // modification of packed_int location (chenge it to a single interval if possible)
508  if (loc.IsPacked_int()) {
509  ConvertPackedIntToInterval(loc);
510  }
511  }
512  }
513  */
514 
515  MoveBiomolToTop(*entry);
516  MoveAnnotToTop(*entry);
517  for (CTypeIterator<CSeq_entry> cur_entry(Begin(*entry)); cur_entry; ++cur_entry) {
518  MoveBiomolToTop(*cur_entry);
519  MoveAnnotToTop(*cur_entry);
520  }
521 
522  // for (CTypeIterator<CSeq_annot> annot(Begin(*entry)); annot; ++annot) {
523  // SortFeaturesByLocation(*annot);
524  // }
525 
526  // for (CTypeIterator<CSeq_annot> annot(Begin(*entry)); annot; ++annot) {
527  // CreatePubFromFeats(*annot);
528  // }
529  }
530 }
531 
@ eExtreme_Biological
5' and 3'
Definition: Na_strand.hpp:62
CRef< objects::CSeq_id > GetNewProtId(objects::CBioseq_Handle bsh, int &offset, string &id_label, bool general_only)
static TDSRET convert(TDSSOCKET *tds, TDSICONV *conv, TDS_ICONV_DIRECTION direction, const char *from, size_t from_len, char *dest, size_t *dest_len)
Definition: charconv.c:57
CBioseq_Handle –.
static CRef< CSeq_entry > AddProtein(const CSeq_feat &cds, CScope &scope)
Definition: cleanup.cpp:2051
static const string & GetProteinName(const CProt_ref &prot)
Definition: cleanup.cpp:1467
CFeat_CI –.
Definition: feat_ci.hpp:64
const CSeq_interval * GetStopInt(ESeqLocExtremes ext) const
const CSeq_interval * GetStartInt(ESeqLocExtremes ext) const
CSeq_entry_Handle –.
Definition: Seq_entry.hpp:56
const CSeq_descr & GetDescr(void) const
Definition: Seq_entry.cpp:120
void SetDescr(CSeq_descr &value)
Definition: Seq_entry.cpp:134
bool IsSetDescr(void) const
Definition: Seq_entry.cpp:106
CSeq_feat_EditHandle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
TSeqPos GetStart(ESeqLocExtremes ext) const
TSeqPos GetStop(ESeqLocExtremes ext) const
CSeqdesc_CI –.
Definition: seqdesc_ci.hpp:65
static void cleanup(void)
Definition: ct_dynamic.c:30
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:51
USING_SCOPE(objects)
static bool IsEmptyMolInfo(const CMolInfo &mol_info)
Definition: fcleanup.cpp:99
static void LookForProductName(CSeq_feat &feat)
Definition: fcleanup.cpp:194
void g_InstantiateMissingProteins(CSeq_entry_Handle entryHandle)
Definition: fcleanup.cpp:335
static void MoveSourceDescrToTop(CSeq_entry &entry)
Definition: fcleanup.cpp:66
static bool IsConversionPossible(const vector< pair< TSeqPos, TSeqPos >> &ranges)
Definition: fcleanup.cpp:236
void FinalCleanup(TEntryList &seq_entries)
Definition: fcleanup.cpp:377
static void MoveAnnotToTop(CSeq_entry &seq_entry)
Definition: fcleanup.cpp:105
static void MoveBiomolToTop(CSeq_entry &seq_entry)
Definition: fcleanup.cpp:128
static void ConvertPackedIntToInterval(CSeq_loc &loc)
Definition: fcleanup.cpp:318
static void ConvertMixToInterval(CSeq_loc &loc)
Definition: fcleanup.cpp:274
static void SetNewInterval(const CSeq_interval *first, const CSeq_interval *last, const TSeqPos &from, TSeqPos &to, CSeq_loc &loc)
Definition: fcleanup.cpp:251
list< CRef< objects::CSeq_entry > > TEntryList
std::list< CRef< objects::CSeqdesc > > TSeqdescList
Definition: ftablock.h:60
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
Definition: Seq_loc.cpp:3474
void SetInt(TInt &v)
Definition: Seq_loc.hpp:983
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
Definition: Seq_loc.hpp:941
CBeginInfo Begin(C &obj)
Get starting point of object hierarchy.
Definition: iterator.hpp:1004
void AddProteinFeature(const CBioseq &seq, const string &protein_name, const CSeq_feat &cds, CScope &scope)
AddProteinFeature A function to create a protein feature with the specified protein name.
Definition: feature.cpp:4195
bool IsPseudo(const CSeq_feat &feat, CScope &scope)
Determines whether given feature is pseudo, using gene associated with feature if necessary Checks to...
Definition: sequence.cpp:1428
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
CScope & GetScope(void) const
Get scope this handle belongs to.
void Replace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
const TName & GetName(void) const
Get the Name member data.
Definition: Prot_ref_.hpp:378
bool IsSetName(void) const
protein name Check if a value has been assigned to Name data member.
Definition: Prot_ref_.hpp:366
TName & SetName(void)
Assign a value to Name data member.
Definition: Prot_ref_.hpp:384
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
Definition: Seq_feat_.hpp:913
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
Definition: Seq_feat_.hpp:1135
bool IsProt(void) const
Check if variant Prot is selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
const TQual & GetQual(void) const
Get the Qual member data.
Definition: Seq_feat_.hpp:1147
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_feat_.cpp:94
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Seq_feat_.hpp:1153
void ResetQual(void)
Reset Qual data member.
Definition: Seq_feat_.cpp:136
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
Definition: Seq_feat_.hpp:1105
void SetTo(TTo value)
Assign a value to To data member.
bool IsMix(void) const
Check if variant Mix is selected.
Definition: Seq_loc_.hpp:552
list< CRef< CSeq_interval > > Tdata
TPoint GetPoint(void) const
Get the Point member data.
Definition: Seq_point_.hpp:303
TFrom GetFrom(void) const
Get the From member data.
list< CRef< CSeq_loc > > Tdata
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_id_.hpp:746
void SetFrom(TFrom value)
Assign a value to From data member.
const Tdata & Get(void) const
Get the member data.
void SetFuzz_to(TFuzz_to &value)
Assign a value to Fuzz_to data member.
void SetFuzz_from(TFuzz_from &value)
Assign a value to Fuzz_from data member.
bool IsPacked_int(void) const
Check if variant Packed_int is selected.
Definition: Seq_loc_.hpp:534
TTo GetTo(void) const
Get the To member data.
const TMix & GetMix(void) const
Get the variant data.
Definition: Seq_loc_.cpp:282
const TPacked_int & GetPacked_int(void) const
Get the variant data.
Definition: Seq_loc_.cpp:216
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
const TDescr & GetDescr(void) const
Get the Descr member data.
TSet & SetSet(void)
Select the variant.
Definition: Seq_entry_.cpp:130
TClass GetClass(void) const
Get the Class member data.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
const TSet & GetSet(void) const
Get the variant data.
Definition: Seq_entry_.cpp:124
bool IsSeq(void) const
Check if variant Seq is selected.
Definition: Seq_entry_.hpp:257
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
void ResetAnnot(void)
Reset Annot data member.
bool IsSetDescr(void) const
Check if a value has been assigned to Descr data member.
bool IsSet(void) const
Check if variant Set is selected.
Definition: Seq_entry_.hpp:263
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
@ eClass_parts
parts for 2 or 3
@ eClass_segset
segmented sequence + parts
bool IsSetCompleteness(void) const
Check if a value has been assigned to Completeness data member.
Definition: MolInfo_.hpp:569
bool IsSetTechexp(void) const
explanation if tech not enough
Definition: MolInfo_.hpp:522
bool IsSetBiomol(void) const
Check if a value has been assigned to Biomol data member.
Definition: MolInfo_.hpp:422
const Tdata & Get(void) const
Get the member data.
Definition: Seq_descr_.hpp:166
list< CRef< CSeq_id > > TId
Definition: Bioseq_.hpp:94
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
Definition: Bioseq_.hpp:303
TBiomol GetBiomol(void) const
Get the Biomol member data.
Definition: MolInfo_.hpp:447
void SetBiomol(TBiomol value)
Assign a value to Biomol data member.
Definition: MolInfo_.hpp:453
void SetDescr(TDescr &value)
Assign a value to Descr data member.
Definition: Bioseq_.cpp:65
bool IsSetTech(void) const
Check if a value has been assigned to Tech data member.
Definition: MolInfo_.hpp:472
list< CRef< CSeq_annot > > TAnnot
Definition: Bioseq_.hpp:97
const TDescr & GetDescr(void) const
Get the Descr member data.
Definition: Bioseq_.hpp:315
const TMolinfo & GetMolinfo(void) const
Get the variant data.
Definition: Seqdesc_.cpp:588
TMolinfo & SetMolinfo(void)
Select the variant.
Definition: Seqdesc_.cpp:594
bool IsSetGbmoltype(void) const
identifies particular ncRNA Check if a value has been assigned to Gbmoltype data member.
Definition: MolInfo_.hpp:619
int i
constexpr auto sort(_Init &&init)
const CharType(& source)[N]
Definition: pointer.h:1149
SAnnotSelector –.
CScope & GetScope()
Modified on Sat Dec 02 09:23:09 2023 by modify_doxy.py rev. 669887