NCBI C++ ToolKit
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CAlnVecGraphicDataSource Class Reference

Search Toolkit Book for CAlnVecGraphicDataSource

CAlnVecGraphicDataSource - implementation of CAlnGraphicDataSource for CAlnVec-based alignments. More...

#include <gui/widgets/seq_graphic/alnvec_graphic_ds.hpp>

+ Inheritance diagram for CAlnVecGraphicDataSource:
+ Collaboration diagram for CAlnVecGraphicDataSource:

Public Member Functions

 CAlnVecGraphicDataSource (const objects::CAlnVec &aln_mgr)
 
 ~CAlnVecGraphicDataSource ()
 
CAlnGraphicDataSource implementation
virtual IAlnExplorer::EAlignType GetAlignType () const
 
virtual TNumrow GetNumRows (void) const
 
virtual TSeqPos GetAlnStart (void) const
 
virtual TSeqPos GetAlnStop (void) const
 
virtual TSeqPos GetSeqStart (TNumrow row) const
 
virtual TSeqPos GetSeqStop (TNumrow row) const
 
virtual TSignedRange GetAlnRange (void) const
 
virtual TSignedRange GetSeqAlnRange (TNumrow row) const
 
virtual TSeqPos GetSeqLength (TNumrow row) const
 
virtual TSeqPos GetBaseWidth (TNumrow row) const
 
virtual TNumrow GetAnchor (void) const
 
virtual const objects::CSeq_id & GetSeqId (TNumrow row) const
 
virtual const objects::CBioseq_Handle & GetBioseqHandle (TNumrow row) const
 
virtual bool IsPositiveStrand (TNumrow row) const
 
virtual bool IsNegativeStrand (TNumrow row) const
 
