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

Search Toolkit Book for AlignmentCollection

#include <algo/structure/cd_utils/cuAlignmentCollection.hpp>

+ Inheritance diagram for AlignmentCollection:
+ Collaboration diagram for AlignmentCollection:

Public Member Functions

 AlignmentCollection (CCdCore *cd, CCdCore::AlignmentUsage alignUse=CCdCore::USE_PENDING_ALIGNMENT, bool uniqueSeqId=false, bool scoped=true)
 
 AlignmentCollection ()
 
void AddAlignment (CCdCore *cd, CCdCore::AlignmentUsage alignUse=CCdCore::USE_PENDING_ALIGNMENT, bool uniqueSeqId=false, bool scoped=true)
 
void AddAlignment (const AlignmentCollection &ac)
 
void AddSequence (CCdCore *cd)
 
void AddSequence (const AlignmentCollection &ac)
 
int getNumFamilies () const
 
void setNumFamilies (int num)
 
void clear ()
 
CCdCoregetFirstCD () const
 
int GetNumRows () const
 
int GetNumPendingRows () const
 
int GetAlignmentLength (int row=0) const
 
bool Get_GI_or_PDB_String_FromAlignment (int row, std::string &result) const
 
bool GetSeqIDForRow (int row, CRef< CSeq_id > &SeqID) const
 
bool GetSeqEntryForRow (int row, CRef< CSeq_entry > &seqEntry) const
 
string GetDefline (int row) const
 
bool GetGI (int row, TGi &gi, bool ignorePDBs=true) const
 
int GetLowerBound (int row) const
 
int GetUpperBound (int row) const
 
int FindSeqInterval (const CSeq_interval &seqLoc) const
 
bool IsPending (int row) const
 
bool wasMaster (int row) const
 
void removeRowSourcesForCD (CCdCore *cd)
 
void addRowSources (const vector< int > &rows, CCdCore *cd, bool scoped=true)
 
const RowSourceGetRowSource (int row) const
 
RowSourceGetRowSource (int row)
 
CRef< CSeq_aligngetSeqAlign (int row) const
 
const RowSourceTableGetRowSourceTable () const
 
int getCDs (vector< CCdCore * > &cds)
 
int getCDsInScope (vector< CCdCore * > &cds)
 
int getCDsOutofScope (vector< CCdCore * > &cds)
 
bool isCDInScope (CCdCore *cd) const
 
bool isRowInScope (int row) const
 
CCdCoreGetLeafDescendentCD (int row, bool includeSelf=false) const
 
CCdCoreGetScopedLeafCD (int row) const
 
CCdCoreGetSeniorMemberCD (int row, bool scopedOnly=true) const
 
void convertFromCDRows (CCdCore *cd, const vector< int > &cdRows, set< int > &colRows) const
 
void convertToCDRows (const vector< int > &colRows, CDRowsMap &cdRows) const
 
void mapRows (const AlignmentCollection &ac, const set< int > &rows, set< int > &convertedRows) const
 
int mapRow (const AlignmentCollection &ac, int row) const
 
void getAllRowsForCD (CCdCore *cd, vector< int > &colRows) const
 
bool GetSpeciesForRow (int row, string &species) const
 
bool GetBioseqForRow (int rowId, CRef< CBioseq > &bioseq)
 
int GetRowsWithSameSeqID (int rowToMatch, vector< int > &rows, bool inclusive=true) const
 
int GetRowsWithSeqID (const CRef< CSeq_id > &SeqID, vector< int > &rows) const
 
bool IsStruct (int row)
 
bool IsPdb (int row) const
 
void GetAllSequences (vector< string > &sequences)
 
string GetSequenceForRow (int row)
 
void GetAlignedResiduesForRow (int row, char *&)
 
void GetAlignedResiduesForAll (char **&ppAlignedResidues, bool forceRecompute)
 
bool isInstanceOf (MultipleAlignment *ma)
 
void getNormalRowsNotInChild (vector< int > &childless, bool excludeMaster=false) const
 
virtual ~AlignmentCollection ()
 
bool AreNonOverlapping () const
 
bool IsNonOverlapping (const CRef< CSeq_align > &align, int &blockIndex) const
 
