NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
CSeqMap Class Reference

Search Toolkit Book for CSeqMap

CSeqMap –. More...

#include <objmgr/seq_map.hpp>

+ Inheritance diagram for CSeqMap:
+ Collaboration diagram for CSeqMap:

Classes

class  CSegment
 
class  SPosLessSegment
 

Public Types

enum  ESegmentType {
  eSeqGap , eSeqData , eSeqSubMap , eSeqRef ,
  eSeqEnd , eSeqChunk , eSeqLiteral
}
 
enum  EFlags {
  fFindData = (1<<0) , fFindGap = (1<<1) , fFindLeafRef = (1<<2) , fFindInnerRef = (1<<3) ,
  fFindExactLevel = (1<<4) , fIgnoreUnresolved = (1<<5) , fByFeaturePolicy = (1<<6) , fBySequenceClass = (1<<7) ,
  fFindRef = (fFindLeafRef | fFindInnerRef) , fFindAny = fFindData | fFindGap | fFindRef , fFindAnyLeaf = fFindData | fFindGap | fFindLeafRef , fDefaultFlags = fFindAnyLeaf
}
 Segment type flags. More...
 
typedef CSeq_inst::TMol TMol
 
typedef CSeqMap_CI const_iterator
 
typedef int TFlags
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 ~CSeqMap (void)
 
size_t GetSegmentsCount (void) const
 
TSeqPos GetLength (CScope *scope) const
 
TMol GetMol (void) const
 
const_iterator begin (CScope *scope) const
 STL style methods. More...
 
const_iterator end (CScope *scope) const
 
CSeqMap_CI Begin (CScope *scope) const
 NCBI style methods. More...
 
CSeqMap_CI End (CScope *scope) const
 
CSeqMap_CI FindSegment (TSeqPos pos, CScope *scope) const
 Find segment containing the position. More...
 
CSeqMap_CI BeginResolved (CScope *scope) const
 
CSeqMap_CI BeginResolved (CScope *scope, const SSeqMapSelector &selector) const
 
CSeqMap_CI EndResolved (CScope *scope) const
 
CSeqMap_CI EndResolved (CScope *scope, const SSeqMapSelector &selector) const
 
CSeqMap_CI FindResolved (CScope *scope, TSeqPos pos, const SSeqMapSelector &selector) const
 
CSeqMap_CI ResolvedRangeIterator (CScope *scope, TSeqPos from, TSeqPos length, ENa_strand strand=eNa_strand_plus, size_t maxResolve=size_t(-1), TFlags flags=fDefaultFlags) const
 Iterate segments in the range with specified strand coordinates. More...
 
bool HasSegmentOfType (ESegmentType type) const
 
size_t CountSegmentsOfType (ESegmentType type) const
 
bool CanResolveRange (CScope *scope, const SSeqMapSelector &sel) const
 
bool CanResolveRange (CScope *scope, TSeqPos from, TSeqPos length, ENa_strand strand=eNa_strand_plus, size_t maxResolve=size_t(-1), TFlags flags=fDefaultFlags) const
 
CRef< CSeqMapCloneFor (const CBioseq &seq) const
 
 CSeqMap (const CSeqMap &sm)
 
void SetRegionInChunk (CTSE_Chunk_Info &chunk, TSeqPos pos, TSeqPos length)
 
void LoadSeq_data (TSeqPos pos, TSeqPos len, const CSeq_data &data)
 
void SetSegmentGap (const CSeqMap_CI &seg, TSeqPos length)
 
void SetSegmentGap (const CSeqMap_CI &seg, TSeqPos length, CSeq_data &gap_data)
 
void SetSegmentData (const CSeqMap_CI &seg, TSeqPos length, CSeq_data &data)
 
void SetSegmentRef (const CSeqMap_CI &seg, TSeqPos length, const CSeq_id_Handle &ref_id, TSeqPos ref_pos, bool ref_minus_strand)
 
CSeqMap_CI InsertSegmentGap (const CSeqMap_CI &seg, TSeqPos length)
 Insert new gap into sequence map. More...
 
CSeqMap_CI RemoveSegment (const CSeqMap_CI &seg)
 Delete segment from sequence map. More...
 
void SetRepr (CSeq_inst::TRepr repr)
 
void ResetRepr (void)
 
void SetMol (CSeq_inst::TMol mol)
 
void ResetMol (void)
 
bool HasZeroGapAt (TSeqPos pos, CScope *scope=0) const
 Returns true if there is zero-length gap at position. More...
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Static Public Member Functions

static CRef< CSeqMapCreateSeqMapForBioseq (const CBioseq &seq)
 
static CRef< CSeqMapCreateSeqMapForSeq_loc (const CSeq_loc &loc, CScope *scope)
 
static CConstRef< CSeqMapGetSeqMapForSeq_loc (const CSeq_loc &loc, CScope *scope)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Protected Types

typedef vector< CSegmentTSegments
 
typedef Uint1 THasSegments
 
typedef bool TChanged
 

Protected Member Functions

 CSeqMap (CSeqMap *parent, size_t index)
 
 CSeqMap (void)
 
 CSeqMap (const CSeq_loc &ref)
 
 CSeqMap (TSeqPos len)
 
 CSeqMap (const CSeq_inst &inst)
 
