NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
CCompareFeats Class Reference

Search Toolkit Book for CCompareFeats

CCompareFeats represens a result of comparison of two features. More...

#include <algo/sequence/compare_feats.hpp>

+ Inheritance diagram for CCompareFeats:
+ Collaboration diagram for CCompareFeats:

Public Member Functions

 CCompareFeats (const CSeq_feat &feat1, const CSeq_loc &feat1_mapped_loc, double mapped_identity, const CSeq_loc &feat1_self_loc, CScope *scope1, const CSeq_feat &feat2, const CSeq_loc &feat2_self_loc, CScope *scope2)
 
 CCompareFeats (const CSeq_feat &feat1, const CSeq_loc &feat1_mapped_loc, double mapped_identity, const CSeq_loc &feat1_self_loc, CScope *scope1)
 No matching feat2. More...
 
 CCompareFeats (const CSeq_feat &feat2, const CSeq_loc &feat2_self_loc, double mapped_identity, CScope *scope2)
 No matching feat1. More...
 
double GetMappedIdentity () const
 
bool IsSameSubtype () const
 
bool IsSameType () const
 
bool IsIdentical () const
 
CConstRef< CSeq_featGetFeatQ () const
 
CConstRef< CSeq_featGetFeatT () const
 
CConstRef< CSeq_locGetMappedLocQ () const
 
CConstRef< CSeq_locGetSelfLocQ () const
 
CConstRef< CSeq_locGetSelfLocT () const
 
bool IsMatch () const
 
CConstRef< CCompareSeq_locsGetComparison () const
 
int GetIrrelevance () const
 
void SetIrrelevance (int val)
 
- 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 string s_GetLocLabel (const CSeq_loc &loc, bool merged=false)
 
static string s_GetFeatLabel (const CSeq_feat &gene_feat, feature::TFeatLabelFlags type=feature::fFGL_Both)
 
- 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)
 

Private Attributes

CConstRef< CSeq_featm_feat1
 
CConstRef< CSeq_locm_feat1_mapped_loc
 
CConstRef< CSeq_locm_feat1_self_loc
 
CScopem_scope_q
 
CConstRef< CSeq_featm_feat2
 
CConstRef< CSeq_locm_feat2_self_loc
 
CScopem_scope_t
 
CRef< CCompareSeq_locsm_compare
 
int m_irrelevance
 
bool m_unmatched
 
double m_mapped_identity
 

Friends

CNcbiOstreamoperator<< (CNcbiOstream &out, const CCompareFeats &cf)
 

Additional Inherited Members

- 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...
 
- 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...
 

Detailed Description

CCompareFeats represens a result of comparison of two features.

(CCompareFeats::m_compare stores the actual result) These comparisons will be produces by CCompare_Regions

Definition at line 349 of file compare_feats.hpp.

Constructor & Destructor Documentation

◆ CCompareFeats() [1/3]

CCompareFeats::CCompareFeats ( const CSeq_feat feat1,
const CSeq_loc feat1_mapped_loc,
double  mapped_identity,
const CSeq_loc feat1_self_loc,
CScope scope1,
const CSeq_feat feat2,
const CSeq_loc feat2_self_loc,
CScope scope2 
)
inline

Definition at line 352 of file compare_feats.hpp.

◆ CCompareFeats() [2/3]

CCompareFeats::CCompareFeats ( const CSeq_feat feat1,
const CSeq_loc feat1_mapped_loc,
double  mapped_identity,
const CSeq_loc feat1_self_loc,
CScope scope1 
)
inline

No matching feat2.

Parameters
feat1_mapped_locmapped to feat2's coordinate system

Definition at line 374 of file compare_feats.hpp.

◆ CCompareFeats() [3/3]

CCompareFeats::CCompareFeats ( const CSeq_feat feat2,
const CSeq_loc feat2_self_loc,
double  mapped_identity,
CScope scope2 
)
inline

No matching feat1.

Definition at line 388 of file compare_feats.hpp.

Member Function Documentation

◆ GetComparison()

CConstRef<CCompareSeq_locs> CCompareFeats::GetComparison ( ) const
inline

Definition at line 461 of file compare_feats.hpp.

References m_compare.

◆ GetFeatQ()

CConstRef<CSeq_feat> CCompareFeats::GetFeatQ ( ) const
inline

Definition at line 453 of file compare_feats.hpp.

References m_feat1.

◆ GetFeatT()

CConstRef<CSeq_feat> CCompareFeats::GetFeatT ( ) const
inline

Definition at line 454 of file compare_feats.hpp.

References m_feat2.

◆ GetIrrelevance()

int CCompareFeats::GetIrrelevance ( ) const
inline

Definition at line 464 of file compare_feats.hpp.

References m_irrelevance.

◆ GetMappedIdentity()

double CCompareFeats::GetMappedIdentity ( ) const
inline