stringgetLastError ()
 

Protected Member Functions

void addPendingAlignment (CCdCore *cd, bool uniqueSeqId=false, bool scoped=true)
 
void addNormalAlignment (CCdCore *cd, bool uniqueSeqId=false, bool scoped=true)
 

Protected Attributes

vector< CRef< CSeq_align > > m_seqAligns
 
RowSourceTable m_rowSources
 
CCdCorem_firstCd
 
int m_numFamilies
 
string m_err
 
vector< CRef< CBioseq > > m_bioseqs
 
SequenceTable m_seqTable
 

Detailed Description

Definition at line 19 of file cuAlignmentCollection.hpp.

Constructor & Destructor Documentation

◆ AlignmentCollection() [1/2]

AlignmentCollection::AlignmentCollection ( CCdCore cd,
CCdCore::AlignmentUsage  alignUse = CCdCore::USE_PENDING_ALIGNMENT,
bool  uniqueSeqId = false,
bool  scoped = true 
)

Definition at line 11 of file cuAlignmentCollection.cpp.

◆ AlignmentCollection() [2/2]

AlignmentCollection::AlignmentCollection ( )

Definition at line 19 of file cuAlignmentCollection.cpp.

References m_numFamilies.

◆ ~AlignmentCollection()

AlignmentCollection::~AlignmentCollection ( )
virtual

Definition at line 166 of file cuAlignmentCollection.cpp.

Member Function Documentation

◆ AddAlignment() [1/2]

void AlignmentCollection::AddAlignment ( CCdCore cd,
CCdCore::AlignmentUsage  alignUse = CCdCore::USE_PENDING_ALIGNMENT,
bool  uniqueSeqId = false,
bool  scoped = true 
)

◆ AddAlignment() [2/2]

void AlignmentCollection::AddAlignment ( const AlignmentCollection ac)

◆ addNormalAlignment()

void AlignmentCollection::addNormalAlignment ( CCdCore cd,
bool  uniqueSeqId = false,
bool  scoped = true 
)
protected

◆ addPendingAlignment()

void AlignmentCollection::addPendingAlignment ( CCdCore cd,
bool  uniqueSeqId = false,
bool  scoped = true 
)
protected

◆ addRowSources()

void AlignmentCollection::addRowSources ( const vector< int > &  rows,
CCdCore cd,
bool  scoped = true 
)

◆ AddSequence() [1/2]

void AlignmentCollection::AddSequence ( CCdCore cd)

◆ AddSequence() [2/2]

void AlignmentCollection::AddSequence ( const AlignmentCollection ac)

Definition at line 59 of file cuAlignmentCollection.cpp.

References SequenceTable::addSequences(), and m_seqTable.

◆ AreNonOverlapping()

bool AlignmentCollection::AreNonOverlapping ( ) const

Definition at line 655 of file cuAlignmentCollection.cpp.

References dummy, GetNumRows(), i, IsNonOverlapping(), and m_seqAligns.

◆ clear()

void AlignmentCollection::clear ( void  )
inline

◆ convertFromCDRows()

void AlignmentCollection::convertFromCDRows ( CCdCore cd,
const vector< int > &  cdRows,
set< int > &  colRows 
) const

Definition at line 388 of file cuAlignmentCollection.cpp.

References RowSourceTable::convertFromCDRows(), and m_rowSources.

Referenced by mapRows().

◆ convertToCDRows()

void AlignmentCollection::convertToCDRows ( const vector< int > &  colRows,
CDRowsMap cdRows 
) const

Definition at line 393 of file cuAlignmentCollection.cpp.

References RowSourceTable::convertToCDRows(), and m_rowSources.

Referenced by mapRows().

◆ FindSeqInterval()

int AlignmentCollection::FindSeqInterval ( const CSeq_interval seqLoc) const

◆ Get_GI_or_PDB_String_FromAlignment()

bool AlignmentCollection::Get_GI_or_PDB_String_FromAlignment ( int  row,
std::string result 
) const

◆ GetAlignedResiduesForAll()

void AlignmentCollection::GetAlignedResiduesForAll ( char **&  ppAlignedResidues,
bool  forceRecompute 
)