void x_AddEnd (void)
 
void x_AddSegment (ESegmentType type, TSeqPos len, bool unknown_len=false)
 
void x_AddSegment (ESegmentType type, TSeqPos len, const CObject *object)
 
void x_AddSegment (ESegmentType type, const CObject *object, TSeqPos refPos, TSeqPos len, ENa_strand strand=eNa_strand_plus)
 
void x_AddGap (TSeqPos len, bool unknown_len)
 
void x_AddGap (TSeqPos len, bool unknown_len, const CSeq_data &gap_data)
 
void x_AddGap (TSeqPos len, bool unknown_len, const CSeq_literal &gap_data)
 
void x_Add (CSeqMap *submap)
 
void x_Add (const CSeq_data &data, TSeqPos len)
 
void x_Add (const CPacked_seqint &seq)
 
void x_Add (const CPacked_seqpnt &seq)
 
void x_Add (const CSeq_loc_mix &seq)
 
void x_Add (const CSeq_loc_equiv &seq)
 
void x_Add (const CSeq_literal &seq)
 
void x_Add (const CDelta_seq &seq)
 
void x_Add (const CSeq_loc &seq)
 
void x_Add (const CSeq_id &seq)
 
void x_Add (const CSeq_point &seq)
 
void x_Add (const CSeq_interval &seq)
 
void x_AddUnloadedSeq_data (TSeqPos len)
 
size_t x_GetLastEndSegmentIndex (void) const
 
size_t x_GetFirstEndSegmentIndex (void) const
 
const CSegmentx_GetSegment (size_t index) const
 
void x_GetSegmentException (size_t index) const
 
CSegmentx_SetSegment (size_t index)
 
size_t x_FindSegment (TSeqPos position, CScope *scope) const
 
TSeqPos x_GetSegmentLength (size_t index, CScope *scope) const
 
TSeqPos x_GetSegmentPosition (size_t index, CScope *scope) const
 
TSeqPos x_GetSegmentEndPosition (size_t index, CScope *scope) const
 
TSeqPos x_ResolveSegmentLength (size_t index, CScope *scope) const
 
TSeqPos x_ResolveSegmentPosition (size_t index, CScope *scope) const
 
void x_StartEditing (void)
 
bool x_IsChanged (void) const
 
void x_SetChanged (size_t index)
 
bool x_UpdateSeq_inst (CSeq_inst &inst)
 
bool x_DoUpdateSeq_inst (CSeq_inst &inst)
 
const CBioseq_Infox_GetBioseqInfo (const CSegment &seg, CScope *scope) const
 
CConstRef< CSeqMapx_GetSubSeqMap (const CSegment &seg, CScope *scope, bool resolveExternal=false) const
 
const CSeq_datax_GetSeq_data (const CSegment &seg) const
 
CConstRef< CSeq_literalx_GetSeq_literal (const CSegment &seg) const
 
const CSeq_idx_GetRefSeqid (const CSegment &seg) const
 
TSeqPos x_GetRefPosition (const CSegment &seg) const
 
bool x_GetRefMinusStrand (const CSegment &seg) const
 
void x_LoadObject (const CSegment &seg) const
 
CRef< CTSE_Chunk_Infox_GetChunkToLoad (const CSegment &seg) const
 
const CObjectx_GetObject (const CSegment &seg) const
 
void x_SetObject (CSegment &seg, const CObject &obj)
 
void x_SetChunk (CSegment &seg, CTSE_Chunk_Info &chunk)
 
void x_SetSeq_data (size_t index, CSeq_data &data)
 
void x_SetSubSeqMap (size_t index, CSeqMap_Delta_seqs *subMap)
 
void x_SetSegmentGap (size_t index, TSeqPos length, CSeq_data *gap_data=0)
 
void x_SetSegmentData (size_t index, TSeqPos length, CSeq_data &data)
 
void x_SetSegmentRef (size_t index, TSeqPos length, const CSeq_id &ref_id, TSeqPos ref_pos, bool ref_minus_strand)
 
int x_GetSequenceClass (void) const
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

CBioseq_Infom_Bioseq
 
vector< CSegmentm_Segments
 
atomic< size_t > m_Resolved
 
CRef< CObjectm_Delta
 
TMol m_Mol
 
atomic< THasSegmentsm_HasSegments
 
TChanged m_Changed
 
atomic< TSeqPosm_SeqLength
 
CMutex m_SeqMap_Mtx
 

Private Member Functions

void ResolveAll (void) const
 
CSeqMapoperator= (const CSeqMap &)
 

Friends

class CSegment
 
class SPosLessSegment
 
class CSeqMap_SeqPoss
 
class CBioseq_Info
 
class CSeqMap_CI
 
class CSeqMap_CI_SegmentInfo
 

Additional Inherited Members

- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 

Detailed Description

CSeqMap –.

Formal sequence map – to describe sequence parts in general – location and type only, without providing real data

Definition at line 92 of file seq_map.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:11 2024 by modify_doxy.py rev. 669887