NCBI C++ ToolKit
seq_map_ci.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef OBJECTS_OBJMGR___SEQ_MAP_CI__HPP
2 #define OBJECTS_OBJMGR___SEQ_MAP_CI__HPP
3 
4 /* $Id: seq_map_ci.hpp 71718 2016-03-24 15:33:11Z vasilche $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Authors:
30 * Eugene Vasilchenko
31 *
32 * File Description:
33 * CSeqMap -- formal sequence map to describe sequence parts in general,
34 * i.e. location and type only, without providing real data
35 *
36 */
37 
38 #include <objmgr/seq_map.hpp>
40 #include <objmgr/tse_handle.hpp>
42 #include <objects/seq/Seq_data.hpp>
43 #include <util/range.hpp>
44 #include <util/sequtil/sequtil.hpp>
45 
48 
49 
50 class CSeq_entry;
51 class CSeq_entry_Handle;
52 
53 
54 /** @addtogroup ObjectManagerIterators
55  *
56  * @{
57  */
58 
59 
60 class CScope;
61 class CSeqMap;
62 class CSeq_entry;
63 
65 {
66 public:
68 
69  TSeqPos GetRefPosition(void) const;
70  bool GetRefMinusStrand(void) const;
71 
72  const CSeqMap& x_GetSeqMap(void) const;
73  size_t x_GetIndex(void) const;
74  const CSeqMap::CSegment& x_GetSegment(void) const;
75  const CSeqMap::CSegment& x_GetNextSegment(void) const;
76 
77  bool InRange(void) const;
78  CSeqMap::ESegmentType GetType(void) const;
79  bool IsSetData(void) const;
80  bool x_Move(bool minusStrand, CScope* scope);
81 
82  TSeqPos x_GetLevelRealPos(void) const;
83  TSeqPos x_GetLevelRealEnd(void) const;
84  TSeqPos x_GetLevelPos(void) const;
85  TSeqPos x_GetLevelEnd(void) const;
86  TSeqPos x_GetSkipBefore(void) const;
87  TSeqPos x_GetSkipAfter(void) const;
88  TSeqPos x_CalcLength(void) const;
89  TSeqPos x_GetTopOffset(void) const;
90  int x_GetSequenceClass(void) const;
91 
92 private:
93 
94  // seqmap
97  // index of segment in seqmap
98  size_t m_Index;
99  // position inside m_SeqMap
100  // m_RangeEnd >= m_RangePos
105 
106  friend class CSeqMap_CI;
107  friend class CSeqMap;
108 };
109 
110 
111 /// Selector used in CSeqMap methods returning iterators.
113 {
115 
116  SSeqMapSelector(void);
117  SSeqMapSelector(TFlags flags, size_t resolve_count = 0);
118 
119  /// Find segment containing the position
121  {
122  m_Position = pos;
123  return *this;
124  }
125 
126  /// Set range for iterator
128  {
129  m_Position = start;
130  m_Length = length;
131  return *this;
132  }
133 
135  /// Set range for iterator - CRange<> version
137  {
138  m_Position = range.GetFrom();
139  m_Length = range.GetLength();
140  return *this;
141  }
142 
143  /// Set strand to iterate over
145  {
146  m_MinusStrand = IsReverse(strand);
147  return *this;
148  }
149 
150  /// Set max depth of resolving seq-map
152  {
153  m_MaxResolveCount = res_cnt;
154  return *this;
155  }
156 
157  SSeqMapSelector& SetLinkUsedTSE(bool link = true)
158  {
159  m_LinkUsedTSE = link;
160  return *this;
161  }
163  {
164  m_LinkUsedTSE = true;
165  m_TopTSE = top_tse;
166  return *this;
167  }
168  SSeqMapSelector& SetLinkUsedTSE(vector<CTSE_Handle>& used_tses)
169  {
170  m_LinkUsedTSE = true;
171  m_UsedTSEs = &used_tses;
172  return *this;
173  }
174 
175  /// Limit TSE to resolve references
176  SSeqMapSelector& SetLimitTSE(const CSeq_entry_Handle& tse);
177 
178  /// Select segment type(s)
180  {
181  m_Flags = flags;
182  return *this;
183  }
184 
186  {
187  m_Flags |= CSeqMap::fByFeaturePolicy;
188  return *this;
189  }
190 
192  {
193  m_Flags |= CSeqMap::fBySequenceClass;
194  return *this;
195  }
196 
197  size_t GetResolveCount(void) const
198  {
199  return m_MaxResolveCount;
200  }
201  bool CanResolve(void) const
202  {
203  return GetResolveCount() > 0;
204  }
205 
206  void PushResolve(void)
207  {
208  _ASSERT(CanResolve());
209  --m_MaxResolveCount;
210  }
211  void PopResolve(void)
212  {
213  ++m_MaxResolveCount;
214  _ASSERT(CanResolve());
215  }
216 
217  void AddUsedTSE(const CTSE_Handle& tse) const;
218 
219 private:
220  friend class CSeqMap;
221  friend class CSeqMap_CI;
222 
223  bool x_HasLimitTSE(void) const
224  {
225  return m_LimitTSE;
226  }
227  const CTSE_Handle& x_GetLimitTSE(CScope* scope = 0) const;
228 
229  // position of segment in whole sequence in residues
231  // length of current segment
233  // Requested strand
235  // Link segment bioseqs to master
237  // Top-level TSE (for used TSEs linking)
239  // maximum resolution level
241  // limit search to single TSE
243  // return all intermediate resolved sequences
245  // keep all used TSEs which can not be linked
246  vector<CTSE_Handle>* m_UsedTSEs;
247 };
248 
249 
250 /// Iterator over CSeqMap
252 {
253 public:
255 
256  CSeqMap_CI(void);
257  CSeqMap_CI(const CBioseq_Handle& bioseq,
258  const SSeqMapSelector& selector,
259  TSeqPos pos = 0);
260  CSeqMap_CI(const CBioseq_Handle& bioseq,
261  const SSeqMapSelector& selector,
262  const CRange<TSeqPos>& range);
263  CSeqMap_CI(const CConstRef<CSeqMap>& seqmap,
264  CScope* scope,
265  const SSeqMapSelector& selector,
266  TSeqPos pos = 0);
267  CSeqMap_CI(const CConstRef<CSeqMap>& seqmap,
268  CScope* scope,
269  const SSeqMapSelector& selector,
270  const CRange<TSeqPos>& range);
271 
272  ~CSeqMap_CI(void);
273 
274  bool IsInvalid(void) const;
275  bool IsValid(void) const;
276 
278 
279  bool operator==(const CSeqMap_CI& seg) const;
280  bool operator!=(const CSeqMap_CI& seg) const;
281  bool operator< (const CSeqMap_CI& seg) const;
282  bool operator> (const CSeqMap_CI& seg) const;
283  bool operator<=(const CSeqMap_CI& seg) const;
284  bool operator>=(const CSeqMap_CI& seg) const;
285 
286  /// go to next/next segment, return false if no more segments
287  /// if no_resolve_current == true, do not resolve current segment
288  bool Next(bool resolveExternal = true);
289  bool Prev(void);
290 
291  TFlags GetFlags(void) const;
292  void SetFlags(TFlags flags);
293 
294  CSeqMap_CI& operator++(void);
295  CSeqMap_CI& operator--(void);
296 
297  /// return the depth of current segment
298  size_t GetDepth(void) const;
299 
300  /// return position of current segment in sequence
301  TSeqPos GetPosition(void) const;
302  /// return length of current segment
303  TSeqPos GetLength(void) const;
304  /// return true if current segment is a gap of unknown length
305  bool IsUnknownLength(void) const;
306  /// return end position of current segment in sequence (exclusive)
307  TSeqPos GetEndPosition(void) const;
308 
309  CSeqMap::ESegmentType GetType(void) const;
310  bool IsSetData(void) const;
311  /// will allow only regular data segments (whole, plus strand)
312  const CSeq_data& GetData(void) const;
313  /// will allow any data segments, user should check for position and strand
314  const CSeq_data& GetRefData(void) const;
315 
316  /// return CSeq_literal with gap data, or null if either the segment
317  /// is not a gap, or an unspecified gap
318  CConstRef<CSeq_literal> GetRefGapLiteral(void) const;
319 
320  /// The following function makes sense only
321  /// when the segment is a reference to another seq.
322  CSeq_id_Handle GetRefSeqid(void) const;
323  TSeqPos GetRefPosition(void) const;
324  TSeqPos GetRefEndPosition(void) const;
325  bool GetRefMinusStrand(void) const;
326 
327  CScope* GetScope(void) const;
328 
329  const CTSE_Handle& GetUsingTSE(void) const;
330 
331  bool FeaturePolicyWasApplied(void) const;
332 
333 private:
334  friend class CSeqMap;
335  friend class CSeqMap_I;
336 
338 
339  CSeqMap_CI(const CSeqMap_CI& base,
340  const CSeqMap& seqmap, size_t index,
341  TSeqPos pos);
342 
343  const TSegmentInfo& x_GetSegmentInfo(void) const;
345 
346  // Check if the current reference can be resolved in the TSE
347  // set by selector
348  bool x_RefTSEMatch(const CSeqMap::CSegment& seg) const;
349  bool x_CanResolve(const CSeqMap::CSegment& seg) const;
350 
351  // valid iterator
352  const CSeqMap& x_GetSeqMap(void) const;
353  size_t x_GetIndex(void) const;
354  const CSeqMap::CSegment& x_GetSegment(void) const;
355 
356  TSeqPos x_GetTopOffset(void) const;
357  void x_Resolve(TSeqPos pos);
358  CBioseq_Handle x_GetBioseq(const CSeq_id& seq_id) const;
359 
360  bool x_Found(void) const;
361 
362  bool x_Push(TSeqPos offset, bool resolveExternal);
363  bool x_Push(TSeqPos offset);
364  void x_Push(const CConstRef<CSeqMap>& seqMap, const CTSE_Handle& tse,
365  TSeqPos from, TSeqPos length, bool minusStrand, TSeqPos pos);
366  bool x_Pop(void);
367 
368  bool x_Next(bool resolveExternal);
369  bool x_Next(void);
370  bool x_Prev(void);
371 
372  bool x_TopNext(void);
373  bool x_TopPrev(void);
374 
375  bool x_SettleNext(void);
376  bool x_SettlePrev(void);
377 
378  void x_Select(const CConstRef<CSeqMap>& seqMap,
379  const SSeqMapSelector& selector,
380  TSeqPos pos);
381 
382  int x_GetSequenceClass(void) const; // CBioseq_Handle::ESequenceClass
383 
384  typedef vector<TSegmentInfo> TStack;
385 
386  // scope for length resolution
388  // position stack
390  // iterator parameters
392  // search range
395  // Feature policy was applied
397 
398 protected:
399  void x_UpdateLength(void);
400 };
401 
402 
403 class CBioseq_EditHandle;
404 
405 /// Non-const iterator over CSeqMap (allows to edit the sequence).
407 {
408 public:
409  CSeqMap_I(void);
410  CSeqMap_I(const CBioseq_EditHandle& bioseq,
411  const SSeqMapSelector& selector,
412  TSeqPos pos = 0);
413  CSeqMap_I(const CBioseq_EditHandle& bioseq,
414  const SSeqMapSelector& selector,
415  const CRange<TSeqPos>& range);
416  CSeqMap_I(CRef<CSeqMap>& seqmap,
417  CScope* scope,
418  const SSeqMapSelector& selector,
419  TSeqPos pos = 0);
420  CSeqMap_I(CRef<CSeqMap>& seqmap,
421  CScope* scope,
422  const SSeqMapSelector& selector,
423  const CRange<TSeqPos>& range);
424 
425  ~CSeqMap_I(void);
426 
427  /// Change current segment to gap.
428  void SetGap(TSeqPos length, CSeq_data* gap_data = 0);
429  /// Change current segment to reference.
430  void SetRef(const CSeq_id_Handle& ref_id,
431  TSeqPos ref_pos,
432  TSeqPos ref_length,
433  bool ref_minus_strand = false);
434  /// Change current segment to data.
435  void SetSeq_data(TSeqPos length, CSeq_data& data);
436 
437  /// Insert gap. On return the iterator points to the new segment.
438  CSeqMap_I& InsertGap(TSeqPos length, CSeq_data* gap_data = 0);
439  /// Insert reference. On return the iterator points to the new segment.
440  CSeqMap_I& InsertRef(const CSeq_id_Handle& ref_id,
441  TSeqPos ref_pos,
442  TSeqPos ref_length,
443  bool ref_minus_strand = false);
444  /// Insert data. On return the iterator points to the new segment.
445  CSeqMap_I& InsertData(TSeqPos length, CSeq_data& data);
446  /// Insert data segment using the sequence string and the selected coding.
447  CSeqMap_I& InsertData(const string& buffer,
448  CSeqUtil::ECoding buffer_coding,
449  CSeq_data::E_Choice seq_data_coding);
450 
451  /// Remove current segment. On return the iterator points to the next
452  /// segment or becomes invalid.
453  CSeqMap_I& Remove(void);
454 
455  /// Get current sequence as a string with the selected encoding.
456  /// NOTE: Some seq-data types (Gap) and encodings (Ncbipna, Ncbipaa)
457  /// are not supported.
458  void GetSequence(string& buffer,
459  CSeqUtil::ECoding buffer_coding) const;
460  /// Set sequence data. The buffer is converted from buffer_coding
461  /// to seq_data_coding and put into the new seq-data.
462  /// NOTE: Some seq-data types (Gap) and encodings (Ncbipna, Ncbipaa)
463  /// are not supported.
464  void SetSequence(const string& buffer,
465  CSeqUtil::ECoding buffer_coding,
466  CSeq_data::E_Choice seq_data_coding);
467 
468 private:
469  static SSeqMapSelector sx_AdjustSelector(const SSeqMapSelector& selector);
470 
472 };
473 
474 
475 /////////////////////////////////////////////////////////////////////
476 // CSeqMap_CI_SegmentInfo
477 
478 
479 inline
481 {
482  return *m_SeqMap;
483 }
484 
485 
486 inline
488 {
489  return m_Index;
490 }
491 
492 
493 inline
495 {
496  return x_GetSeqMap().x_GetSegment(x_GetIndex());
497 }
498 
499 
500 inline
502  : m_Index(kInvalidSeqPos),
503  m_LevelRangePos(kInvalidSeqPos), m_LevelRangeEnd(kInvalidSeqPos),
504  m_MinusStrand(false), m_SequenceClass(-1)
505 {
506 }
507 
508 
509 
510 inline
512 {
513  return x_GetSegment().m_Position;
514 }
515 
516 
517 inline
519 {
520  const CSeqMap::CSegment& seg = x_GetSegment();
521  return seg.m_Position + seg.m_Length;
522 }
523 
524 
525 inline
527 {
529 }
530 
531 
532 inline
534 {
536 }
537 
538 
539 inline
541 {
543  if ( skip < 0 )
544  skip = 0;
545  return skip;
546 }
547 
548 
549 inline
551 {
553  if ( skip < 0 )
554  skip = 0;
555  return skip;
556 }
557 
558 
559 inline
561 {
562  return x_GetLevelEnd() - x_GetLevelPos();
563 }
564 
565 
566 inline
568 {
570 }
571 
572 
573 inline
575 {
576  const CSeqMap::CSegment& seg = x_GetSegment();
577  return seg.m_Position < m_LevelRangeEnd &&
578  seg.m_Position + seg.m_Length > m_LevelRangePos;
579 }
580 
581 
582 inline
584 {
585  return InRange()?
587 }
588 
589 
590 inline
592 {
593  return InRange() && x_GetSegment().IsSetData();
594 }
595 
596 
597 /////////////////////////////////////////////////////////////////////
598 // CSeqMap_CI
599 
600 
601 inline
602 size_t CSeqMap_CI::GetDepth(void) const
603 {
604  return m_Stack.size();
605 }
606 
607 
608 inline
610 {
611  return m_Stack.back();
612 }
613 
614 
615 inline
617 {
618  return m_Stack.back();
619 }
620 
621 
622 inline
624 {
625  return x_GetSegmentInfo().x_GetSeqMap();
626 }
627 
628 
629 inline
630 size_t CSeqMap_CI::x_GetIndex(void) const
631 {
632  return x_GetSegmentInfo().x_GetIndex();
633 }
634 
635 
636 inline
638 {
639  return x_GetSegmentInfo().x_GetSegment();
640 }
641 
642 
643 inline
645 {
646  return m_Scope.GetScopeOrNull();
647 }
648 
649 
650 inline
652 {
653  return x_GetSegmentInfo().GetType();
654 }
655 
656 
657 inline
658 bool CSeqMap_CI::IsSetData(void) const
659 {
660  return x_GetSegmentInfo().IsSetData();
661 }
662 
663 
664 inline
666 {
667  return m_Selector.m_Position;
668 }
669 
670 
671 inline
673 {
674  return m_Selector.m_Length;
675 }
676 
677 
678 inline
680 {
682 }
683 
684 
685 inline
686 bool CSeqMap_CI::IsInvalid(void) const
687 {
688  return m_Stack.empty();
689 }
690 
691 
692 inline
694 {
695  return x_GetSegmentInfo().GetRefPosition();
696 }
697 
698 
699 inline
701 {
703 }
704 
705 
706 inline
708 {
709  return GetRefPosition() + GetLength();
710 }
711 
712 
713 inline
714 bool CSeqMap_CI::operator==(const CSeqMap_CI& seg) const
715 {
716  return
717  GetPosition() == seg.GetPosition() &&
718  m_Stack.size() == seg.m_Stack.size() &&
719  x_GetIndex() == seg.x_GetIndex();
720 }
721 
722 
723 inline
724 bool CSeqMap_CI::operator<(const CSeqMap_CI& seg) const
725 {
726  return
727  GetPosition() < seg.GetPosition() ||
728  (GetPosition() == seg.GetPosition() &&
729  (m_Stack.size() < seg.m_Stack.size() ||
730  (m_Stack.size() == seg.m_Stack.size() &&
731  x_GetIndex() < seg.x_GetIndex())));
732 }
733 
734 
735 inline
736 bool CSeqMap_CI::operator>(const CSeqMap_CI& seg) const
737 {
738  return
739  GetPosition() > seg.GetPosition() ||
740  (GetPosition() == seg.GetPosition() &&
741  (m_Stack.size() > seg.m_Stack.size() ||
742  (m_Stack.size() == seg.m_Stack.size() &&
743  x_GetIndex() > seg.x_GetIndex())));
744 }
745 
746 
747 inline
748 bool CSeqMap_CI::operator!=(const CSeqMap_CI& seg) const
749 {
750  return !(*this == seg);
751 }
752 
753 
754 inline
755 bool CSeqMap_CI::operator<=(const CSeqMap_CI& seg) const
756 {
757  return !(*this > seg);
758 }
759 
760 
761 inline
762 bool CSeqMap_CI::operator>=(const CSeqMap_CI& seg) const
763 {
764  return !(*this < seg);
765 }
766 
767 
768 inline
770 {
771  Next();
772  return *this;
773 }
774 
775 
776 inline
778 {
779  Prev();
780  return *this;
781 }
782 
783 
784 inline
786 {
787  return m_Selector.m_Flags;
788 }
789 
790 
791 inline
793 {
794  return x_GetSegmentInfo().m_TSE;
795 }
796 
797 
798 inline
800 {
802 }
803 
804 
805 /////////////////////////////////////////////////////////////////////
806 // CSeqMap_I
807 
808 
809 /* @} */
810 
811 
814 
815 #endif // OBJECTS_OBJMGR___SEQ_MAP_CI__HPP
bool IsReverse(ENa_strand s)
Definition: Na_strand.hpp:75
bool operator!=(const _Ht_iterator< _Val, _Nonconst_traits< _Val >, _Key, _HF, _ExK, _EqK, _All > &__x, const _Ht_iterator< _Val, _Const_traits< _Val >, _Key, _HF, _ExK, _EqK, _All > &__y)
Definition: _hashtable.h:173
CBioseq_EditHandle –.
CBioseq_Handle –.
CScope * GetScopeOrNull(void) const
Definition: heap_scope.cpp:74
CScope –.
Definition: scope.hpp:92
Iterator over CSeqMap.
Definition: seq_map_ci.hpp:252
Non-const iterator over CSeqMap (allows to edit the sequence).
Definition: seq_map_ci.hpp:407
CSeqMap –.
Definition: seq_map.hpp:93
CSeq_entry_Handle –.
Definition: Seq_entry.hpp:56
static uch flags
bool operator<(const CEquivRange &A, const CEquivRange &B)
bool operator==(const CEquivRange &A, const CEquivRange &B)
#define false
Definition: bool.h:36
int offset
Definition: replacements.h:160
char data[12]
Definition: iconv.c:80
SBlastSequence GetSequence(const objects::CSeq_loc &sl, EBlastEncoding encoding, objects::CScope *scope, objects::ENa_strand strand=objects::eNa_strand_plus, ESentinelType sentinel=eSentinels, std::string *warnings=NULL)
Retrieves a sequence using the object manager.
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
int TSignedSeqPos
Type for signed sequence position.
Definition: ncbimisc.hpp:887
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
Definition: ncbimisc.hpp:878
CExpression operator>=(CREATED, time_point)
CExpression operator<=(time_point, CREATED)
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
TSeqPos x_GetLevelRealPos(void) const
Definition: seq_map_ci.hpp:511
TSeqPos GetEndPosition(void) const
return end position of current segment in sequence (exclusive)
Definition: seq_map_ci.hpp:679
int x_GetSequenceClass(void) const
Definition: seq_map_ci.cpp:739
bool operator>=(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:762
void PushResolve(void)
Definition: seq_map_ci.hpp:206
SSeqMapSelector & SetResolveCount(size_t res_cnt)
Set max depth of resolving seq-map.
Definition: seq_map_ci.hpp:151
bool x_Next(void)
Definition: seq_map_ci.cpp:589
SSeqMapSelector & SetLinkUsedTSE(const CTSE_Handle &top_tse)
Definition: seq_map_ci.hpp:162
CSeqMap_CI_SegmentInfo TSegmentInfo
Definition: seq_map_ci.hpp:337
size_t GetResolveCount(void) const
Definition: seq_map_ci.hpp:197
CSeqMap_CI & operator--(void)
Definition: seq_map_ci.hpp:777
const CSeqMap::CSegment & x_GetSegment(void) const
Definition: seq_map_ci.hpp:637
void x_Select(const CConstRef< CSeqMap > &seqMap, const SSeqMapSelector &selector, TSeqPos pos)
Definition: seq_map_ci.cpp:237
bool CanResolve(void) const
Definition: seq_map_ci.hpp:201
bool operator==(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:714
CSeqMap_CI & operator++(void)
Definition: seq_map_ci.hpp:769
TStack m_Stack
Definition: seq_map_ci.hpp:389
bool Next(bool resolveExternal=true)
go to next/next segment, return false if no more segments if no_resolve_current == true,...
Definition: seq_map_ci.cpp:705
SSeqMapSelector & SetLinkUsedTSE(bool link=true)
Definition: seq_map_ci.hpp:157
TSeqPos x_CalcLength(void) const
Definition: seq_map_ci.hpp:560
SSeqMapSelector & SetBySequenceClass(void)
Definition: seq_map_ci.hpp:191
size_t x_GetIndex(void) const
Definition: seq_map_ci.hpp:630
CRef< CSeqMap > m_SeqMap
Definition: seq_map_ci.hpp:471
SSeqMapSelector m_Selector
Definition: seq_map_ci.hpp:391
TSeqPos GetRefPosition(void) const
Definition: seq_map_ci.hpp:693
bool operator<=(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:755
SSeqMapSelector & SetPosition(TSeqPos pos)
Find segment containing the position.
Definition: seq_map_ci.hpp:120
TSeqPos m_Position
Definition: seq_map_ci.hpp:230
bool x_SettleNext(void)
Definition: seq_map_ci.cpp:685
const TSegmentInfo & x_GetSegmentInfo(void) const
Definition: seq_map_ci.hpp:609
CScope * GetScope(void) const
Definition: seq_map_ci.hpp:644
bool x_SettlePrev(void)
Definition: seq_map_ci.cpp:695
bool IsSetData(void) const
Definition: seq_map_ci.hpp:591
SSeqMapSelector & SetFlags(TFlags flags)
Select segment type(s)
Definition: seq_map_ci.hpp:179
bool x_Found(void) const
Definition: seq_map_ci.cpp:627
CConstRef< CSeqMap > m_SeqMap
Definition: seq_map_ci.hpp:96
TSeqPos x_GetTopOffset(void) const
Definition: seq_map_ci.cpp:364
TSeqPos m_SearchEnd
Definition: seq_map_ci.hpp:394
const CSeqMap & x_GetSeqMap(void) const
Definition: seq_map_ci.hpp:480
CSeqMap::TFlags TFlags
Definition: seq_map_ci.hpp:114
const CSeqMap::CSegment & x_GetSegment(void) const
Definition: seq_map_ci.hpp:494
TSeqPos GetRefPosition(void) const
Definition: seq_map_ci.cpp:323
CTSE_Handle m_TopTSE
Definition: seq_map_ci.hpp:238
CRange< TSeqPos > TRange
Definition: seq_map_ci.hpp:134
TSeqPos x_GetLevelEnd(void) const
Definition: seq_map_ci.hpp:533
CHeapScope m_Scope
Definition: seq_map_ci.hpp:387
CSeqMap_CI(void)
Definition: seq_map_ci.cpp:140
size_t m_MaxResolveCount
Definition: seq_map_ci.hpp:240
TSeqPos x_GetSkipAfter(void) const
Definition: seq_map_ci.hpp:550
bool x_RefTSEMatch(const CSeqMap::CSegment &seg) const
Definition: seq_map_ci.cpp:370
const CSeqMap & x_GetSeqMap(void) const
Definition: seq_map_ci.hpp:623
bool x_TopNext(void)
Definition: seq_map_ci.cpp:558
bool operator!=(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:748
bool GetRefMinusStrand(void) const
Definition: seq_map_ci.hpp:700
vector< TSegmentInfo > TStack
Definition: seq_map_ci.hpp:384
bool x_TopPrev(void)
Definition: seq_map_ci.cpp:573
TSeqPos x_GetSkipBefore(void) const
Definition: seq_map_ci.hpp:540
CSeqMap::ESegmentType GetType(void) const
Definition: seq_map_ci.hpp:651
TSeqPos m_SearchPos
Definition: seq_map_ci.hpp:393
bool GetRefMinusStrand(void) const
Definition: seq_map_ci.hpp:567
DECLARE_OPERATOR_BOOL(IsValid())
bool x_CanResolve(const CSeqMap::CSegment &seg) const
Definition: seq_map_ci.cpp:381
CBioseq_Handle x_GetBioseq(const CSeq_id &seq_id) const
Definition: seq_map_ci.cpp:388
TSeqPos x_GetLevelPos(void) const
Definition: seq_map_ci.hpp:526
bool IsSetData(void) const
Definition: seq_map_ci.hpp:658
void x_UpdateLength(void)
Definition: seq_map_ci.cpp:733
bool m_FeaturePolicyWasApplied
Definition: seq_map_ci.hpp:396
SSeqMapSelector & SetRange(TSeqPos start, TSeqPos length)
Set range for iterator.
Definition: seq_map_ci.hpp:127
CSeqMap::ESegmentType GetType(void) const
Definition: seq_map_ci.hpp:583
SSeqMapSelector::TFlags TFlags
Definition: seq_map_ci.hpp:254
bool operator<(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:724
size_t x_GetIndex(void) const
Definition: seq_map_ci.hpp:487
bool FeaturePolicyWasApplied(void) const
Definition: seq_map_ci.hpp:799
void PopResolve(void)
Definition: seq_map_ci.hpp:211
bool InRange(void) const
Definition: seq_map_ci.hpp:574
CTSE_Handle m_LimitTSE
Definition: seq_map_ci.hpp:242
bool x_Pop(void)
Definition: seq_map_ci.cpp:542
SSeqMapSelector & SetLinkUsedTSE(vector< CTSE_Handle > &used_tses)
Definition: seq_map_ci.hpp:168
TSeqPos GetRefEndPosition(void) const
Definition: seq_map_ci.hpp:707
SSeqMapSelector & SetRange(const TRange &range)
Set range for iterator - CRange<> version.
Definition: seq_map_ci.hpp:136
TFlags GetFlags(void) const
Definition: seq_map_ci.hpp:785
vector< CTSE_Handle > * m_UsedTSEs
Definition: seq_map_ci.hpp:246
bool x_Push(TSeqPos offset, bool resolveExternal)
Definition: seq_map_ci.cpp:412
SSeqMapSelector & SetStrand(ENa_strand strand)
Set strand to iterate over.
Definition: seq_map_ci.hpp:144
bool IsInvalid(void) const
Definition: seq_map_ci.hpp:686
TSeqPos x_GetLevelRealEnd(void) const
Definition: seq_map_ci.hpp:518
TSeqPos GetPosition(void) const
return position of current segment in sequence
Definition: seq_map_ci.hpp:665
const CSeqMap::CSegment & x_GetNextSegment(void) const
bool operator>(const CSeqMap_CI &seg) const
Definition: seq_map_ci.hpp:736
SSeqMapSelector & SetByFeaturePolicy(void)
Definition: seq_map_ci.hpp:185
TSeqPos GetLength(void) const
return length of current segment
Definition: seq_map_ci.hpp:672
bool x_HasLimitTSE(void) const
Definition: seq_map_ci.hpp:223
size_t GetDepth(void) const
return the depth of current segment
Definition: seq_map_ci.hpp:602
const CTSE_Handle & GetUsingTSE(void) const
Definition: seq_map_ci.hpp:792
void x_Resolve(TSeqPos pos)
bool Prev(void)
Definition: seq_map_ci.cpp:712
bool x_Prev(void)
Definition: seq_map_ci.cpp:611
atomic< TSeqPos > m_Position
Definition: seq_map.hpp:253
const CSegment & x_GetSegment(size_t index) const
Definition: seq_map.hpp:447
int TFlags
Definition: seq_map.hpp:142
bool IsSetData(void) const
Definition: seq_map.hpp:418
atomic< TSeqPos > m_Length
Definition: seq_map.hpp:255
ESegmentType
Definition: seq_map.hpp:96
@ fBySequenceClass
Definition: seq_map.hpp:136
@ fByFeaturePolicy
Definition: seq_map.hpp:135
@ eSeqEnd
Definition: seq_map.hpp:101
int8_t Int1
1-byte (8-bit) signed integer
Definition: ncbitype.h:98
#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 NCBI_XOBJMGR_EXPORT
Definition: ncbi_export.h:1307
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
E_Choice
Choice variants.
Definition: Seq_data_.hpp:102
bool InRange(TModelUnit z, TModelUnit z1, TModelUnit z2)
range(_Ty, _Ty) -> range< _Ty >
S & operator--(CNetRef< S > &r, int)
T max(T x_, T y_)
T min(T x_, T y_)
static pcre_uint8 * buffer
Definition: pcretest.c:1051
Selector used in CSeqMap methods returning iterators.
Definition: seq_map_ci.hpp:113
#define _ASSERT
bool operator>(const typename tree< T, tree_node_allocator >::iterator_base &one, const typename tree< T, tree_node_allocator >::iterator_base &two)
Definition: tree_msvc7.hpp:426
CScope & GetScope()
Modified on Sat May 18 11:35:55 2024 by modify_doxy.py rev. 669887