NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
CCompartmentFinder< THit > Class Template Reference

Search Toolkit Book for CCompartmentFinder

#include <algo/align/util/compartment_finder.hpp>

+ Collaboration diagram for CCompartmentFinder< THit >:

Classes

class  CCompartment
 Individual compartment representation. More...
 
struct  SHitStatus
 

Public Types

typedef CRef< THitTHitRef
 
typedef vector< THitRefTHitRefs
 
typedef THit::TCoord TCoord
 

Public Member Functions

 CCompartmentFinder (typename THitRefs::const_iterator start, typename THitRefs::const_iterator finish, CGapInfo< THit > *gap_info=NULL, CPrecalcGapInfo< THit > *prec_gap_info=NULL)
 Create the object from the complete set of local alignments (hits) between the transcript and the genomic sequences. More...
 
void SetMaxOverlap (TCoord max_overlap)
 Set compartment overlap behaviour. More...
 
void SetMaxIntron (TCoord intr_max)
 Set the maximum length of an intron. More...
 
void SetPenalty (TCoord penalty)
 Set the penalty to open a compartment. More...
 
void SetMinMatches (TCoord min_matches)
 Set the minimum matching residues per compartment. More...
 
void SetMinSingletonMatches (TCoord min_matches)
 Set the minimum matching residues per singleton compartment. More...
 
size_t Run (bool cross_filter=false)
 Identify compartments. More...
 
void OrderCompartments (void)
 Order compartments by lower subj coordinate. More...
 
CCompartmentGetFirst (void)
 
CCompartmentGetNext (void)
 

Static Public Member Functions

static TCoord s_GetDefaultMaxOverlap (void)
 Retrieve the default compartment overlap behaviour (no overlap). More...
 
static TCoord s_GetDefaultMaxIntron (void)
 Retrieve the default maximum length of an intron. More...
 
static TCoord s_GetDefaultPenalty (void)
 Retrieve the default compartment penalty, in base pairs. More...
 
static TCoord s_GetDefaultMinCoverage (void)
 Retrieve the default minimum coverage, in base pairs. More...
 

Static Private Member Functions

static size_t sx_XFilter (THitRefs &hitrefs, typename THitRefs::iterator ihr, typename THitRefs::iterator ihr_e, Uint1 w, size_t min_compartment_hit_len)
 
static bool s_PNullRef (const THitRef &hr)
 

Private Attributes

TCoord m_max_overlap
 
TCoord m_intron_max
 
TCoord m_penalty
 
TCoord m_MinMatches
 
TCoord m_MinSingletonMatches
 
THitRefs m_hitrefs
 
vector< CCompartmentm_compartments
 
int m_iter
 
CGapInfo< THit > * m_gap_info
 
CPrecalcGapInfo< THit > * m_prec_gap_info
 

Detailed Description

template<class THit>
class CCompartmentFinder< THit >

Definition at line 165 of file compartment_finder.hpp.

Member Typedef Documentation

◆ TCoord

template<class THit >
typedef THit::TCoord CCompartmentFinder< THit >::TCoord

Definition at line 171 of file compartment_finder.hpp.

◆ THitRef

template<class THit >
typedef CRef<THit> CCompartmentFinder< THit >::THitRef

Definition at line 169 of file compartment_finder.hpp.

◆ THitRefs

template<class THit >
typedef vector<THitRef> CCompartmentFinder< THit >::THitRefs

Definition at line 170 of file compartment_finder.hpp.

Constructor & Destructor Documentation

◆ CCompartmentFinder()

template<class THit >
CCompartmentFinder< THit >::CCompartmentFinder ( typename THitRefs::const_iterator  start,
typename THitRefs::const_iterator  finish,
CGapInfo< THit > *  gap_info = NULL,
CPrecalcGapInfo< THit > *  prec_gap_info = NULL 
)

Create the object from the complete set of local alignments (hits) between the transcript and the genomic sequences.