virtual TSignedSeqPos GetSeqPosFromAlnPos (TNumrow for_row, TSeqPos aln_pos, TSearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const
 
virtual TSignedSeqPos GetAlnPosFromSeqPos (TNumrow row, TSeqPos seq_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const
 
virtual stringGetAlnSeqString (TNumrow row, string &buffer, const TSignedRange &aln_range) const
 
virtual IAlnSegmentIteratorCreateSegmentIterator (TNumrow row, const TSignedRange &range, IAlnSegmentIterator::EFlags flags) const
 
virtual TSignedSeqPos GetSeqPosFromSeqPos (TNumrow for_row, TNumrow row, TSeqPos seq_pos) const
 
virtual EPolyATail HasPolyATail () const
 Check if there is any unaligned polyA tail. More...
 
virtual bool HasCigar () const
 Check if there is a CIGAR string. More...
 
virtual const TCigarGetCigar () const
 Get CIGAR vector. More...
 
- Public Member Functions inherited from IAlnGraphicDataSource
virtual stringGetSeqString (string &buffer, TNumrow row, const TSignedRange &seq_rng, const TSignedRange &aln_rng, bool anchor_direct) const
 Get sequence string for a given row in sequence range. More...
 
virtual TSignedSeqPos AlnPosToNativeSeqPos (TNumrow row, TSignedSeqPos aln_pos) const
 Convert alignment (genomic) coordinate on the selected row to real sequence position. More...
 
virtual TSignedSeqPos NativeSeqPosToAlnPos (TNumrow row, TSignedSeqPos seq_pos, int frame=0) const
 Convert sequence position to alignment (genomic) coordinate. More...
 
virtual IAlnExplorer::TNumrow GetQuery () const
 
virtual void GetUnalignedTails (TSignedSeqPos &start_tail, TSignedSeqPos &end_tail, bool clipped=true) const
 
const TSignedSeqPos GetUnalignedTailLimit () const
 
virtual TSeqRange GetAlnRangeWithTails () const
 
virtual bool IsCigarUnambiguous () const
 Check if cigar doesn't have ambiguous M's. More...
 
virtual bool IsSimplified () const
 
virtual bool IsRegular () const
 
bool IsPartial () const
 
int GetPartialFlags () const
 
void SetPartialFlags (int partial_flags)
 
virtual bool IsColoringAvailable () const
 
virtual const TCigarPairGetCigarAtAlnPos (int row, TSignedSeqPos pos) const
 
int GetGenCode (IAlnExplorer::TNumrow row) const
 
- Public Member Functions inherited from CObjectEx
 CObjectEx (void)
 
virtual ~CObjectEx (void)
 
- 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
 
- Public Member Functions inherited from CWeakObject
 CWeakObject (void)
 
virtual ~CWeakObject (void)
 
CPtrToObjectProxyGetPtrProxy (void) const
 Get pointer to proxy object containing pointer to this object. More...
 
- Public Member Functions inherited from IScoringAlignment
virtual ~IScoringAlignment ()
 
virtual bool IsMixedAlign () const
 New interfaces to handle alignemnt with mixed type (protein-to-genomic) To make them backward compatible, they have default implementation. More...
 
- Public Member Functions inherited from CEventHandler
 CEventHandler ()
 CEventHandler. More...
 
virtual ~CEventHandler ()
 
virtual void AddListener (CEventHandler *listener, int pool_name=ePool_Default)
 Add a listener. More...
 
virtual void RemoveListener (CEventHandler *listener)
 Remove a listener. More...
 
virtual void RemoveAllListeners (void)
 
virtual bool HasListener (CEventHandler *listener, int pool_name=ePool_Default) const
 returns "true" if the given listener belongs to the specified pool More...
 
virtual const TListenersGetListeners (int pool_name=ePool_Default) const
 returns a set of listeners fro the specified pool More...
 
virtual bool OnEvent (CEvent *evt)
 Processes en event. Returns "true" if event has been processed. More...
 
virtual bool Dispatch (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Dispatches an event to the listeners (but does not handle it). More...
 
virtual bool Send (CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Sends an event synchronously. More...
 
virtual bool Send (CEvent *evt, int pool_name)
 
void Post (CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
 Handles an event asynchronously (process and/or dispatch). More...
 

Protected Attributes

CConstRef< objects::CAlnVec > m_AlnVec
 
- Protected Attributes inherited from IAlnGraphicDataSource
const TSignedSeqPos m_kUnalignedTailLimit = 200
 Unaligned tail length limit. More...
 
unique_ptr< vector< int > > m_GenCodeCache
 
int m_PartialFlags = ePartial_None
 Data source does not represent the whole alignment alignment has been sliced to optimize rendering. More...
 
- Protected Attributes inherited from CEventHandler
TPools m_Pools
 

Private Member Functions

 CAlnVecGraphicDataSource (const CAlnVecGraphicDataSource &ds)
 
CAlnVecGraphicDataSourceoperator= (const CAlnVecGraphicDataSource &ds)
 

Additional Inherited Members

- Public Types inherited from IAlnGraphicDataSource
enum  EPolyATail { ePolyA_Yes , ePolyA_No , ePolyA_Unknown }
 Cetantiy of having unaligned polyA tail. More...
 
enum  ECigarOp {
  eCigar_M = 'M' , eCigar_I = 'I' , eCigar_D = 'D' , eCigar_N = 'N' ,
  eCigar_S = 'S' , eCigar_H = 'H' , eCigar_P = 'P' , eCigar_Eq = '=' ,
  eCigar_X = 'X'
}
 
enum  EPartialAlignment { ePartial_None = 0 , ePartial_5prime = 1 << 0 , ePartial_3prime = 1 << 1 }
 datasource may point to an alignment that was modified from the original actual alignment it's done to optimize rendering. More...
 
typedef pair< ECigarOp, size_t > TCigarPair
 
typedef vector< TCigarPairTCigar
 
typedef IAlnExplorer::TSignedRange TSignedRange
 
typedef IAlnExplorer::TNumrow TNumrow
 
typedef IAlnExplorer::TResidue TResidue
 
typedef IAlnExplorer::ESearchDirection TSearchDirection
 
typedef CRangeCollection< TSeqPosTRangeColl
 
- 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 Types inherited from CEventHandler
enum  EDispatch { eDispatch_SelfOnly , eDispatch_AllHandlers , eDispatch_FirstHandler , eDispatch_Default = eDispatch_AllHandlers }
 enum controlling dispatching strategies More...
 
enum  EPoolName {
  ePool_Default = 0 , ePool_Parent , ePool_Child , ePool_Sibling ,
  ePool_NextAvailable
}
 Identifiers for standard pools. More...
 
typedef vector< CEventHandler * > TListeners
 
typedef map< int, TListenersTPools
 
typedef list< AutoPtr< SPostRequest > > TPostRequests
 
typedef std::map< CEventHandler *, intTHandlerToCount
 
typedef void(* FOnPostCallback) ()
 
- 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)
 
- Static Public Member Functions inherited from CEventHandler
static bool HandlePostRequest ()
 
static void ClearPostQueue ()
 erases all events from the queue More...
 
static void DestroyPostQueue ()
 
- 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...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Member Functions inherited from CWeakObject
void CleanWeakRefs (void) const
 Method cleaning all CWeakRefs referencing at this moment to the object After calling to this method all existing CWeakRefs referencing to the object will return NULL, so it effectively will be equal to deleting the object. More...
 
- Protected Member Functions inherited from CEventHandler
virtual const SEvtMapGetEventMap () const
 
void x_DeclareDead ()
 Removes itself unavailable for async event delivery. More...
 
void x_AddListenerToPool (CEventHandler *listener, int pool_name)
 
- Static Protected Attributes inherited from CEventHandler
static const SEvtMap sm_EvtMap
 

Detailed Description

CAlnVecGraphicDataSource - implementation of CAlnGraphicDataSource for CAlnVec-based alignments.

Definition at line 48 of file alnvec_graphic_ds.hpp.

Constructor & Destructor Documentation

◆ CAlnVecGraphicDataSource() [1/2]

CAlnVecGraphicDataSource::CAlnVecGraphicDataSource ( const objects::CAlnVec &  aln_mgr)

Definition at line 49 of file alnvec_graphic_ds.cpp.

◆ ~CAlnVecGraphicDataSource()

CAlnVecGraphicDataSource::~CAlnVecGraphicDataSource ( )

Definition at line 55 of file alnvec_graphic_ds.cpp.

◆ CAlnVecGraphicDataSource() [2/2]

CAlnVecGraphicDataSource::CAlnVecGraphicDataSource ( const CAlnVecGraphicDataSource ds)
private

Member Function Documentation

◆ CreateSegmentIterator()

IAlnSegmentIterator * CAlnVecGraphicDataSource::CreateSegmentIterator ( TNumrow  row,
const TSignedRange range,
IAlnSegmentIterator::EFlags  flags 
) const
virtual

◆ GetAlignType()

IAlnExplorer::EAlignType CAlnVecGraphicDataSource::GetAlignType ( void  ) const
virtual

◆ GetAlnPosFromSeqPos()

TSignedSeqPos CAlnVecGraphicDataSource::GetAlnPosFromSeqPos ( TNumrow  row,
TSeqPos  seq_pos,
IAlnExplorer::ESearchDirection  dir = IAlnExplorer::eNone,
bool  try_reverse_dir = true 
) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 173 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetAlnRange()

IAlnExplorer::TSignedRange CAlnVecGraphicDataSource::GetAlnRange ( void  ) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 109 of file alnvec_graphic_ds.cpp.

References m_AlnVec.

◆ GetAlnSeqString()

string & CAlnVecGraphicDataSource::GetAlnSeqString ( TNumrow  row,
string buffer,
const TSignedRange aln_range 
) const
virtual

Implements IScoringAlignment.

Definition at line 182 of file alnvec_graphic_ds.cpp.

References buffer, m_AlnVec, and row.

◆ GetAlnStart()

TSeqPos CAlnVecGraphicDataSource::GetAlnStart ( void  ) const
virtual

Implements IScoringAlignment.

Definition at line 84 of file alnvec_graphic_ds.cpp.

References m_AlnVec.

◆ GetAlnStop()

TSeqPos CAlnVecGraphicDataSource::GetAlnStop ( void  ) const
virtual

Implements IScoringAlignment.

Definition at line 90 of file alnvec_graphic_ds.cpp.

References m_AlnVec.

◆ GetAnchor()

CAlnVecGraphicDataSource::TNumrow CAlnVecGraphicDataSource::GetAnchor ( void  ) const
virtual

Implements IScoringAlignment.

Definition at line 135 of file alnvec_graphic_ds.cpp.

References m_AlnVec.

◆ GetBaseWidth()

TSeqPos CAlnVecGraphicDataSource::GetBaseWidth ( TNumrow  row) const
virtual

Implements IScoringAlignment.

Definition at line 128 of file alnvec_graphic_ds.cpp.

◆ GetBioseqHandle()

const objects::CBioseq_Handle & CAlnVecGraphicDataSource::GetBioseqHandle ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 148 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetCigar()

virtual const TCigar* CAlnVecGraphicDataSource::GetCigar ( ) const
inlinevirtual

Get CIGAR vector.

Implements IAlnGraphicDataSource.

Definition at line 107 of file alnvec_graphic_ds.hpp.

References NULL.

◆ GetNumRows()

CAlnVecGraphicDataSource::TNumrow CAlnVecGraphicDataSource::GetNumRows ( void  ) const
virtual

Implements IScoringAlignment.

Definition at line 78 of file alnvec_graphic_ds.cpp.

References m_AlnVec.

◆ GetSeqAlnRange()

IAlnExplorer::TSignedRange CAlnVecGraphicDataSource::GetSeqAlnRange ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 116 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqId()

const CSeq_id & CAlnVecGraphicDataSource::GetSeqId ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 142 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqLength()

TSeqPos CAlnVecGraphicDataSource::GetSeqLength ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 122 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqPosFromAlnPos()

TSignedSeqPos CAlnVecGraphicDataSource::GetSeqPosFromAlnPos ( TNumrow  for_row,
TSeqPos  aln_pos,
TSearchDirection  dir = IAlnExplorer::eNone,
bool  try_reverse_dir = true 
) const
virtual

Implements IScoringAlignment.

Definition at line 165 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqPosFromSeqPos()

TSignedSeqPos CAlnVecGraphicDataSource::GetSeqPosFromSeqPos ( TNumrow  for_row,
TNumrow  row,
TSeqPos  seq_pos 
) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 219 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqStart()

TSeqPos CAlnVecGraphicDataSource::GetSeqStart ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 96 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ GetSeqStop()

TSeqPos CAlnVecGraphicDataSource::GetSeqStop ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 102 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ HasCigar()

virtual bool CAlnVecGraphicDataSource::HasCigar ( ) const
inlinevirtual

Check if there is a CIGAR string.

Implements IAlnGraphicDataSource.

Definition at line 102 of file alnvec_graphic_ds.hpp.

◆ HasPolyATail()

virtual EPolyATail CAlnVecGraphicDataSource::HasPolyATail ( ) const
inlinevirtual

Check if there is any unaligned polyA tail.

By default, it returns unknown to ask for further verification.

Implements IAlnGraphicDataSource.

Definition at line 97 of file alnvec_graphic_ds.hpp.

References IAlnGraphicDataSource::ePolyA_Unknown.

◆ IsNegativeStrand()

bool CAlnVecGraphicDataSource::IsNegativeStrand ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 159 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ IsPositiveStrand()

bool CAlnVecGraphicDataSource::IsPositiveStrand ( TNumrow  row) const
virtual

Implements IAlnGraphicDataSource.

Definition at line 153 of file alnvec_graphic_ds.cpp.

References m_AlnVec, and row.

◆ operator=()

CAlnVecGraphicDataSource& CAlnVecGraphicDataSource::operator= ( const CAlnVecGraphicDataSource ds)
private

Member Data Documentation

◆ m_AlnVec

CConstRef<objects::CAlnVec> CAlnVecGraphicDataSource::m_AlnVec
protected

The documentation for this class was generated from the following files:
Modified on Mon May 20 04:58:28 2024 by modify_doxy.py rev. 669887