NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
CFeatGapInfo Class Reference

Search Toolkit Book for CFeatGapInfo

#include <objtools/edit/gap_trim.hpp>

+ Inheritance diagram for CFeatGapInfo:
+ Collaboration diagram for CFeatGapInfo:

Public Types

typedef vector< CRef< CSeq_loc > > TLocList
 
- 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

 CFeatGapInfo ()
 
 CFeatGapInfo (CSeq_feat_Handle sf)
 
 ~CFeatGapInfo ()
 
void CollectGaps (const CSeq_loc &feat_loc, CScope &scope)
 
void CalculateRelevantIntervals (bool unknown_length, bool known_length, bool ns=false)
 
bool HasKnown () const
 
bool HasUnknown () const
 
bool HasNs () const
 
bool Trimmable () const
 
bool Splittable () const
 
bool ShouldRemove () const
 
void Trim (CSeq_loc &loc, bool make_partial, CScope &scope)
 
TLocList Split (const CSeq_loc &orig, bool in_intron, bool make_partial)
 
vector< CRef< CSeq_feat > > AdjustForRelevantGapIntervals (bool make_partial, bool trim, bool split, bool in_intron, bool create_general_only=false)
 
CSeq_feat_Handle GetFeature () const
 
bool IsRelatedByCrossRef (const CFeatGapInfo &other) const
 
- 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< CBioseqAdjustProteinSeq (const CBioseq &seq, const CSeq_feat &feat, const CSeq_feat &orig_cds, 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

enum  EGapIntervalType { eGapIntervalType_unknown = 0 , eGapIntervalType_known , eGapIntervalType_n }
 
typedef pair< EGapIntervalType, pair< size_t, size_t > > TGapInterval
 
typedef vector< TGapIntervalTGapIntervalList
 
typedef vector< pair< size_t, size_t > > TIntervalList
 

Protected Member Functions

void x_AdjustOrigLabel (CSeq_feat &feat, size_t &id_offset, string &id_label, const string &qual)
 
void x_AdjustCodebreaks (CSeq_feat &feat)
 
void x_AdjustAnticodons (CSeq_feat &feat)
 
bool x_UsableInterval (const TGapInterval &interval, bool unknown_length, bool known_length, bool ns)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Static Protected Member Functions

static void x_AdjustFrame (CCdregion &cdregion, TSeqPos frame_adjust)
 

Protected Attributes

TGapIntervalList m_Gaps
 
TIntervalList m_InsideGaps
 
TIntervalList m_LeftGaps
 
TIntervalList m_RightGaps
 
TSeqPos m_Start
 
TSeqPos m_Stop
 
bool m_Known
 
bool m_Unknown
 
bool m_Ns
 
CSeq_feat_Handle m_Feature
 

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

Definition at line 65 of file gap_trim.hpp.

Member Typedef Documentation

◆ TGapInterval

typedef pair<EGapIntervalType, pair<size_t, size_t> > CFeatGapInfo::TGapInterval
protected

Definition at line 99 of file gap_trim.hpp.

◆ TGapIntervalList

typedef vector<TGapInterval> CFeatGapInfo::TGapIntervalList
protected

Definition at line 100 of file gap_trim.hpp.

◆ TIntervalList

typedef vector<pair<size_t, size_t> > CFeatGapInfo::TIntervalList
protected

Definition at line 103 of file gap_trim.hpp.

◆ TLocList

typedef vector< CRef<CSeq_loc> > CFeatGapInfo::TLocList

Definition at line 82 of file gap_trim.hpp.

Member Enumeration Documentation

◆ EGapIntervalType

Enumerator
eGapIntervalType_unknown 
eGapIntervalType_known 
eGapIntervalType_n 

Definition at line 93 of file gap_trim.hpp.

Constructor & Destructor Documentation

◆ CFeatGapInfo() [1/2]

CFeatGapInfo::CFeatGapInfo ( )
inline

Definition at line 67 of file gap_trim.hpp.

◆ CFeatGapInfo() [2/2]

CFeatGapInfo::CFeatGapInfo ( CSeq_feat_Handle  sf)

Definition at line 60 of file gap_trim.cpp.

◆ ~CFeatGapInfo()

CFeatGapInfo::~CFeatGapInfo ( )
inline

Definition at line 69 of file gap_trim.hpp.

Member Function Documentation

◆ AdjustForRelevantGapIntervals()

vector< CRef< CSeq_feat > > CFeatGapInfo::AdjustForRelevantGapIntervals ( bool  make_partial,
bool  trim,
bool  split,
bool  in_intron,
bool  create_general_only = false 
)

◆ AdjustProteinSeq()

CRef< CBioseq > CFeatGapInfo::AdjustProteinSeq ( const CBioseq seq,
const CSeq_feat feat,
const CSeq_feat orig_cds,
CScope scope 
)
static

◆ CalculateRelevantIntervals()

void CFeatGapInfo::CalculateRelevantIntervals ( bool  unknown_length,
bool  known_length,
bool  ns = false 
)

Definition at line 150 of file gap_trim.cpp.

References m_Gaps, m_InsideGaps, m_LeftGaps, m_RightGaps, m_Start, m_Stop, offset, and x_UsableInterval().

◆ CollectGaps()

void CFeatGapInfo::CollectGaps ( const CSeq_loc feat_loc,
CScope scope 
)

◆ GetFeature()

CSeq_feat_Handle CFeatGapInfo::GetFeature ( void  ) const
inline

Definition at line 86 of file gap_trim.hpp.

Referenced by IsRelatedByCrossRef().

◆ HasKnown()

bool CFeatGapInfo::HasKnown ( ) const
inline

Definition at line 73 of file gap_trim.hpp.

◆ HasNs()

bool CFeatGapInfo::HasNs ( ) const
inline

Definition at line 75 of file gap_trim.hpp.

◆ HasUnknown()

bool CFeatGapInfo::HasUnknown ( ) const
inline

Definition at line 74 of file gap_trim.hpp.

◆ IsRelatedByCrossRef()

bool CFeatGapInfo::IsRelatedByCrossRef ( const CFeatGapInfo other) const

Definition at line 722 of file gap_trim.cpp.

References GetFeature(), CSeq_feat_Handle::GetSeq_feat(), and s_IsRelated().

◆ ShouldRemove()

bool CFeatGapInfo::ShouldRemove ( ) const

Definition at line 232 of file gap_trim.cpp.

References m_LeftGaps, and m_Stop.

Referenced by AdjustForRelevantGapIntervals(), and Trimmable().

◆ Split()

CFeatGapInfo::TLocList CFeatGapInfo::Split ( const CSeq_loc orig,
bool  in_intron,
bool  make_partial 
)

◆ Splittable()

bool CFeatGapInfo::Splittable ( ) const

Definition at line 222 of file gap_trim.cpp.

References m_InsideGaps.

◆ Trim()

void CFeatGapInfo::Trim ( CSeq_loc loc,
bool  make_partial,
CScope scope 
)

◆ Trimmable()

bool CFeatGapInfo::Trimmable ( ) const

Definition at line 210 of file gap_trim.cpp.

References m_LeftGaps, m_RightGaps, and ShouldRemove().

Referenced by AdjustForRelevantGapIntervals().

◆ x_AdjustAnticodons()

void CFeatGapInfo::x_AdjustAnticodons ( CSeq_feat feat)
protected

◆ x_AdjustCodebreaks()

void CFeatGapInfo::x_AdjustCodebreaks ( CSeq_feat feat)
protected

◆ x_AdjustFrame()

void CFeatGapInfo::x_AdjustFrame ( CCdregion cdregion,
TSeqPos  frame_adjust 
)
staticprotected

◆ x_AdjustOrigLabel()

void CFeatGapInfo::x_AdjustOrigLabel ( CSeq_feat feat,
size_t &  id_offset,
string id_label,
const string qual 
)
protected

◆ x_UsableInterval()

bool CFeatGapInfo::x_UsableInterval ( const TGapInterval interval,
bool  unknown_length,
bool  known_length,
bool  ns 
)
protected

Member Data Documentation

◆ m_Feature

CSeq_feat_Handle CFeatGapInfo::m_Feature
protected

Definition at line 115 of file gap_trim.hpp.

Referenced by AdjustForRelevantGapIntervals().

◆ m_Gaps

TGapIntervalList CFeatGapInfo::m_Gaps
protected

Definition at line 101 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), and CollectGaps().