Definition at line 402 of file compare_feats.hpp.

References m_mapped_identity.

Referenced by operator<<().

◆ GetMappedLocQ()

CConstRef<CSeq_loc> CCompareFeats::GetMappedLocQ ( ) const
inline

Definition at line 456 of file compare_feats.hpp.

References m_feat1_mapped_loc.

◆ GetSelfLocQ()

CConstRef<CSeq_loc> CCompareFeats::GetSelfLocQ ( ) const
inline

Definition at line 457 of file compare_feats.hpp.

References m_feat1_self_loc.

◆ GetSelfLocT()

CConstRef<CSeq_loc> CCompareFeats::GetSelfLocT ( ) const
inline

Definition at line 458 of file compare_feats.hpp.

References m_feat2_self_loc.

◆ IsIdentical()

bool CCompareFeats::IsIdentical ( ) const
inline

◆ IsMatch()

bool CCompareFeats::IsMatch ( ) const
inline

Definition at line 460 of file compare_feats.hpp.

References CConstRef< C, Locker >::IsNull(), m_feat1, and m_feat2.

Referenced by IsIdentical(), IsSameSubtype(), and IsSameType().

◆ IsSameSubtype()

bool CCompareFeats::IsSameSubtype ( ) const
inline

◆ IsSameType()

bool CCompareFeats::IsSameType ( ) const
inline

◆ s_GetFeatLabel()

static string CCompareFeats::s_GetFeatLabel ( const CSeq_feat gene_feat,
feature::TFeatLabelFlags  type = feature::fFGL_Both 
)
inlinestatic

Definition at line 445 of file compare_feats.hpp.

References GetLabel(), and NULL.

Referenced by IsIdentical(), and operator<<().

◆ s_GetLocLabel()

static string CCompareFeats::s_GetLocLabel ( const CSeq_loc loc,
bool  merged = false 
)
inlinestatic

Definition at line 432 of file compare_feats.hpp.

References CSeq_loc::fMerge_SingleRange, CSeq_loc::GetLabel(), NULL, and Seq_loc_Merge().

Referenced by operator<<().

◆ SetIrrelevance()

void CCompareFeats::SetIrrelevance ( int  val)
inline

Definition at line 465 of file compare_feats.hpp.

References m_irrelevance, and val.

Friends And Related Function Documentation

◆ operator<<

CNcbiOstream& operator<< ( CNcbiOstream out,
const CCompareFeats cf 
)
friend

Definition at line 134 of file compare_feats.cpp.

Member Data Documentation

◆ m_compare

CRef<CCompareSeq_locs> CCompareFeats::m_compare
private

Definition at line 478 of file compare_feats.hpp.

Referenced by GetComparison(), IsIdentical(), and operator<<().

◆ m_feat1

CConstRef<CSeq_feat> CCompareFeats::m_feat1
private

Definition at line 467 of file compare_feats.hpp.

Referenced by GetFeatQ(), IsIdentical(), IsMatch(), IsSameSubtype(), IsSameType(), and operator<<().

◆ m_feat1_mapped_loc

CConstRef<CSeq_loc> CCompareFeats::m_feat1_mapped_loc
private

Definition at line 468 of file compare_feats.hpp.

Referenced by GetMappedLocQ(), and operator<<().

◆ m_feat1_self_loc

CConstRef<CSeq_loc> CCompareFeats::m_feat1_self_loc
private

Definition at line 469 of file compare_feats.hpp.

Referenced by GetSelfLocQ().

◆ m_feat2

CConstRef<CSeq_feat> CCompareFeats::m_feat2
private

Definition at line 473 of file compare_feats.hpp.

Referenced by GetFeatT(), IsIdentical(), IsMatch(), IsSameSubtype(), IsSameType(), and operator<<().

◆ m_feat2_self_loc

CConstRef<CSeq_loc> CCompareFeats::m_feat2_self_loc
private

Definition at line 474 of file compare_feats.hpp.

Referenced by GetSelfLocT().

◆ m_irrelevance

int CCompareFeats::m_irrelevance
private

Definition at line 479 of file compare_feats.hpp.

Referenced by GetIrrelevance(), and SetIrrelevance().

◆ m_mapped_identity

double CCompareFeats::m_mapped_identity
private

Definition at line 481 of file compare_feats.hpp.

Referenced by GetMappedIdentity().

◆ m_scope_q

CScope* CCompareFeats::m_scope_q
private

Definition at line 470 of file compare_feats.hpp.

◆ m_scope_t

CScope* CCompareFeats::m_scope_t
private

Definition at line 475 of file compare_feats.hpp.

◆ m_unmatched

bool CCompareFeats::m_unmatched
private

Definition at line 480 of file compare_feats.hpp.

Referenced by operator<<().


The documentation for this class was generated from the following file:
Modified on Tue Dec 05 02:07:01 2023 by modify_doxy.py rev. 669887