◆ GetAlignedResiduesForRow()

void AlignmentCollection::GetAlignedResiduesForRow ( int  row,
char *&  aseq 
)

◆ GetAlignmentLength()

int AlignmentCollection::GetAlignmentLength ( int  row = 0) const

◆ getAllRowsForCD()

void AlignmentCollection::getAllRowsForCD ( CCdCore cd,
vector< int > &  colRows 
) const

Definition at line 431 of file cuAlignmentCollection.cpp.

References GetNumRows(), i, RowSourceTable::isRowInCD(), and m_rowSources.

Referenced by removeRowSourcesForCD().

◆ GetAllSequences()

void AlignmentCollection::GetAllSequences ( vector< string > &  sequences)

◆ GetBioseqForRow()

bool AlignmentCollection::GetBioseqForRow ( int  rowId,
CRef< CBioseq > &  bioseq 
)

◆ getCDs()

int AlignmentCollection::getCDs ( vector< CCdCore * > &  cds)

Definition at line 304 of file cuAlignmentCollection.cpp.

References RowSourceTable::getCDs(), and m_rowSources.

◆ getCDsInScope()

int AlignmentCollection::getCDsInScope ( vector< CCdCore * > &  cds)

Definition at line 309 of file cuAlignmentCollection.cpp.

References RowSourceTable::getCDsInScope(), and m_rowSources.

◆ getCDsOutofScope()

int AlignmentCollection::getCDsOutofScope ( vector< CCdCore * > &  cds)

Definition at line 314 of file cuAlignmentCollection.cpp.

References RowSourceTable::getCDsOutofScope(), and m_rowSources.

◆ GetDefline()

string AlignmentCollection::GetDefline ( int  row) const

◆ getFirstCD()

CCdCore* AlignmentCollection::getFirstCD ( ) const
inline

◆ GetGI()

bool AlignmentCollection::GetGI ( int  row,
TGi gi,
bool  ignorePDBs = true 
) const

◆ getLastError()

string& AlignmentCollection::getLastError ( )
inline

Definition at line 87 of file cuAlignmentCollection.hpp.

References m_err.

◆ GetLeafDescendentCD()

CCdCore * AlignmentCollection::GetLeafDescendentCD ( int  row,
bool  includeSelf = false 
) const

◆ GetLowerBound()

int AlignmentCollection::GetLowerBound ( int  row) const

◆ getNormalRowsNotInChild()

void AlignmentCollection::getNormalRowsNotInChild ( vector< int > &  childless,
bool  excludeMaster = false 
) const

Definition at line 370 of file cuAlignmentCollection.cpp.

References GetLeafDescendentCD(), GetNumRows(), i, IsPending(), and m_firstCd.

◆ getNumFamilies()

int AlignmentCollection::getNumFamilies ( ) const
inline

Definition at line 30 of file cuAlignmentCollection.hpp.

References m_numFamilies.

◆ GetNumPendingRows()

int AlignmentCollection::GetNumPendingRows ( ) const

Definition at line 182 of file cuAlignmentCollection.cpp.

References GetNumRows(), i, and IsPending().

◆ GetNumRows()

int AlignmentCollection::GetNumRows ( ) const

◆ GetRowSource() [1/2]

RowSource & AlignmentCollection::GetRowSource ( int  row)

Definition at line 299 of file cuAlignmentCollection.cpp.

References RowSourceTable::findEntry(), m_rowSources, and row.

◆ GetRowSource() [2/2]

const RowSource & AlignmentCollection::GetRowSource ( int  row) const

◆ GetRowSourceTable()

const RowSourceTable& AlignmentCollection::GetRowSourceTable ( ) const
inline

◆ GetRowsWithSameSeqID()

int AlignmentCollection::GetRowsWithSameSeqID ( int  rowToMatch,
vector< int > &  rows,
bool  inclusive = true 
) const

Definition at line 518 of file cuAlignmentCollection.cpp.

References GetRowsWithSeqID(), GetSeqIDForRow(), i, and result.

◆ GetRowsWithSeqID()

