NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
CAlignShadow Class Reference

Search Toolkit Book for CAlignShadow

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

+ Inheritance diagram for CAlignShadow:
+ Collaboration diagram for CAlignShadow:

List of all members.

Public Types

typedef CConstRef
< objects::CSeq_id > 
TId
typedef TSeqPos TCoord
typedef string TTranscript

Public Member Functions

 CAlignShadow (void)
 CAlignShadow (const objects::CSeq_align &seq_align, bool save_xcript=false)
 Create the object from a seq-align structure.
 CAlignShadow (const TId &idquery, TCoord qstart, bool qstrand, const TId &idsubj, TCoord sstart, bool sstrand, const string &xcript)
 Create the object from a transcript.
virtual ~CAlignShadow ()
const TIdGetId (Uint1 where) const
const TIdGetQueryId (void) const
const TIdGetSubjId (void) const
void SetId (Uint1 where, const TId &id)
void SetQueryId (const TId &id)
void SetSubjId (const TId &id)
bool GetStrand (Uint1 where) const
bool GetQueryStrand (void) const
bool GetSubjStrand (void) const
void SetStrand (Uint1 where, bool strand)
void SetQueryStrand (bool strand)
void SetSubjStrand (bool strand)
void FlipStrands (void)
void SwapQS (void)
const TCoordGetBox (void) const
void SetBox (const TCoord box[4])
TCoord GetMin (Uint1 where) const
TCoord GetMax (Uint1 where) const
TCoord GetQueryMin (void) const
TCoord GetQueryMax (void) const
TCoord GetSubjMin (void) const
TCoord GetSubjMax (void) const
void SetMax (Uint1 where, TCoord pos)
void SetMin (Uint1 where, TCoord pos)
void SetQueryMin (TCoord pos)
void SetQueryMax (TCoord pos)
void SetSubjMin (TCoord pos)
void SetSubjMax (TCoord pos)
TCoord GetQuerySpan (void) const
TCoord GetSubjSpan (void) const
TCoord GetStart (Uint1 where) const
TCoord GetStop (Uint1 where) const
TCoord GetQueryStart (void) const
TCoord GetQueryStop (void) const
TCoord GetSubjStart (void) const
TCoord GetSubjStop (void) const
void SetStop (Uint1 where, TCoord pos)
void SetStart (Uint1 where, TCoord pos)
void SetQueryStart (TCoord pos)
void SetQueryStop (TCoord pos)
void SetSubjStart (TCoord pos)
void SetSubjStop (TCoord pos)
void Shift (Int4 shift_query, Int4 shift_subj)
virtual void Modify (Uint1 point, TCoord new_pos)
const TTranscriptGetTranscript (void) const

Static Public Member Functions

static string s_RunLengthEncode (const string &in)
static string s_RunLengthDecode (const string &in)

Protected Member Functions

virtual void x_PartialSerialize (CNcbiOstream &os) const

Protected Attributes

std::pair< TId, TIdm_Id
TCoord m_Box [4]
TTranscript m_Transcript

Friends

CNcbiOstreamoperator<< (CNcbiOstream &os, const CAlignShadow &align_shadow)

Detailed Description

Definition at line 57 of file align_shadow.hpp.


Member Typedef Documentation

Reimplemented in CBlastTabular.

Definition at line 62 of file align_shadow.hpp.

typedef CConstRef<objects::CSeq_id> CAlignShadow::TId

Definition at line 61 of file align_shadow.hpp.

Definition at line 163 of file align_shadow.hpp.


Constructor & Destructor Documentation

Definition at line 151 of file align_shadow.cpp.

References m_Box.

CAlignShadow::CAlignShadow ( const objects::CSeq_align &  seq_align,
bool  save_xcript = false 
)

Create the object from a seq-align structure.

Parameters:
seq_alignInput seq-align structure to create from
save_xcriptIf true, the alignment transcript string will be run-length encoded and saved in m_Transcript. All diagonals are recorded as matches.

Definition at line 64 of file align_shadow.cpp.

References ENa_strand(), ITERATE, m_Box, m_Id, m_Transcript, NCBI_THROW, NStr::NumericToString(), RetrieveStdStrands(), and USING_SCOPE.

CAlignShadow::CAlignShadow ( const TId idquery,
TCoord  qstart,
bool  qstrand,
const TId idsubj,
TCoord  sstart,
bool  sstrand,
const string xcript 
)

Create the object from a transcript.

Parameters:
idqueryQuery sequence ID
qstartStarting coordinate on the query
qstrandQuery strand (direction)
idsubjSubject sequence ID
sstartStarting coordinate on the subject
sstrandSubject strand (direction)
xcriptPlain alignment (edit) transcript. Allowed characters are 'M', 'R', 'I', 'D'.

Definition at line 157 of file align_shadow.cpp.

References ITERATE, m_Box, m_Id, m_Transcript, NCBI_THROW, and s_RunLengthEncode().

virtual CAlignShadow::~CAlignShadow ( ) [inline, virtual]

Definition at line 99 of file align_shadow.hpp.


Member Function Documentation

void CAlignShadow::FlipStrands ( void  )

Definition at line 358 of file align_shadow.cpp.

References m_Box.

Referenced by CElementaryMatching::x_CompartPair().

Definition at line 487 of file align_shadow.cpp.

References m_Box, max(), and NCBI_THROW.

Definition at line 473 of file align_shadow.cpp.