◆ m_InsideGaps

TIntervalList CFeatGapInfo::m_InsideGaps
protected

Definition at line 104 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), Split(), and Splittable().

◆ m_Known

bool CFeatGapInfo::m_Known
protected

Definition at line 111 of file gap_trim.hpp.

Referenced by CollectGaps().

◆ m_LeftGaps

TIntervalList CFeatGapInfo::m_LeftGaps
protected

Definition at line 105 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), ShouldRemove(), Trim(), and Trimmable().

◆ m_Ns

bool CFeatGapInfo::m_Ns
protected

Definition at line 113 of file gap_trim.hpp.

Referenced by CollectGaps().

◆ m_RightGaps

TIntervalList CFeatGapInfo::m_RightGaps
protected

Definition at line 106 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), Trim(), and Trimmable().

◆ m_Start

TSeqPos CFeatGapInfo::m_Start
protected

Definition at line 108 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), and CollectGaps().

◆ m_Stop

TSeqPos CFeatGapInfo::m_Stop
protected

Definition at line 109 of file gap_trim.hpp.

Referenced by CalculateRelevantIntervals(), CollectGaps(), and ShouldRemove().

◆ m_Unknown

bool CFeatGapInfo::m_Unknown
protected

Definition at line 112 of file gap_trim.hpp.

Referenced by CollectGaps().


The documentation for this class was generated from the following files:
Modified on Wed Dec 06 07:12:30 2023 by modify_doxy.py rev. 669887