The hits are assumed to share the same query and subject and to have plus strand on both sequences.

Parameters
startStart of the input set of alignments.
finishEnd of the input set of alignments.

Definition at line 620 of file compartment_finder.hpp.

References copy(), and CCompartmentFinder< THit >::m_hitrefs.

Member Function Documentation

◆ GetFirst()

template<class THit >
CCompartmentFinder< THit >::CCompartment * CCompartmentFinder< THit >::GetFirst ( void  )

◆ GetNext()

template<class THit >
CCompartmentFinder< THit >::CCompartment * CCompartmentFinder< THit >::GetNext ( void  )

◆ OrderCompartments()

template<class THit >
void CCompartmentFinder< THit >::OrderCompartments ( void  )

Order compartments by lower subj coordinate.

Definition at line 1335 of file compartment_finder.hpp.

References i.

Referenced by CCompartmentAccessor< THit >::x_Copy2Pending().

◆ Run()

template<class THit >
size_t CCompartmentFinder< THit >::Run ( bool  cross_filter = false)

Identify compartments.

Parameters
cross_filterWhen activated, cross filtering will ensure that only the alignments that provided non-ambguous mapping between the sequences will be reported in the output.

Definition at line 688 of file compartment_finder.hpp.

References i, in(), int, CRef< C, Locker >::IsNull(), kPenaltyPerIntronBase, kPenaltyPerIntronPos, NON_CONST_ITERATE, remove_if(), CRef< C, Locker >::Reset(), and CCompartmentFinder< THit >::CCompartment::SetMembers().

Referenced by CCompartmentAccessor< THit >::Run().

◆ s_GetDefaultMaxIntron()

template<class THit >
static TCoord CCompartmentFinder< THit >::s_GetDefaultMaxIntron ( void  )
inlinestatic

Retrieve the default maximum length of an intron.

Definition at line 215 of file compartment_finder.hpp.

Referenced by CCompartmentAccessor< THit >::x_Init(), and CElementaryMatching::x_InitBasic().

◆ s_GetDefaultMaxOverlap()

template<class THit >
static TCoord CCompartmentFinder< THit >::s_GetDefaultMaxOverlap ( void  )
inlinestatic

Retrieve the default compartment overlap behaviour (no overlap).

Definition at line 200 of file compartment_finder.hpp.

Referenced by CCompartmentAccessor< THit >::x_Init().

◆ s_GetDefaultMinCoverage()

template<class THit >
static TCoord CCompartmentFinder< THit >::s_GetDefaultMinCoverage ( void  )
inlinestatic

Retrieve the default minimum coverage, in base pairs.

Definition at line 257 of file compartment_finder.hpp.

◆ s_GetDefaultPenalty()

template<class THit >
static TCoord CCompartmentFinder< THit >::s_GetDefaultPenalty ( void  )
inlinestatic

Retrieve the default compartment penalty, in base pairs.

Definition at line 251 of file compartment_finder.hpp.

◆ s_PNullRef()

template<class THit >
static bool CCompartmentFinder< THit >::s_PNullRef ( const THitRef hr)
inlinestaticprivate

Definition at line 408 of file compartment_finder.hpp.

References CRef< C, Locker >::IsNull().

◆ SetMaxIntron()

template<class THit >
void CCompartmentFinder< THit >::SetMaxIntron ( TCoord  intr_max)
inline

Set the maximum length of an intron.

Parameters
intr_maxMaximum length of an intron, in base pairs.

Definition at line 209 of file compartment_finder.hpp.

References CCompartmentFinder< THit >::m_intron_max.

Referenced by CCompartmentAccessor< THit >::Run().

◆ SetMaxOverlap()

template<class THit >
void CCompartmentFinder< THit >::SetMaxOverlap ( TCoord  max_overlap)
inline

Set compartment overlap behaviour.

Allow compartments to overlap on subject.

Parameters
max_overlapMaximum length of overlap on subject. 0 - do not allow overlap.