int AlignmentCollection::GetRowsWithSeqID ( const CRef< CSeq_id > &  SeqID,
vector< int > &  rows 
) const

◆ GetScopedLeafCD()

CCdCore * AlignmentCollection::GetScopedLeafCD ( int  row) const

◆ GetSeniorMemberCD()

CCdCore * AlignmentCollection::GetSeniorMemberCD ( int  row,
bool  scopedOnly = true 
) const

◆ getSeqAlign()

CRef<CSeq_align> AlignmentCollection::getSeqAlign ( int  row) const
inline

◆ GetSeqEntryForRow()

bool AlignmentCollection::GetSeqEntryForRow ( int  row,
CRef< CSeq_entry > &  seqEntry 
) const

◆ GetSeqIDForRow()

bool AlignmentCollection::GetSeqIDForRow ( int  row,
CRef< CSeq_id > &  SeqID 
) const

◆ GetSequenceForRow()

string AlignmentCollection::GetSequenceForRow ( int  row)

◆ GetSpeciesForRow()

bool AlignmentCollection::GetSpeciesForRow ( int  row,
string species 
) const

◆ GetUpperBound()

int AlignmentCollection::GetUpperBound ( int  row) const

◆ isCDInScope()

bool AlignmentCollection::isCDInScope ( CCdCore cd) const

◆ isInstanceOf()

bool AlignmentCollection::isInstanceOf ( MultipleAlignment ma)

Definition at line 170 of file cuAlignmentCollection.cpp.

References NULL.

◆ IsNonOverlapping()

bool AlignmentCollection::IsNonOverlapping ( const CRef< CSeq_align > &  align,
int blockIndex 
) const

Definition at line 669 of file cuAlignmentCollection.cpp.

References GetDDSetFromSeqAlign(), and Len.

Referenced by AreNonOverlapping().

◆ IsPdb()

bool AlignmentCollection::IsPdb ( int  row) const

◆ IsPending()

bool AlignmentCollection::IsPending ( int  row) const

◆ isRowInScope()

bool AlignmentCollection::isRowInScope ( int  row) const

Definition at line 351 of file cuAlignmentCollection.cpp.

References GetScopedLeafCD(), and row.

Referenced by MultipleAlignment::appendAlignment().

◆ IsStruct()

bool AlignmentCollection::IsStruct ( int  row)

◆ mapRow()

int AlignmentCollection::mapRow ( const AlignmentCollection ac,
int  row 
) const

◆ mapRows()

void AlignmentCollection::mapRows ( const AlignmentCollection ac,
const set< int > &  rows,
set< int > &  convertedRows 
) const

◆ removeRowSourcesForCD()

void AlignmentCollection::removeRowSourcesForCD ( CCdCore cd)

◆ setNumFamilies()

void AlignmentCollection::setNumFamilies ( int  num)
inline

Definition at line 31 of file cuAlignmentCollection.hpp.

References m_numFamilies.

◆ wasMaster()

bool AlignmentCollection::wasMaster ( int  row) const

Member Data Documentation

◆ m_bioseqs

vector<CRef< CBioseq > > AlignmentCollection::m_bioseqs
protected

Definition at line 102 of file cuAlignmentCollection.hpp.

Referenced by GetBioseqForRow().

◆ m_err

string AlignmentCollection::m_err
protected

◆ m_firstCd

CCdCore* AlignmentCollection::m_firstCd
protected

◆ m_numFamilies

int AlignmentCollection::m_numFamilies
protected

Definition at line 98 of file cuAlignmentCollection.hpp.

Referenced by AlignmentCollection(), getNumFamilies(), and setNumFamilies().

◆ m_rowSources

RowSourceTable AlignmentCollection::m_rowSources
protected

◆ m_seqAligns

vector< CRef< CSeq_align > > AlignmentCollection::m_seqAligns
protected

◆ m_seqTable

SequenceTable AlignmentCollection::m_seqTable
protected

Definition at line 103 of file cuAlignmentCollection.hpp.

Referenced by AddSequence(), GetBioseqForRow(), and GetSeqEntryForRow().


The documentation for this class was generated from the following files:
Modified on Thu Jul 18 16:08:12 2024 by modify_doxy.py rev. 669887