References m_Box, min(), and NCBI_THROW.

Definition at line 235 of file align_shadow.cpp.

References m_Id.

Referenced by SwapQS().

Definition at line 631 of file align_shadow.cpp.

References GetQueryMax(), and GetQueryMin().

Referenced by CBlastTabular::Modify().

Definition at line 370 of file align_shadow.cpp.

References m_Box, and NCBI_THROW.

Definition at line 383 of file align_shadow.cpp.

References m_Box, and NCBI_THROW.

Definition at line 272 of file align_shadow.cpp.

References m_Box, and NCBI_THROW.

Referenced by Modify(), and SetStrand().

Definition at line 241 of file align_shadow.cpp.

References m_Id.

Referenced by SwapQS().

Definition at line 625 of file align_shadow.cpp.

References m_Box, and max().

Referenced by CCompartmentAccessor< THit >::AsSeqAlignSet(), and GetSubjSpan().

Definition at line 613 of file align_shadow.cpp.

References m_Box, and min().

Referenced by CCompartmentAccessor< THit >::AsSeqAlignSet(), and GetSubjSpan().

Definition at line 637 of file align_shadow.cpp.

References GetSubjMax(), and GetSubjMin().

void CAlignShadow::Modify ( Uint1  point,
TCoord  new_pos 
) [virtual]
void CAlignShadow::SetBox ( const TCoord  box[4])

Definition at line 364 of file align_shadow.cpp.

References copy(), and m_Box.

Referenced by CElementaryMatching::x_CompartPair().

void CAlignShadow::SetId ( Uint1  where,
const TId id 
)

Definition at line 247 of file align_shadow.cpp.

References m_Id, and NCBI_THROW.

void CAlignShadow::SetMax ( Uint1  where,
TCoord  pos 
)

Definition at line 533 of file align_shadow.cpp.

References m_Box, NCBI_THROW, and val.

Referenced by SetQueryMax(), and SetSubjMax().

void CAlignShadow::SetMin ( Uint1  where,
TCoord  pos 
)

Definition at line 501 of file align_shadow.cpp.

References m_Box, NCBI_THROW, and val.

Referenced by SetQueryMin(), and SetSubjMin().

Definition at line 260 of file align_shadow.cpp.

References m_Id.

Referenced by SwapQS(), and CElementaryMatching::x_CompartPair().

Definition at line 564 of file align_shadow.cpp.

References SetMax().

Referenced by Modify().

Definition at line 576 of file align_shadow.cpp.

References SetMin().

Referenced by Modify().

Definition at line 446 of file align_shadow.cpp.

References m_Box, and val.

Referenced by CBlastTabular::x_PartialDeserialize().

Definition at line 452 of file align_shadow.cpp.

References m_Box, and val.

Referenced by CBlastTabular::x_PartialDeserialize().

Definition at line 321 of file align_shadow.cpp.

References SetStrand().

Referenced by FlipStrands().

void CAlignShadow::SetStart ( Uint1  where,
TCoord  pos 
)

Definition at line 420 of file align_shadow.cpp.

References m_Box, and NCBI_THROW.

void CAlignShadow::SetStop ( Uint1  where,
TCoord  pos 
)

Definition at line 433 of file align_shadow.cpp.

References m_Box, NCBI_THROW, and val.

void CAlignShadow::SetStrand ( Uint1  where,
bool  strand 
)

Definition at line 298 of file align_shadow.cpp.

References GetStrand(), m_Box, NCBI_THROW, and swap().

Referenced by SetQueryStrand(), and SetSubjStrand().

Definition at line 266 of file align_shadow.cpp.

References m_Id.

Referenced by SwapQS(), and CElementaryMatching::x_CompartPair().

Definition at line 570 of file align_shadow.cpp.

References SetMax().

Referenced by Modify().

Definition at line 582 of file align_shadow.cpp.

References SetMin().

Referenced by Modify().

Definition at line 458 of file align_shadow.cpp.

References m_Box, and val.

Referenced by CBlastTabular::x_PartialDeserialize().

Definition at line 464 of file align_shadow.cpp.

References m_Box, and val.

Referenced by CBlastTabular::x_PartialDeserialize().

Definition at line 327 of file align_shadow.cpp.

References SetStrand().

Referenced by FlipStrands().

void CAlignShadow::Shift ( Int4  shift_query,
Int4  shift_subj 
)

Definition at line 643 of file align_shadow.cpp.

References m_Box.

void CAlignShadow::SwapQS ( void  )

Definition at line 333 of file align_shadow.cpp.

References GetQueryId(), GetSubjId(), m_Box, SetQueryId(), and SetSubjId().

void CAlignShadow::x_PartialSerialize ( CNcbiOstream os) const [protected, virtual]

Reimplemented in CBlastTabular.

Definition at line 597 of file align_shadow.cpp.

References GetQueryStart(), GetQueryStop(), GetSubjStart(), GetSubjStop(), and m_Transcript.

Referenced by operator<<().


Friends And Related Function Documentation

CNcbiOstream& operator<< ( CNcbiOstream os,
const CAlignShadow align_shadow 
) [friend]

Definition at line 205 of file align_shadow.cpp.


Member Data Documentation

TCoord CAlignShadow::m_Box[4] [protected]
std::pair<TId,TId> CAlignShadow::m_Id [protected]

The documentation for this class was generated from the following files:
Modified on Wed Jul 09 17:00:44 2014 by modify_doxy.py rev. 426318