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

Go to the SVN repository for this file.

1 /* $Id: seq_feat_handle.cpp 89815 2020-04-24 14:46:02Z vasilche $
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: Aleksey Grichenko, Eugene Vasilchenko
27 *
28 * File Description:
29 * Seq-feat handle
30 *
31 */
32 
33 
34 #include <ncbi_pch.hpp>
36 #include <objmgr/scope.hpp>
42 
44 
47 
50 
51 class CScope;
52 
53 /////////////////////////////////////////////////////////////////////////////
54 // CSeq_feat_Handle
55 
56 
58  TFeatIndex feat_index)
59  : m_Seq_annot(annot),
60  m_FeatIndex(feat_index)
61 {
62  _ASSERT(!IsTableSNP());
63  _ASSERT(!IsRemoved());
64  _ASSERT(x_GetAnnotObject_Info().IsFeat());
65 }
66 
67 
69  const SSNP_Info& snp_info,
70  CCreatedFeat_Ref& created_ref)
71  : m_Seq_annot(annot),
72  m_FeatIndex(TFeatIndex(annot.x_GetInfo().x_GetSNP_annot_Info().GetIndex(snp_info))
73  | kNoAnnotObjectInfo),
74  m_CreatedFeat(&created_ref)
75 {
77  _ASSERT(!IsRemoved());
78 }
79 
80 
83  : m_Seq_annot(scope.GetSeq_annotHandle
84  (*info->GetSeq_annot_Info().GetSeq_annotSkeleton())),
85  m_FeatIndex(info->GetAnnotIndex())
86 {
87 }
88 
89 
91 {
92 }
93 
94 
96 {
99  m_FeatIndex = 0;
100  m_Seq_annot.Reset();
101 }
102 
103 
105 {
107 }
108 
109 
111 {
112  return !x_HasAnnotObjectInfo() &&
114 }
115 
116 
118 {
119  return !x_HasAnnotObjectInfo() &&
121 }
122 
123 
125 {
126  return x_HasAnnotObjectInfo() &&
128 }
129 
130 
132 {
133  if ( x_HasAnnotObjectInfo() ) {
135  }
136  else {
138  }
139 }
140 
141 
143 {
144  if ( !x_HasAnnotObjectInfo() ) {
145  NCBI_THROW(CObjMgrException, eInvalidHandle,
146  "CSeq_feat_Handle::x_GetAnnotObject: not Seq-feat info");
147  }
149 }
150 
151 
153 {
155  if ( info.IsRemoved() ) {
156  NCBI_THROW(CObjMgrException, eInvalidHandle,
157  "CSeq_feat_Handle::x_GetAnnotObject_Info: "
158  "Seq-feat was removed");
159  }
160  return info;
161 }
162 
163 
165 {
166  if ( !IsTableSNP() ) {
167  NCBI_THROW(CObjMgrException, eInvalidHandle,
168  "CSeq_feat_Handle::GetSNP_Info: not SNP info");
169  }
171 }
172 
173 
175 {
176  const SSNP_Info& info = x_GetSNP_InfoAny();
177  if ( info.IsRemoved() ) {
178  NCBI_THROW(CObjMgrException, eInvalidHandle,
179  "CSeq_feat_Handle::GetSNP_Info: SNP was removed");
180  }
181  return info;
182 }
183 
184 
186 {
187  return x_GetAnnotObject_Info().GetFeat();
188 }
189 
190 
192 {
193  return ConstRef(&x_GetPlainSeq_feat());
194 }
195 
196 
198 {
199  if ( IsPlainFeat() ) {
200  return ConstRef(&x_GetPlainSeq_feat());
201  }
202  else {
203  return m_CreatedFeat->GetOriginalFeature(*this);
204  }
205 }
206 
207 
209 {
210  return GetOriginalSeq_feat();
211 }
212 
213 
215 {
216  if ( x_HasAnnotObjectInfo() ) {
217  return GetSeq_feat()->IsSetPartial();
218  }
219  else if ( IsTableSNP() ) {
220  // table SNP features do not have partial
221  return false;
222  }
223  else {
224  // TODO
225  return GetSeq_feat()->IsSetPartial();
226  }
227 }
228 
229 
231 {
232  if ( x_HasAnnotObjectInfo() ) {
233  return GetSeq_feat()->GetPartial();
234  }
235  else if ( IsTableSNP() ) {
236  // table SNP features do not have partial
237  return false;
238  }
239  else {
240  // TODO
241  return GetSeq_feat()->GetPartial();
242  }
243 }
244 
245 
247 {
248  return GetSeq_feat()->GetProduct();
249 }
250 
251 
253 {
254  return GetSeq_feat()->GetLocation();
255 }
256 
257 
259 {
260  if ( !*this ) {
261  return false;
262  }
263  if ( x_HasAnnotObjectInfo() ) {
264  return GetSeq_feat()->IsSetData();
265  }
266  else {
267  // SNP table or sorted Seq-table features have data
268  return true;
269  }
270 }
271 
272 
274 {
275  if ( x_HasAnnotObjectInfo() ) {
277  if ( const CSeq_id* id = loc->GetId() ) {
278  return CSeq_id_Handle::GetHandle(*id);
279  }
280  return CSeq_id_Handle();
281  }
282  else if ( IsTableSNP() ) {
284  }
285  else {
286  // TODO
288  if ( const CSeq_id* id = loc->GetId() ) {
289  return CSeq_id_Handle::GetHandle(*id);
290  }
291  return CSeq_id_Handle();
292  }
293 }
294 
295 
297 {
298  if ( x_HasAnnotObjectInfo() ) {
299  return GetSeq_feat()->GetLocation().GetTotalRange();
300  }
301  else if ( IsTableSNP() ) {
302  const SSNP_Info& info = x_GetSNP_Info();
303  return TRange(info.GetFrom(), info.GetTo());
304  }
305  else {
306  // TODO
307  return GetSeq_feat()->GetLocation().GetTotalRange();
308  }
309 }
310 
311 
313 {
314  if ( IsSetProduct() ) {
316  const CSeq_id* id = loc->GetId();
317  if ( id ) {
318  return CSeq_id_Handle::GetHandle(*id);
319  }
320  }
321  return CSeq_id_Handle();
322 }
323 
324 
326 {
327  if ( IsSetProduct() ) {
328  return GetProduct().GetTotalRange();
329  }
330  return TRange::GetEmpty();
331 }
332 
333 
335 {
336  return x_GetSNP_annot_Info().GetSeq_id();
337 }
338 
339 
341 {
342  return x_GetSNP_annot_Info().GetSeq_id().GetGi();
343 }
344 
345 
346 const string& CSeq_feat_Handle::GetSNPComment(void) const
347 {
348  return x_GetSNP_annot_Info().x_GetComment(x_GetSNP_Info().m_CommentIndex);
349 }
350 
351 
353 {
354  return x_GetSNP_Info().GetAllelesCount();
355 }
356 
357 
358 const string& CSeq_feat_Handle::GetSNPAllele(size_t index) const
359 {
360  return x_GetSNP_annot_Info().x_GetAllele(x_GetSNP_Info().GetAlleleStrIndex(index));
361 }
362 
363 
364 const string& CSeq_feat_Handle::GetSNPExtra(void) const
365 {
366  return x_GetSNP_annot_Info().x_GetExtra(x_GetSNP_Info().GetExtraIndex());
367 }
368 
369 
372 {
374 }
375 
376 
377 const string& CSeq_feat_Handle::GetSNPQualityCodeStr(void) const
378 {
379  return x_GetSNP_annot_Info()
380  .x_GetQualityCodesStr(x_GetSNP_Info().GetQualityCodesStrIndex());
381 }
382 
383 
384 void CSeq_feat_Handle::GetSNPQualityCodeOs(vector<char>& os) const
385 {
387  .x_GetQualityCodesOs(x_GetSNP_Info().GetQualityCodesOsIndex(), os);
388 }
389 
390 
392 {
393  if ( x_HasAnnotObjectInfo() ) {
395  }
396  else if ( IsTableSNP() ) {
397  return x_GetSNP_InfoAny().IsRemoved();
398  }
399  else {
400  return false;
401  }
402 }
403 
404 
405 void CSeq_feat_Handle::Remove(void) const
406 {
407  CSeq_feat_EditHandle(*this).Remove();
408 }
409 
410 
411 void CSeq_feat_Handle::Replace(const CSeq_feat& new_feat) const
412 {
413  CSeq_feat_EditHandle(*this).Replace(new_feat);
414 }
415 
416 
417 /////////////////////////////////////////////////////////////////////////////
418 // Methods redirected to corresponding Seq-feat object
419 /////////////////////////////////////////////////////////////////////////////
420 
422 {
423  if ( x_HasAnnotObjectInfo() ) {
425  }
426  else if ( IsTableSNP() ) {
427  return CSeqFeatData::e_Imp;
428  }
429  else {
431  }
432 }
433 
434 
436 {
437  if ( x_HasAnnotObjectInfo() ) {
439  }
440  else if ( IsTableSNP() ) {
442  }
443  else {
445  }
446 }
447 
448 
450 {
451  return GetSeq_feat()->GetGeneXref();
452 }
453 
454 
456 {
457  return GetSeq_feat()->GetProtXref();
458 }
459 
460 
462 {
463  return GetSeq_feat()->GetNamedDbxref(db);
464 }
465 
466 
467 const string& CSeq_feat_Handle::GetNamedQual(const CTempString& qual_name) const
468 {
469  return GetSeq_feat()->GetNamedQual(qual_name);
470 }
471 
472 
473 /////////////////////////////////////////////////////////////////////////////
474 // CSeq_feat_EditHandle
475 
476 
478  : CSeq_feat_Handle(h)
479 {
480  GetAnnot(); // force check of editing mode
481 }
482 
483 
485  TFeatIndex feat_index)
486  : CSeq_feat_Handle(annot, feat_index)
487 {
488 }
489 
490 
492  const SSNP_Info& snp_info,
493  CCreatedFeat_Ref& created_ref)
494  : CSeq_feat_Handle(annot, snp_info, created_ref)
495 {
496 }
497 
498 
500 {
502  CCommandProcessor processor(GetAnnot().x_GetScopeImpl());
503  processor.run(new TCommand(*this));
504 }
505 
506 
507 void CSeq_feat_EditHandle::Replace(const CSeq_feat& new_feat) const
508 {
510  CCommandProcessor processor(GetAnnot().x_GetScopeImpl());
511  processor.run(new TCommand(*this, new_feat));
512 }
513 
515 {
517 }
518 
520 {
521  if ( IsPlainFeat() ) {
523  _ASSERT(IsRemoved());
524  }
525  else {
526  NCBI_THROW(CObjMgrException, eNotImplemented,
527  "CSeq_feat_Handle::Remove: "
528  "handle is SNP table or Seq-table");
529  }
530 }
531 
532 
534 {
535  if ( IsRemoved() || IsPlainFeat() ) {
536  if ( GetAnnot().x_GetInfo().Replace(x_GetFeatIndex(), new_feat) ) {
538  }
539  _ASSERT(!IsRemoved());
540  }
541  else {
542  NCBI_THROW(CObjMgrException, eNotImplemented,
543  "CSeq_feat_Handle::Replace: "
544  "handle is SNP table or Seq-table");
545  }
546 }
547 
548 
550 {
551  const_cast<CSeq_feat&>(*GetSeq_feat()).SetGeneXref(value);
552  //Update(); no index information is changed by GeneXref
553 }
554 
555 
557 {
558  CGene_ref& ret = const_cast<CSeq_feat&>(*GetSeq_feat()).SetGeneXref();
559  //Update(); no index information is changed by GeneXref
560  return ret;
561 }
562 
563 
565 {
566  const_cast<CSeq_feat&>(*GetSeq_feat()).SetProtXref(value);
567  //Update(); no index information is changed by ProtXref
568 }
569 
570 
572 {
573  CProt_ref& ret = const_cast<CSeq_feat&>(*GetSeq_feat()).SetProtXref();
574  //Update(); no index information is changed by ProtXref
575  return ret;
576 }
577 
578 
579 void CSeq_feat_EditHandle::AddQualifier(const string& qual_name,
580  const string& qual_val)
581 {
582  const_cast<CSeq_feat&>(*GetSeq_feat()).AddQualifier(qual_name, qual_val);
583  //Update(); no index information is changed by qualifiers
584 }
585 
586 void CSeq_feat_EditHandle::RemoveQualifier(const string& qual_name)
587 {
588  const_cast<CSeq_feat&>(*GetSeq_feat()).RemoveQualifier(qual_name);
589  //Update(); no index information is changed by qualifiers
590 }
591 
592 
593 void CSeq_feat_EditHandle::AddDbxref(const string& db_name,
594  const string& db_key)
595 {
596  const_cast<CSeq_feat&>(*GetSeq_feat()).AddDbxref(db_name, db_key);
597  //Update(); no index information is changed by dbxref
598 }
599 
600 
601 void CSeq_feat_EditHandle::AddDbxref(const string& db_name, int db_key)
602 {
603  const_cast<CSeq_feat&>(*GetSeq_feat()).AddDbxref(db_name, db_key);
604  //Update(); no index information is changed by dbxref
605 }
606 
607 void CSeq_feat_EditHandle::AddExceptText(const string & exception_text)
608 {
609  const_cast<CSeq_feat&>(*GetSeq_feat()).AddExceptText(exception_text);
610  //Update(); no index information is changed by except_text
611 }
612 
613 void CSeq_feat_EditHandle::RemoveExceptText(const string & exception_text)
614 {
615  const_cast<CSeq_feat&>(*GetSeq_feat()).RemoveExceptText(exception_text);
616  //Update(); no index information is changed by except_text
617 }
618 
620 {
621  if ( !IsPlainFeat() ) {
622  NCBI_THROW(CObjMgrException, eInvalidHandle,
623  "CSeq_feat_EditHandle::AddFeatId: not plain Seq-feat");
624  }
626 }
627 
628 
630 {
631  CObject_id obj_id;
632  obj_id.SetId(id);
633  AddFeatId(obj_id);
634 }
635 
636 
637 void CSeq_feat_EditHandle::AddFeatId(const string& id)
638 {
639  CObject_id obj_id;
640  obj_id.SetStr(id);
641  AddFeatId(obj_id);
642 }
643 
644 
646 {
647  if ( !IsPlainFeat() ) {
648  NCBI_THROW(CObjMgrException, eInvalidHandle,
649  "CSeq_feat_EditHandle::AddFeatXref: not plain Seq-feat");
650  }
652 }
653 
654 
656 {
657  CObject_id obj_id;
658  obj_id.SetId(id);
659  AddFeatXref(obj_id);
660 }
661 
662 
663 void CSeq_feat_EditHandle::AddFeatXref(const string& id)
664 {
665  CObject_id obj_id;
666  obj_id.SetStr(id);
667  AddFeatXref(obj_id);
668 }
669 
670 
672 {
673  if ( !IsPlainFeat() ) {
674  NCBI_THROW(CObjMgrException, eInvalidHandle,
675  "CSeq_feat_EditHandle::RemoveFeatId: not plain Seq-feat");
676  }
678 }
679 
680 
682 {
683  CObject_id obj_id;
684  obj_id.SetId(id);
685  RemoveFeatId(obj_id);
686 }
687 
688 
690 {
691  CObject_id obj_id;
692  obj_id.SetStr(id);
693  RemoveFeatId(obj_id);
694 }
695 
696 
698 {
699  if ( !IsPlainFeat() ) {
700  NCBI_THROW(CObjMgrException, eInvalidHandle,
701  "CSeq_feat_EditHandle::RemoveFeatXref: not plain Seq-feat");
702  }
704 }
705 
706 
708 {
709  CObject_id obj_id;
710  obj_id.SetId(id);
711  RemoveFeatXref(obj_id);
712 }
713 
714 
716 {
717  CObject_id obj_id;
718  obj_id.SetStr(id);
719  RemoveFeatXref(obj_id);
720 }
721 
722 
724 {
725  if ( !IsPlainFeat() ) {
726  NCBI_THROW(CObjMgrException, eInvalidHandle,
727  "CSeq_feat_EditHandle::ClearFeatIds: not plain Seq-feat");
728  }
730 }
731 
732 
734 {
735  if ( !IsPlainFeat() ) {
736  NCBI_THROW(CObjMgrException, eInvalidHandle,
737  "CSeq_feat_EditHandle::ClearFeatXrefs: not plain Seq-feat");
738  }
740 }
741 
742 
744 {
745  ClearFeatIds();
746  AddFeatId(id);
747 }
748 
749 
751 {
752  CObject_id obj_id;
753  obj_id.SetId(id);
754  SetFeatId(obj_id);
755 }
756 
757 
758 void CSeq_feat_EditHandle::SetFeatId(const string& id)
759 {
760  CObject_id obj_id;
761  obj_id.SetStr(id);
762  SetFeatId(obj_id);
763 }
764 
765 
766 /////////////////////////////////////////////////////////////////////////////
767 // CSeq_annot_ftable_CI
768 
770  TFlags flags)
771  : m_Flags(flags)
772 {
773  if ( !annot.IsFtable() ) {
774  NCBI_THROW(CObjMgrException, eInvalidHandle,
775  "CSeq_annot_ftable_CI: annot is not ftable");
776  }
777  m_Feat.m_Seq_annot = annot;
778  m_Feat.m_FeatIndex = 0;
779  if ( (m_Flags & fIncludeTable) &&
780  annot.x_GetInfo().x_HasSNP_annot_Info() ) {
782  }
783  x_Settle();
784 }
785 
786 
788 {
790  x_Settle();
791 }
792 
793 
795 {
796  // mark end of features
797  m_Feat.Reset();
798 }
799 
800 
802 {
803  for ( ;; ) {
805  bool is_snp_table = m_Feat.IsTableSNP();
806  if ( is_snp_table ) {
809  }
810  else {
811  end = GetAnnot().x_GetInfo().x_GetAnnotCount();
812  }
813  while ( m_Feat.m_FeatIndex < end ) {
814  if ( !m_Feat.IsRemoved() ) {
815  return;
816  }
818  }
819  if ( !is_snp_table || (m_Flags & fOnlyTable) ) {
820  break;
821  }
822  m_Feat.m_FeatIndex = 0;
823  }
824  x_Reset();
825 }
826 
827 
828 /////////////////////////////////////////////////////////////////////////////
829 // CSeq_annot_ftable_I
830 
832  TFlags flags)
833  : m_Annot(annot), m_Flags(flags)
834 {
835  if ( !annot.IsFtable() ) {
836  NCBI_THROW(CObjMgrException, eInvalidHandle,
837  "CSeq_annot_ftable_I: annot is not ftable");
838  }
839  m_Feat.m_Seq_annot = annot;
840  m_Feat.m_FeatIndex = 0;
841  if ( (m_Flags & fIncludeTable) &&
842  annot.x_GetInfo().x_HasSNP_annot_Info() ) {
844  }
845  x_Settle();
846 }
847 
848 
850 {
852  x_Settle();
853 }
854 
855 
857 {
858  // mark end of features
859  m_Feat.Reset();
860 }
861 
862 
864 {
865  for ( ;; ) {
867  bool is_snp_table = m_Feat.IsTableSNP();
868  if ( is_snp_table ) {
871  }
872  else {
873  end = GetAnnot().x_GetInfo().x_GetAnnotCount();
874  }
875  while ( m_Feat.m_FeatIndex < end ) {
876  if ( !m_Feat.IsRemoved() ) {
877  return;
878  }
880  }
881  if ( !is_snp_table || (m_Flags & fOnlyTable) ) {
882  break;
883  }
884  m_Feat.m_FeatIndex = 0;
885  }
886  x_Reset();
887 }
888 
889 
@ eFeatId_id
@ eFeatId_xref
bool IsRegular(void) const
TFeatSubtype GetFeatSubtype(void) const
const CSeq_feat & GetFeat(void) const
TFeatType GetFeatType(void) const
bool IsRemoved(void) const
CMDReturn< CMD >::TReturn run(CMD *cmd)
CConstRef< CSeq_feat > GetOriginalFeature(const CSeq_feat_Handle &feat_h)
Base class for all object manager exceptions.
void x_ClearAnnotCache(void)
CScope –.
Definition: scope.hpp:92
SAnnotTypeSelector GetType(void) const
CSeq_annot_Handle –.
void Remove(TAnnotIndex index)
void AddFeatId(TAnnotIndex index, const CObject_id &id, EFeatIdType id_type)
const CAnnotObject_Info & GetInfo(TAnnotIndex index) const
TAnnotIndex x_GetSNPFeatCount(void) const
bool IsSortedTable(void) const
void ClearFeatIds(TAnnotIndex index, EFeatIdType id_type)
void Update(TAnnotIndex index)
bool x_HasSNP_annot_Info(void) const
void RemoveFeatId(TAnnotIndex index, const CObject_id &id, EFeatIdType id_type)
TAnnotIndex x_GetAnnotCount(void) const
const CSeqTableInfo & GetTableInfo(void) const
const CSeq_annot_SNP_Info & x_GetSNP_annot_Info(void) const
const CSeq_id & GetSeq_id(void) const
const SSNP_Info & GetInfo(size_t index) const
const string & x_GetExtra(SSNP_Info::TExtraIndex index) const
const string & x_GetComment(SSNP_Info::TCommentIndex index) const
const string & x_GetAllele(SSNP_Info::TAlleleIndex index) const
void x_GetQualityCodesOs(SSNP_Info::TQualityCodesIndex index, TOctetString &os) const
const string & x_GetQualityCodesStr(SSNP_Info::TQualityCodesIndex index) const
CSeq_feat_EditHandle –.
CSeq_feat_Handle –.
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 string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
Definition: Seq_feat.cpp:429
CConstRef< CDbtag > GetNamedDbxref(const CTempString &db) const
Return a specified DB xref.
Definition: Seq_feat.cpp:415
const CGene_ref * GetGeneXref(void) const
See related function in util/feature.hpp.
Definition: Seq_feat.cpp:181
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Definition: tempstr.hpp:65
static uch flags
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
TRange GetTotalRange(void) const
Definition: Seq_loc.hpp:913
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
CSeq_annot_Handle GetSeq_annotHandle(const CSeq_annot &annot, EMissing action=eMissing_Default)
Definition: scope.cpp:192
CRef< CCreatedFeat_Ref > m_CreatedFeat
const string & GetNamedQual(const CTempString &qual_name) const
Return a named qualifier.
const CSeq_annot_SNP_Info & x_GetSNP_annot_Info(void) const
void AddQualifier(const string &qual_name, const string &qual_val)
Add a qualifier to this feature.
const SSNP_Info & x_GetSNP_Info(void) const
virtual bool GetPartial(void) const
virtual CSeq_id_Handle GetLocationId(void) const
TFeatIndex x_GetFeatIndex() const
CProt_ref & SetProtXref(void)
CSeq_annot_Info & x_GetInfo(void) const
const CSeq_annot_EditHandle & GetAnnot(void) const
bool x_HasAnnotObjectInfo() const
CSeq_id::TGi GetSNPGi(void) const
bool IsFtable(void) const
void RemoveExceptText(const string &exception_text)
Remove all instances of the given exception text in this feature, and reset the except flag if there ...
size_t GetSNPAllelesCount(void) const
virtual CConstRef< CSeq_feat > GetSeq_feat(void) const
CScope_Impl & x_GetScopeImpl(void) const
CConstRef< CDbtag > GetNamedDbxref(const CTempString &db) const
Return a specified DB xref.
void x_RealReplace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
void ClearFeatIds(void)
Clear feature ids.
CRange< TSeqPos > TRange
const SSNP_Info & x_GetSNP_InfoAny(void) const
const CProt_ref * GetProtXref(void) const
get protein (if present) from Seq-feat.xref list
void Remove(void) const
Remove the feature from Seq-annot.
void GetSNPQualityCodeOs(vector< char > &os) const
virtual const CSeq_loc & GetProduct(void) const
bool IsSetProduct(void) const
const string & GetSNPExtra(void) const
CSeq_annot_Handle m_Seq_annot
virtual const CSeq_loc & GetLocation(void) const
bool IsRemoved(void) const
Return true if this feature was removed already.
CSeq_feat_Handle m_Feat
const CSeq_feat & x_GetPlainSeq_feat(void) const
const string & GetSNPAllele(size_t index) const
CConstRef< CSeq_feat > m_CreatedOriginalFeat
void AddExceptText(const string &exception_text)
Add the given exception_text and set the except flag to true.
void SetFeatId(int id)
Set single feature id.
virtual TRange GetRange(void) const
Get range for current seq-feat.
CSeq_feat_EditHandle m_Feat
void AddDbxref(const string &db_name, const string &db_key)
add a DB xref to this feature
const CAnnotObject_Info & x_GetAnnotObject_InfoAny(void) const
const CSeq_annot_Handle & GetAnnot(void) const
virtual TRange GetProductTotalRange(void) const
const CAnnotObject_Info & x_GetAnnotObject_Info(void) const
bool IsTableSNP(void) const
Check if this is SNP table feature.
const CSeq_annot_Info & x_GetSeq_annot_Info(void) const
const CSeq_annot_Info & x_GetInfo(void) const
void RemoveQualifier(const string &qual_name)
Remove all qualifiers with the given name on this feature.
void AddFeatId(int id)
Add feature id.
CSeq_annot_EditHandle GetAnnot(void) const
CConstRef< CSeq_feat > GetPlainSeq_feat(void) const
Get current seq-feat.
void Update(void) const
Update index after manual modification of the object.
const string & GetSNPQualityCodeStr(void) const
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
void Replace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
CSeqFeatData::ESubtype GetFeatSubtype(void) const
CUser_field::TData::E_Choice GetSNPQualityCodeWhich(void) const
const CSeq_id & GetSNPSeq_id(void) const
bool IsTableFeat(void) const
Check if this is non-SNP table feature.
CSeqFeatData::E_Choice GetFeatType(void) const
virtual bool IsSetPartial(void) const
void x_RealRemove(void) const
Remove the feature from Seq-annot.
const CGene_ref * GetGeneXref(void) const
get gene (if present) from Seq-feat.xref list
bool IsSortedTableFeat(void) const
Check if this is a simple feature from sorted Seq-table.
const string & GetSNPComment(void) const
bool IsPlainFeat(void) const
Check if this is plain feature.
void Replace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
void RemoveFeatId(int id)
Remove feature id.
virtual CSeq_id_Handle GetProductId(void) const
bool IsSetData(void) const
CGene_ref & SetGeneXref(void)
void Remove(void) const
Remove the feature from Seq-annot.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
Definition: ncbiobj.hpp:2024
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1439
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
static TThisType GetEmpty(void)
Definition: range.hpp:306
#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
E_Choice
Choice variants.
TStr & SetStr(void)
Select the variant.
Definition: Object_id_.hpp:304
TId & SetId(void)
Select the variant.
Definition: Object_id_.hpp:277
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
Definition: Seq_feat_.hpp:913
bool IsSetPartial(void) const
incomplete in some way? Check if a value has been assigned to Partial data member.
Definition: Seq_feat_.hpp:943
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
E_Choice
Choice variants.
const TProduct & GetProduct(void) const
Get the Product member data.
Definition: Seq_feat_.hpp:1096
TPartial GetPartial(void) const
Get the Partial member data.
Definition: Seq_feat_.hpp:962
NCBI_NS_NCBI::TGi TGi
Definition: Seq_id_.hpp:180
TGi GetGi(void) const
Get the variant data.
Definition: Seq_id_.hpp:889
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
TFeatSubtype GetFeatSubtype(void) const
TFeatType GetFeatType(void) const
bool IsRemoved(void) const
Definition: snp_info.hpp:225
CUser_field::TData::E_Choice GetQualityCodesWhich(void) const
size_t GetAllelesCount(void) const
#define _ASSERT
Modified on Sat Apr 20 12:21:46 2024 by modify_doxy.py rev. 669887