Definition at line 194 of file compartment_finder.hpp.

References CCompartmentFinder< THit >::m_max_overlap.

Referenced by CCompartmentAccessor< THit >::Run().

◆ SetMinMatches()

template<class THit >
void CCompartmentFinder< THit >::SetMinMatches ( TCoord  min_matches)
inline

Set the minimum matching residues per compartment.

Parameters
min_matchesThe min number of matching residues in base pairs

Definition at line 236 of file compartment_finder.hpp.

References CCompartmentFinder< THit >::m_MinMatches, and CCompartmentFinder< THit >::m_MinSingletonMatches.

Referenced by CCompartmentAccessor< THit >::Run().

◆ SetMinSingletonMatches()

template<class THit >
void CCompartmentFinder< THit >::SetMinSingletonMatches ( TCoord  min_matches)
inline

Set the minimum matching residues per singleton compartment.

Parameters
min_matchesThe min number of matching residues in base pairs

Definition at line 245 of file compartment_finder.hpp.

References CCompartmentFinder< THit >::m_MinSingletonMatches.

Referenced by CCompartmentAccessor< THit >::Run().

◆ SetPenalty()

template<class THit >
void CCompartmentFinder< THit >::SetPenalty ( TCoord  penalty)
inline

Set the penalty to open a compartment.

Parameters
penaltyCompartment opening penalty, in base pairs.

Definition at line 227 of file compartment_finder.hpp.

References CCompartmentFinder< THit >::m_penalty.

Referenced by CCompartmentAccessor< THit >::Run().

◆ sx_XFilter()

template<class THit >
size_t CCompartmentFinder< THit >::sx_XFilter ( THitRefs hitrefs,
typename THitRefs::iterator  ihr,
typename THitRefs::iterator  ihr_e,
Uint1  w,
size_t  min_compartment_hit_len 
)
staticprivate

Member Data Documentation

◆ m_compartments

template<class THit >
vector<CCompartment> CCompartmentFinder< THit >::m_compartments
private

Definition at line 375 of file compartment_finder.hpp.

◆ m_gap_info

template<class THit >
CGapInfo<THit>* CCompartmentFinder< THit >::m_gap_info
private

Definition at line 377 of file compartment_finder.hpp.

◆ m_hitrefs

template<class THit >
THitRefs CCompartmentFinder< THit >::m_hitrefs
private

◆ m_intron_max

template<class THit >
TCoord CCompartmentFinder< THit >::m_intron_max
private

Definition at line 369 of file compartment_finder.hpp.

Referenced by CCompartmentFinder< THit >::SetMaxIntron().

◆ m_iter

template<class THit >
int CCompartmentFinder< THit >::m_iter
private

Definition at line 376 of file compartment_finder.hpp.

◆ m_max_overlap

template<class THit >
TCoord CCompartmentFinder< THit >::m_max_overlap
private

Definition at line 368 of file compartment_finder.hpp.

Referenced by CCompartmentFinder< THit >::SetMaxOverlap().

◆ m_MinMatches

template<class THit >
TCoord CCompartmentFinder< THit >::m_MinMatches
private

Definition at line 371 of file compartment_finder.hpp.

Referenced by CCompartmentFinder< THit >::SetMinMatches().

◆ m_MinSingletonMatches

template<class THit >
TCoord CCompartmentFinder< THit >::m_MinSingletonMatches
private

◆ m_penalty

template<class THit >
TCoord CCompartmentFinder< THit >::m_penalty
private

Definition at line 370 of file compartment_finder.hpp.

Referenced by CCompartmentFinder< THit >::SetPenalty().

◆ m_prec_gap_info

template<class THit >
CPrecalcGapInfo<THit>* CCompartmentFinder< THit >::m_prec_gap_info
private

Definition at line 378 of file compartment_finder.hpp.


The documentation for this class was generated from the following file:
Modified on Tue May 28 05:51:56 2024 by modify_doxy.py rev. 669887