NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | List of all members
CSeq_align Class Reference

Represents ASN.1 type Seq-align defined in file seqalign.asn

Search Toolkit Book for CSeq_align

#include <objects/seqalign/Seq_align.hpp>

+ Inheritance diagram for CSeq_align:
+ Collaboration diagram for CSeq_align:

Classes

struct  SIndel
 
struct  SSeqIdChooser
 Create a Dense-seg from a Std-seg Used by AlnMgr to handle nucl2prot alignments. More...
 

Public Types

enum  EScoreType {
  eScore_Score , eScore_Blast , eScore_BitScore , eScore_EValue ,
  eScore_AlignLength , eScore_IdentityCount , eScore_PositiveCount , eScore_NegativeCount ,
  eScore_MismatchCount , eScore_GapCount , eScore_PercentIdentity_Gapped , eScore_PercentIdentity_Ungapped ,
  eScore_PercentIdentity_GapOpeningOnly , eScore_PercentCoverage , eScore_SumEValue , eScore_CompAdjMethod ,
  eScore_HighQualityPercentCoverage , eScore_Matches , eScore_OverallIdentity , eScore_Splices ,
  eScore_ConsensusSplices , eScore_ProductCoverage , eScore_ExonIdentity , eScore_PercentIdentity = eScore_PercentIdentity_Gapped
}
 enum controlling known named scores More...
 
typedef pair< TSeqPos, TSeqPosTLengthRange
 
typedef map< string, EScoreTypeTScoreNameMap
 
- Public Types inherited from CSeq_align_Base
enum  EType {
  eType_not_set = 0 , eType_global = 1 , eType_diags = 2 , eType_partial = 3 ,
  eType_disc = 4 , eType_other = 255
}
 
enum class  E_memberIndex {
  e__allMandatory = 0 , e_type , e_dim , e_score ,
  e_segs , e_bounds , e_id , e_ext
}
 
typedef EType TType
 
typedef int TDim
 
typedef vector< CRef< CScore > > TScore
 
typedef C_Segs TSegs
 
typedef list< CRef< CSeq_loc > > TBounds
 
typedef list< CRef< CObject_id > > TId
 
typedef list< CRef< CUser_object > > TExt
 
typedef Tparent::CMemberIndex< E_memberIndex, 8 > TmemberIndex
 
- 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

 CSeq_align (void)
 constructor More...
 
 ~CSeq_align (void)
 destructor More...
 
TDim CheckNumRows (void) const
 Validatiors. More...
 
void Validate (bool full_test=false) const
 
CRange< TSeqPosGetSeqRange (TDim row) const
 GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin part of Prot-pos. More...
 
TSeqPos GetSeqStart (TDim row) const
 
TSeqPos GetSeqStop (TDim row) const
 
ENa_strand GetSeqStrand (TDim row) const
 Get strand (the first one if segments have different strands). More...
 
const CSeq_idGetSeq_id (TDim row) const
 Get seq-id (the first one if segments have different ids). More...
 
TSeqPos GetTotalGapCount (TDim row=-1) const
 Retrieves the total number of gaps in the given row an alignment; all gaps by default. More...
 
TSeqPos GetTotalGapCountWithinRange (const TSeqRange &range, TDim row=-1) const
 
TSeqPos GetTotalGapCountWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
TSeqPos GetNumGapOpenings (TDim row=-1) const
 Retrieves the number of gap openings in a given row in an alignment (ignoring how many gaps are in the gapped region); all gaps by default. More...
 
TSeqPos GetNumGapOpeningsWithinRange (const TSeqRange &range, TDim row=-1) const
 
TSeqPos GetNumGapOpeningsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
TSeqPos GetNumFrameshifts (TDim row=-1) const
 Retrieves the number of times a given row shifts frames; i.e. More...
 
TSeqPos GetNumFrameshiftsWithinRange (const TSeqRange &range, TDim row=-1) const
 
TSeqPos GetNumFrameshiftsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
vector< SIndelGetIndels (TDim row=-1) const
 Retrieves descriptions of all indels on a given row. More...
 
vector< SIndelGetIndelsWithinRange (const TSeqRange &range, TDim row=-1) const
 
vector< SIndelGetIndelsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
vector< SIndelGetFrameshifts (TDim row=-1) const
 Retrieves descriptions of all frameshifts on a given row; i.e. More...
 
vector< SIndelGetFrameshiftsWithinRange (const TSeqRange &range, TDim row=-1) const
 
vector< SIndelGetFrameshiftsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
vector< SIndelGetNonFrameshifts (TDim row=-1) const
 Retrieves descriptions of all non-frameshift indels on a given row; i.e. More...
 
vector< SIndelGetNonFrameshiftsWithinRange (const TSeqRange &range, TDim row=-1) const
 
vector< SIndelGetNonFrameshiftsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const
 
CRangeCollection< TSeqPosGetAlignedBases (TDim row) const
 Retrieves the locations of aligned bases in the given row, excluding gaps and incontinuities. More...
 
TSeqPos GetAlignLength (bool include_gaps=true) const
 Get the length of this alignment. More...
 
TSeqPos GetAlignLengthWithinRange (const TSeqRange &range, bool include_gaps=true) const
 Get the length of this alignment within a specified range By default, this function computes an alignment length including all gap segments. More...
 
TSeqPos GetAlignLengthWithinRanges (const CRangeCollection< TSeqPos > &ranges, bool include_gaps=true) const
 Get the length of this alignment within a specified range By default, this function computes an alignment length including all gap segments. More...
 
double AlignLengthRatio () const
 
bool GetNamedScore (const string &id, int &score) const
 Get score. More...
 
bool GetNamedScore (const string &id, double &score) const
 --------------------------------------------------------------------------- PRE : name of score to return POST: whether or not we found that score; score converted to double More...
 
bool GetNamedScore (EScoreType type, int &score) const
 
bool GetNamedScore (EScoreType type, double &score) const
 
void SetNamedScore (const string &id, int score)
 
void SetNamedScore (const string &id, double score)
 
void SetNamedScore (EScoreType type, int score)
 
void SetNamedScore (EScoreType type, double score)
 
void ResetNamedScore (const string &name)
 
void ResetNamedScore (EScoreType type)
 
void Reverse (void)
 Reverse the segments' orientation NOTE: currently *only* works for dense-seg. More...
 
void SwapRows (TDim row1, TDim row2)
 Swap the position of two rows in the alignment NOTE: currently *only* works for dense-seg & disc. More...
 
CRef< CSeq_alignCreateDensegFromStdseg (SSeqIdChooser *SeqIdChooser=0) const
 ---------------------------------------------------------------------------- PRE : the Seq-align has StdSeg segs POST: Seq_align of type Dense-seg is created with m_Widths if necessary More...
 
CRef< CSeq_alignCreateDensegFromDisc (SSeqIdChooser *SeqIdChooser=0) const
 
CRef< CSeq_alignCreateTranslatedDensegFromNADenseg (void) const
 Create a Dense-seg with widths from Dense-seg of nucleotides Used by AlnMgr to handle translated nucl2nucl alignments IMPORTANT NOTE: Do *NOT* use for alignments containing proteins; the code will not check for this. More...
 
void SplitOnLongDiscontinuity (list< CRef< CSeq_align > > &aligns, TSeqPos discontinuity_threshold) const
 Split the alignment at any discontinuity greater than threshold; populate aligns list with new alignments. More...
 
void OffsetRow (TDim row, TSignedSeqPos offset)
 Offset row's coords. More...
 
void RemapToLoc (TDim row, const CSeq_loc &dst_loc, bool ignore_strand=false)
 
CRef< CSeq_locCreateRowSeq_loc (TDim row) const
 
TLengthRange GapLengthRange () const
 
TLengthRange IntronLengthRange () const
 
TLengthRange ExonLengthRange () const
 
CConstRef< CUser_objectFindExt (const string &ext_type) const
 Find extension by type in ext container. More...
 
CRef< CUser_objectFindExt (const string &ext_type)
 Non-const version of FindExt(). More...
 
- Public Member Functions inherited from CSeq_align_Base
 CSeq_align_Base (void)
 
virtual ~CSeq_align_Base (void)
 
 DECLARE_INTERNAL_TYPE_INFO ()
 
bool IsSetType (void) const
 Check if a value has been assigned to Type data member. More...
 
bool CanGetType (void) const
 Check if it is safe to call GetType method. More...
 
void ResetType (void)
 Reset Type data member. More...
 
TType GetType (void) const
 Get the Type member data. More...
 
void SetType (TType value)
 Assign a value to Type data member. More...
 
TTypeSetType (void)
 Assign a value to Type data member. More...
 
bool IsSetDim (void) const
 dimensionality Check if a value has been assigned to Dim data member. More...
 
bool CanGetDim (void) const
 Check if it is safe to call GetDim method. More...
 
void ResetDim (void)
 Reset Dim data member. More...
 
TDim GetDim (void) const
 Get the Dim member data. More...
 
void SetDim (TDim value)
 Assign a value to Dim data member. More...
 
TDimSetDim (void)
 Assign a value to Dim data member. More...
 
bool IsSetScore (void) const
 for whole alignment Check if a value has been assigned to Score data member. More...
 
bool CanGetScore (void) const
 Check if it is safe to call GetScore method. More...
 
void ResetScore (void)
 Reset Score data member. More...
 
const TScoreGetScore (void) const
 Get the Score member data. More...
 
TScoreSetScore (void)
 Assign a value to Score data member. More...
 
bool IsSetSegs (void) const
 Check if a value has been assigned to Segs data member. More...
 
bool CanGetSegs (void) const
 Check if it is safe to call GetSegs method. More...
 
void ResetSegs (void)
 Reset Segs data member. More...
 
const TSegsGetSegs (void) const
 Get the Segs member data. More...
 
void SetSegs (TSegs &value)
 Assign a value to Segs data member. More...
 
TSegsSetSegs (void)
 Assign a value to Segs data member. More...
 
bool IsSetBounds (void) const
 regions of sequence over which align was computed Check if a value has been assigned to Bounds data member. More...
 
bool CanGetBounds (void) const
 Check if it is safe to call GetBounds method. More...
 
void ResetBounds (void)
 Reset Bounds data member. More...
 
const TBoundsGetBounds (void) const
 Get the Bounds member data. More...
 
TBoundsSetBounds (void)
 Assign a value to Bounds data member. More...
 
bool IsSetId (void) const
 alignment id Check if a value has been assigned to Id data member. More...
 
bool CanGetId (void) const
 Check if it is safe to call GetId method. More...
 
void ResetId (void)
 Reset Id data member. More...
 
const TIdGetId (void) const
 Get the Id member data. More...
 
TIdSetId (void)
 Assign a value to Id data member. More...
 
bool IsSetExt (void) const
 extra info Check if a value has been assigned to Ext data member. More...
 
bool CanGetExt (void) const
 Check if it is safe to call GetExt method. More...
 
void ResetExt (void)
 Reset Ext data member. More...
 
const TExtGetExt (void) const
 Get the Ext member data. More...
 
TExtSetExt (void)
 Assign a value to Ext data member. More...
 
virtual void Reset (void)
 Reset the whole object. More...
 
- Public Member Functions inherited from CSerialObject
 CSerialObject (void)
 
virtual ~CSerialObject (void)
 
virtual const CTypeInfoGetThisTypeInfo (void) const =0
 
virtual void Assign (const CSerialObject &source, ESerialRecursionMode how=eRecursive)
 Set object to copy of another one. More...
 
virtual bool Equals (const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
 Check if both objects contain the same values. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
void ThrowUnassigned (TMemberIndex index) const
 
void ThrowUnassigned (TMemberIndex index, const char *file_name, int file_line) const
 
bool HasNamespaceName (void) const
 Check if object data type has namespace name. More...
 
const stringGetNamespaceName (void) const
 Get namespace name. More...
 
bool HasNamespacePrefix (void) const
 Check if data type has namespace prefix. More...
 
const stringGetNamespacePrefix (void) const
 Get namespace prefix. More...
 
- 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...
 
- 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 const TScoreNameMapScoreNameMap ()
 
static string ScoreName (EScoreType score)
 
static string HelpText (EScoreType score)
 
static bool IsIntegerScore (EScoreType score)
 
- Static Public Member Functions inherited from CSeq_align_Base
static const NCBI_NS_NCBI::CEnumeratedTypeValues *ENUM_METHOD_NAME() EType (void)
 Access to EType's attributes (values, names) as defined in spec. More...
 
- Static Public Member Functions inherited from CSerialObject
static void SetVerifyDataThread (ESerialVerifyData verify)
 
static void SetVerifyDataGlobal (ESerialVerifyData verify)
 
static string UnassignedString (void)
 
static CStringUTF8 UnassignedStringUTF8 (void)
 
static char UnassignedByte (void)
 
- 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 Member Functions

CConstRef< CScorex_GetNamedScore (const string &name) const
 retrieve a named score object More...
 
CRef< CScorex_SetNamedScore (const string &name)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Types

typedef CSeq_align_Base Tparent
 

Private Member Functions

 CSeq_align (const CSeq_align &value)
 Prohibit copy constructor and assignment operator. More...
 
CSeq_alignoperator= (const CSeq_align &value)
 
CRef< CSeq_alignx_CreateSubsegAlignment (int from, int to) const
 Create a partial alignment containing the specified range of segments. More...
 

Additional Inherited Members

- Static Public Attributes inherited from CSerialObject
static const char * ms_UnassignedStr = "<*unassigned*>"
 
static const char ms_UnassignedByte = char(0xcd)
 
- 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 54 of file Seq_align.hpp.

Member Typedef Documentation

◆ TLengthRange

Definition at line 192 of file Seq_align.hpp.

◆ Tparent

Definition at line 56 of file Seq_align.hpp.

◆ TScoreNameMap

Definition at line 194 of file Seq_align.hpp.

Member Enumeration Documentation

◆ EScoreType

enum controlling known named scores

A word on scores, since definitions are quite important: Scores here are to be represented as a standard set of computations, comparable across alignment generation algorithms. The class CScoreBuilder holds reference implementations for most of the scores below (modulo interpretation difficulties with a score named 'score'). The intended meanings of scores are as follows:

'score' generic score, definable by any algorithm; not comparable across algorithms.

'bit_score' BLAST-specific bit score; reference implementation in the BLAST code, which is also exposed in CScoreBuilder.

'e_value' BLAST-specific e-value; reference implementation in the BLAST code, which is also exposed in CScoreBuilder.

alignment length not a score per se, but a useful metric nonetheless. This is the sum of all aligned segments and all gaps; this excludes introns and discontinuities

percent identity percent identity, computed as *UNGAPPED* percent identity. That is, the computation is strictly (matches) / (matches + mismatches) NOTE: there are, historically, at least four separate methods of computation for this: 1. C++ toolkit (CScoreBuilder): ungapped percent identity: (matches) / (matches + mismatches) 2. BLAST: gapped percent identity: (matches) / (alignment length) 3. gbDNA and contig processes: modified alignment length to count each gap as 1 base long always (matches) / (matches + mismatches + gap count) 4. Spidey: compute identity per coverage: (matches) / (stop - start + 1) Several of these are provided directly, as: pct_identity_gap pct_identity_ungap pct_identity_gapopen_only

alignable bases More a concept than a score. The alignable region of a sequence, as defined by the underlying sequencing technology or biology - that is, the region of a sequence noted as high quality minus a poly-A tail in the case of a cDNA. This quantity can be used in computing more appropriate coverage scores.

'pct_coverage' Percent of a sequence (query) aligned to another (subject), minus poly-A tail: (matches + mismatches) / (query length - polyA tail)

alignable percent coverage (NB: no named score yet) Percent of the alignable region actually aligned to a subject (matches + mismatches in alignable region) / (length of alignable region)

exonic coverage (NB: no named score yet) Measure of the percent of the query represented in a set of exons (sum of lengths of exon on query) / (query length - polyA)

Warning
The order of this enumeration and the sc_ScoreNames, sc_ScoreHelpText, and sc_IsInteger arrays must correspond!
Enumerator
eScore_Score 
eScore_Blast 
eScore_BitScore 
eScore_EValue 
eScore_AlignLength 
eScore_IdentityCount 
eScore_PositiveCount 
eScore_NegativeCount 
eScore_MismatchCount 
eScore_GapCount 
eScore_PercentIdentity_Gapped 
eScore_PercentIdentity_Ungapped 
eScore_PercentIdentity_GapOpeningOnly 
eScore_PercentCoverage 
eScore_SumEValue 
eScore_CompAdjMethod 
eScore_HighQualityPercentCoverage 
eScore_Matches 
eScore_OverallIdentity 
eScore_Splices 
eScore_ConsensusSplices 
eScore_ProductCoverage 
eScore_ExonIdentity 
eScore_PercentIdentity 

Definition at line 128 of file Seq_align.hpp.

Constructor & Destructor Documentation

◆ CSeq_align() [1/2]

CSeq_align::CSeq_align ( void  )
inline

constructor

Definition at line 445 of file Seq_align.hpp.

◆ ~CSeq_align()

CSeq_align::~CSeq_align ( void  )

destructor

Definition at line 68 of file Seq_align.cpp.

◆ CSeq_align() [2/2]

CSeq_align::CSeq_align ( const CSeq_align value)
private

Prohibit copy constructor and assignment operator.

Member Function Documentation

◆ AlignLengthRatio()

double CSeq_align::AlignLengthRatio ( ) const

Definition at line 2017 of file Seq_align.cpp.

References COpenRange< Position >::GetLength(), GetSeqRange(), and r().

Referenced by CScore_AlignLengthRatio::Get().

◆ CheckNumRows()

CSeq_align::TDim CSeq_align::CheckNumRows ( void  ) const

Validatiors.

Definition at line 73 of file Seq_align.cpp.

References CDense_seg::CheckNumRows(), CSparse_seg::CheckNumRows(), CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, Get(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetSegs(), CSeq_align_Base::C_Segs::GetSparse(), ITERATE, and NCBI_THROW.

Referenced by CRemoveSeqFromAlignDlg::ApplyToCSeq_entry(), BuildAlignDataSource(), IProjectViewFactory::CombineInputObjects(), IProjectViewFactory::CombineObjects(), CTableViewWithTextViewNav::CombineObjects(), ConvertSeqAlignToPairwiseAln(), CreatePairwiseAlnFromSeqAlign(), CMAViewManager::DoTransition(), CEditSeqEndsWithAlign::FindPosition(), CEditSeqEndsWithAlign::FindRow(), CSequenceUpdater::FindRowInAlignment(), GapLengthRange(), CSGAlignmentJob::GetAlignType(), CDataTrackUtils::GetAlignType(), GetAnchors(), CScoreBuilder::GetBlastScore(), CSeqUtils::GetLocPlacements(), CAlignGroup::GroupByStrand(), CAlignFilter::Match(), CMAViewManager::NeedAnchorPanel(), PatchTargetSequence(), CTabularFormatter_Defline::Print(), CTabularFormatter_ProtRef::Print(), CTabularFormatter_TaxId::Print(), CTabularFormatter_Comment::Print(), CTabularFormatter_OrgName::Print(), CRevCompSequencesDlg::RevCompBioSeq(), CFeatCompareJob_Align::Run(), s_ComputeTraceback(), s_ExtendEntriesFromAlignments(), s_GetAlignmentTooltip(), s_GetAlnMapplingLocs(), s_GetRnaMappingLocs(), s_Seq_align_Seq_loc(), CConversionResultPanel::SetObjects(), sFindAnchorRow(), sGenerateFields(), CFeatureGenerator::SImplementation::SMapper::SMapper(), UpdateDensegAlignment(), Validate(), CCleanupAlignmentsToolManager::x_AreSelfAlignmentsOnly(), CTableViewWithTextViewNav::x_EditObject(), CSequenceEditingEventHandler::x_FindRelevantAlignRow(), CValidatePanel::x_LaunchEditor(), CBatchFeatJob::x_LoadFeatProducts(), CSplitDataLoader::x_SplitAligns(), and CEditObjectFeaturePropagate::xInit().

◆ CreateDensegFromDisc()

CRef< CSeq_align > CSeq_align::CreateDensegFromDisc ( SSeqIdChooser SeqIdChooser = 0) const

◆ CreateDensegFromStdseg()

CRef< CSeq_align > CSeq_align::CreateDensegFromStdseg ( SSeqIdChooser SeqIdChooser = 0) const

◆ CreateRowSeq_loc()

CRef< CSeq_loc > CSeq_align::CreateRowSeq_loc ( TDim  row) const

◆ CreateTranslatedDensegFromNADenseg()

CRef< CSeq_align > CSeq_align::CreateTranslatedDensegFromNADenseg ( void  ) const

Create a Dense-seg with widths from Dense-seg of nucleotides Used by AlnMgr to handle translated nucl2nucl alignments IMPORTANT NOTE: Do *NOT* use for alignments containing proteins; the code will not check for this.

---------------------------------------------------------------------------- PRE : the Seq-align is a Dense-seg of aligned nucleotide sequences POST: Seq_align of type Dense-seg is created with each of the m_Widths equal to 3 and m_Lengths devided by 3.

Definition at line 953 of file Seq_align.cpp.

References CSerialObject::Assign(), CSeq_align_Base::eType_not_set, CSeq_align_Base::C_Segs::GetDenseg(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetSegs(), NStr::IntToString(), NCBI_THROW, CDense_seg_Base::SetLens(), CSeq_align_Base::SetSegs(), CSeq_align_Base::SetType(), CDense_seg::SetWidths(), string, and CDense_seg::Validate().

Referenced by CAlignFormatUtil::GetAlignmentLength(), s_SeqAlignSetToXMLHsps(), CBlastTabularInfo::SetFields(), and CDisplaySeqalign::x_GetAlnVecForSeqalign().

◆ ExonLengthRange()

CSeq_align::TLengthRange CSeq_align::ExonLengthRange ( ) const

◆ FindExt() [1/2]

CRef< CUser_object > CSeq_align::FindExt ( const string ext_type)

◆ FindExt() [2/2]

CConstRef< CUser_object > CSeq_align::FindExt ( const string ext_type) const

Find extension by type in ext container.

Parameters
ext_typeString id of the extension to find.
Returns
User-object of the requested type or NULL.

Definition at line 2274 of file Seq_align.cpp.

References CSeq_align_Base::GetExt(), CObject_id_Base::GetStr(), CSeq_align_Base::IsSetExt(), CObject_id_Base::IsStr(), ITERATE, and CConstRef< C, Locker >::Reset().

Referenced by PrintSAM(), and PrintTabular().

◆ GapLengthRange()

CSeq_align::TLengthRange CSeq_align::GapLengthRange ( ) const

◆ GetAlignedBases()

CRangeCollection< TSeqPos > CSeq_align::GetAlignedBases ( TDim  row) const

◆ GetAlignLength()

TSeqPos CSeq_align::GetAlignLength ( bool  include_gaps = true) const

◆ GetAlignLengthWithinRange()

TSeqPos CSeq_align::GetAlignLengthWithinRange ( const TSeqRange range,
bool  include_gaps = true 
) const

Get the length of this alignment within a specified range By default, this function computes an alignment length including all gap segments.

Definition at line 2001 of file Seq_align.cpp.

References compile_time_bits::range(), and s_GetAlignmentLength().

Referenced by CScoreBuilderBase::GetAlignLength().

◆ GetAlignLengthWithinRanges()

TSeqPos CSeq_align::GetAlignLengthWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
bool  include_gaps = true 
) const

Get the length of this alignment within a specified range By default, this function computes an alignment length including all gap segments.

Definition at line 2010 of file Seq_align.cpp.

References s_GetAlignmentLength().

Referenced by CScoreBuilderBase::ComputeScore(), CScoreBuilderBase::GetAlignLength(), s_GetPercentCoverage(), and s_GetPercentIdentity().

◆ GetFrameshifts()

vector< CSeq_align::SIndel > CSeq_align::GetFrameshifts ( TDim  row = -1) const

Retrieves descriptions of all frameshifts on a given row; i.e.

all gaps with a length that is not a multiple of 3.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1741 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().

◆ GetFrameshiftsWithinRange()

vector< CSeq_align::SIndel > CSeq_align::GetFrameshiftsWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

Definition at line 1747 of file Seq_align.cpp.

References compile_time_bits::range(), row, and s_GetIndels().

Referenced by CTabularFormatter_Indels::Print().

◆ GetFrameshiftsWithinRanges()

vector< CSeq_align::SIndel > CSeq_align::GetFrameshiftsWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1753 of file Seq_align.cpp.

References row, and s_GetIndels().

◆ GetIndels()

vector< CSeq_align::SIndel > CSeq_align::GetIndels ( TDim  row = -1) const

Retrieves descriptions of all indels on a given row.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1777 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().

◆ GetIndelsWithinRange()

vector< CSeq_align::SIndel > CSeq_align::GetIndelsWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

Definition at line 1783 of file Seq_align.cpp.

References compile_time_bits::range(), row, and s_GetIndels().

Referenced by CTabularFormatter_Indels::Print().

◆ GetIndelsWithinRanges()

vector< CSeq_align::SIndel > CSeq_align::GetIndelsWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1789 of file Seq_align.cpp.

References row, and s_GetIndels().

◆ GetNamedScore() [1/4]

bool CSeq_align::GetNamedScore ( const string id,
double &  score 
) const

--------------------------------------------------------------------------- PRE : name of score to return POST: whether or not we found that score; score converted to double

Definition at line 580 of file Seq_align.cpp.

References x_GetNamedScore().

◆ GetNamedScore() [2/4]

bool CSeq_align::GetNamedScore ( const string id,
int score 
) const

Get score.

--------------------------------------------------------------------------- PRE : name of score to return POST: whether or not we found that score; score converted to int

Definition at line 563 of file Seq_align.cpp.

References int, and x_GetNamedScore().

Referenced by BOOST_AUTO_TEST_CASE(), CMatePairGlyph::CMatePairGlyph(), CVecscreenRun::CFormatter::FormatResults(), CBlastAligner::GenerateAlignments(), CRemoteBlastAligner::GenerateAlignments(), GetNamedScore(), CdBlaster::getPsiBlastEValue(), CdBlaster::getPsiBlastScore(), SSeqAlignsByScore::operator()(), SSeqAlignsByPctIdent::operator()(), CTabularFormatter_EValue_Mantissa::Print(), CTabularFormatter_EValue_Exponent::Print(), PrintSAM(), PrintTabular(), CdBlaster::processBlastHits(), CSimpleB2SWrapper::processBlastHits(), CFeatureGenerator::SImplementation::RecalculateScores(), CTestBlastp_All::RunTest(), s_AddReciprocityScore(), s_CheckTraceMateAlign(), s_CompareSeqAlignByEvalue(), s_CompareSeqAlignByScore(), s_CompareSeqAlignByScoreAndName(), ScorePositionSort::s_CompareSeqAlignByScoreAndPosition(), s_GetAlignmentTooltip(), s_GetCountIdentityMismatch(), s_GetPercentCoverage(), s_IsSecondPassAlignment(), s_IsSeqAlignAsGood(), s_ScoreAlignments(), CInversionMergeAligner::s_SortByPctCoverage(), CWeightedIdentityScorer::ScoreAlignments(), CClippedScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), sGenerateFields(), CDUpdater::update(), CTableDataAlnSummary::x_GetAlnSummary(), CBlastTabularInfo::x_SetQueryCovSeqalign(), CBlastTabularInfo::x_SetQueryCovSubject(), and CBlastTabularInfo::x_SetQueryCovUniqSubject().

◆ GetNamedScore() [3/4]

bool CSeq_align::GetNamedScore ( EScoreType  type,
double &  score 
) const

Definition at line 600 of file Seq_align.cpp.

References GetNamedScore(), and sc_ScoreNames.

◆ GetNamedScore() [4/4]

bool CSeq_align::GetNamedScore ( EScoreType  type,
int score 
) const

Definition at line 595 of file Seq_align.cpp.

References GetNamedScore(), and sc_ScoreNames.

◆ GetNonFrameshifts()

vector< CSeq_align::SIndel > CSeq_align::GetNonFrameshifts ( TDim  row = -1) const

Retrieves descriptions of all non-frameshift indels on a given row; i.e.

all gaps with a length that is a multiple of 3.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1759 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().

◆ GetNonFrameshiftsWithinRange()

vector< CSeq_align::SIndel > CSeq_align::GetNonFrameshiftsWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

Definition at line 1765 of file Seq_align.cpp.

References compile_time_bits::range(), row, and s_GetIndels().

Referenced by CTabularFormatter_Indels::Print().

◆ GetNonFrameshiftsWithinRanges()

vector< CSeq_align::SIndel > CSeq_align::GetNonFrameshiftsWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1771 of file Seq_align.cpp.

References row, and s_GetIndels().

◆ GetNumFrameshifts()

TSeqPos CSeq_align::GetNumFrameshifts ( TDim  row = -1) const

Retrieves the number of times a given row shifts frames; i.e.

the number of gaps with a length that is not a multiple of 3.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1716 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().

Referenced by CScore_FrameShifts::Get(), and SAlignmentScoringModel::GetScore().

◆ GetNumFrameshiftsWithinRange()

TSeqPos CSeq_align::GetNumFrameshiftsWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

Definition at line 1725 of file Seq_align.cpp.

References compile_time_bits::range(), row, and s_GetIndels().

Referenced by CScore_FrameShifts::Get().

◆ GetNumFrameshiftsWithinRanges()

TSeqPos CSeq_align::GetNumFrameshiftsWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1733 of file Seq_align.cpp.

References row, and s_GetIndels().

◆ GetNumGapOpenings()

TSeqPos CSeq_align::GetNumGapOpenings ( TDim  row = -1) const

Retrieves the number of gap openings in a given row in an alignment (ignoring how many gaps are in the gapped region); all gaps by default.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1557 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetGapCount().

Referenced by CScore_GapCount::Get(), CScore_FrameShifts::Get(), CScoreBuilderBase::GetGapCount(), SAlignmentScoringModel::GetScore(), and CTabularFormatter_GapCount::Print().

◆ GetNumGapOpeningsWithinRange()

TSeqPos CSeq_align::GetNumGapOpeningsWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

◆ GetNumGapOpeningsWithinRanges()

TSeqPos CSeq_align::GetNumGapOpeningsWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1582 of file Seq_align.cpp.

References row, and s_GetGapCount().

Referenced by CScoreBuilderBase::GetGapCount(), and s_GetPercentIdentity().

◆ GetSeq_id()

const CSeq_id & CSeq_align::GetSeq_id ( TDim  row) const

Get seq-id (the first one if segments have different ids).

Throw exception if row is invalid.

Definition at line 317 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, Get(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_loc::GetId(), CSpliced_seg_Base::GetProduct_id(), CSeq_align_Base::GetSegs(), CDense_seg::GetSeq_id(), CSparse_seg::GetSeq_id(), CSeq_align_Base::C_Segs::GetSparse(), CSeq_align_Base::C_Segs::GetSpliced(), ITERATE, NCBI_THROW, and row.

Referenced by CGBProjectHelper::AddProjectItemsFromRID(), CVDBBlastUtil::AddSubjectsToScope(), BOOST_AUTO_TEST_CASE(), variation_ref::CVariationUtil::CheckExonBoundary(), variation::CVariationUtil::CheckExonBoundary(), IProjectViewFactory::CombineInputObjects(), IProjectViewFactory::CombineObjects(), CTableViewWithTextViewNav::CombineObjects(), Compare(), CScoreBuilderBase::ComputeScore(), CreatePairwiseAlnFromSeqAlign(), CMAViewManager::DoTransition(), CSeqAlignFilter::FilterByAccessionType(), CSeqAlignFilter::FilterByTaxonomy(), variation::CVariationUtil::FindLocationProperties(), CEditSeqEndsWithAlign::FindRow(), CSequenceUpdater::FindRowInAlignment(), CInternalStopFinder::FindStartStopRanges(), CScore_Overlap::Get(), CScore_OverlapBoth::Get(), CScore_OrdinalPos::Get(), CScore_FrameShifts::Get(), CScore_3PrimeUnaligned::Get(), CScore_Polya::Get(), CScore_SequenceLength::Get(), CScore_SymmetricOverlap::Get(), CScore_StartStopCodon::Get(), CScore_CdsScore::Get(), CScore_Coverage::Get(), CScore_Taxid::Get(), CScore_BlastRatio::Get(), CScore_GeneID::Get(), CScore_RibosomalSlippage::Get(), CScore_SegPct::Get(), CScore_Entropy::Get(), GetAlignmentForRna(), CSGAlignmentJob::GetAlignType(), CDataTrackUtils::GetAlignType(), GetAnchors(), CScoreBuilder::GetBlastScoreProtToNucl(), CScoreBuilder::GetBlastScoreStd(), CAlignFormatUtil::GetDbType(), CDesktopAlignItem::GetDescription(), variation::GetFocusLocusIDs(), CSeqUtils::GetLocPlacements(), CProductStringBuilder::GetProductString(), GetReportableSeqIdForAlignment(), CAlignFormatUtil::GetSeqAlignCalcParams(), CAlignFormatUtil::GetSeqAlignSetCalcParamsFromASN(), CCommentItem::GetStringForTPA(), variation::GetUniquePrimaryTranscriptId(), CMergeTreeThread::Main(), MakeKey(), CAlignFilter::Match(), CTreeAlignMerger::Merge_AllAtOnce(), CTreeAlignMerger::Merge_Pairwise(), CMAViewManager::NeedAnchorPanel(), SAlignSortByQueryId::operator()(), CAlignSort::SAlignExtractor::operator()(), SCompareAlignments::operator()(), SFlybaseCompareAlignments::operator()(), PatchTargetSequence(), CTabularFormatter_AllSeqIds::Print(), CTabularFormatter_SeqId::Print(), CTabularFormatter_MismatchPositions::Print(), CTabularFormatter_Defline::Print(), CTabularFormatter_ProtRef::Print(), CTabularFormatter_Comment::Print(), CTabularFormatter_SeqChrom::Print(), CTabularFormatter_SeqClone::Print(), CTabularFormatter_Tech::Print(), CTabularFormatter_AssemblyInfo::Print(), CTabularFormatter_PatchType::Print(), CTabularFormatter_NearestGap::Print(), CTabularFormatter_Indels::Print(), CTabularFormatter_GeneSymbol::Print(), CTabularFormatter_StartCodonChanges::Print(), PrintSAM(), PrintTabular(), ProjectExons(), variation_ref::CVariationUtil::Remap(), variation::CVariationUtil::Remap(), variation::CVariationUtil::RemapToAnnotatedTarget(), CRevCompSequencesDlg::RevCompBioSeq(), CMergeyApp::Run(), CFeatCompareJob_Align::Run(), CTestCompartApplication::Run(), CMultiApplication::Run(), CTestSingleAln_All::RunTest(), s_CheckTraceMateAlign(), s_CodonVariation(), s_CompareSeqAlignByEvalue(), s_CompareSeqAlignByScoreAndName(), ScorePositionSort::s_CompareSeqAlignByScoreAndPosition(), s_ExtendEntriesFromAlignments(), s_ExtractSeqId(), s_GetAlignedSeqGi(), s_GetAlignmentSpans_Interval(), s_GetAlignmentTooltip(), s_GetAlignTitle(), s_GetAlnMapplingLocs(), s_GetCigarString(), s_GetCountIdentityMismatch(), s_GetPercentCoverage(), s_GetPolyA_genomic_priming(), s_GetRnaMappingLocs(), s_GetSplicedSegIdentityMismatch(), s_IsProteinToGenomic(), s_ModifySeqAlnWithFilteredSeqIDs(), s_Seq_align_Seq_loc(), s_SeqAlignInSet(), s_SeqAlignSetToXMLHsps(), s_TestResultAlignment(), s_UpdateSeqAlnWithFilteredSeqIDs(), s_UpdateSubjectInSeqalign(), CAlignCompare::SAlignment::SAlignment(), CWeightedIdentityScorer::ScoreAlignments(), COverlapScorer::ScoreAlignments(), CClippedScorer::ScoreAlignments(), CCommonComponentScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), CReportEntry::SetAlignment(), CBlastTabularInfo::SetFields(), CIgBlastTabularInfo::SetIgAnnotation(), CConversionResultPanel::SetObjects(), sFindAnchorRow(), sGenerateFields(), CLDS2_AnnotType_Hook::SkipObject(), CFeatureGenerator::SImplementation::SMapper::SMapper(), CFeatureGenerator::SImplementation::StitchSmallHoles(), testResultAlignments(), CFeatureGenerator::SImplementation::TransformProteinAlignToTranscript(), UpdateDensegAlignment(), CIgBlast::x_AnnotateC(), CIgBlast::x_AnnotateD(), CIgBlast::x_AnnotateDJ(), CIgBlast::x_AnnotateDomain(), CIgBlast::x_AnnotateJ(), CCleanupAlignmentsToolManager::x_AreSelfAlignmentsOnly(), CSequenceUpdater::x_ChangeIDInFeature(), CFeatureGenerator::SImplementation::x_CreateCdsFeature(), CInversionMergeAligner::x_CreateDiscAlignment(), CFeatureGenerator::SImplementation::x_CreateProteinBioseq(), CTableViewWithTextViewNav::x_EditObject(), CPsiBlastInputData::x_ExtractQueryForPssm(), CCddInputData::x_ExtractQueryForPssm(), CIgBlast::x_FillJDomain(), CSequenceEditingEventHandler::x_FindRelevantAlignRow(), CUnorderedSplitter::x_FixAlignment(), CAlignFilter::x_FuncCall(), CTableDataAlnSummary::x_GetAlnSummary(), CVecscreenRun::CFormatter::x_GetIdsAndTitlesForSeqAlign(), CFeatureGenerator::SImplementation::SMapper::x_GetLocFromSplicedExons(), CShowBlastDefline::x_GetScoreInfo(), CCommonComponentScorer::x_GetSeqHistCompList(), CPrimaryItem::x_GetStrForPrimary(), CFeatureGenerator::SImplementation::x_HandleCdsExceptions(), CFeatureGenerator::SImplementation::x_HandleRnaExceptions(), CValidatePanel::x_LaunchEditor(), CBatchFeatJob::x_LoadFeatProducts(), CTreeAlignMerger::x_MakeMergeableGroups(), COligoSpecificityCheck::x_NW_alignment(), CGFFReader::x_PlaceAlignment(), CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile(), CAlignFilter::x_Query_Op(), CSGAlnQualityScore::x_RetrieveQualityMap(), COligoSpecificityCheck::x_SavePrimerInfo(), COligoSpecificityCheck::x_SequencesMappedToSameTarget(), CMultiAligner::x_SetDomainHits(), CBlastTabularInfo::x_SetQueryCovSubject(), CBlastTabularInfo::x_SetQueryCovUniqSubject(), CSplitDataLoader::x_SplitAligns(), and CEditObjectFeaturePropagate::xInit().

◆ GetSeqRange()

CRange< TSeqPos > CSeq_align::GetSeqRange ( TDim  row) const

GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin part of Prot-pos.

The frame is ignored.

Definition at line 153 of file Seq_align.cpp.

References CSeq_id::Assign(), CSeq_align_Base::CanGetDim(), COpenRange< Position >::CombineWith(), CSeq_id::Compare(), CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, CSeq_id::e_YES, COpenRange< Position >::Empty(), Get(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetDim(), CSeq_interval_Base::GetFrom(), CSeq_interval_Base::GetId(), CSeq_point_Base::GetId(), CSeq_loc_Base::GetInt(), CSeq_loc_Base::GetPnt(), CSeq_point_Base::GetPoint(), CSeq_align_Base::GetSegs(), CDense_seg::GetSeqRange(), CSparse_seg::GetSeqRange(), CSpliced_seg::GetSeqRange(), CSeq_align_Base::C_Segs::GetSparse(), CSeq_align_Base::C_Segs::GetSpliced(), CSeq_interval_Base::GetTo(), i, CSeq_loc_Base::IsInt(), CSeq_loc_Base::IsPnt(), ITERATE, NCBI_THROW, and row.

Referenced by AlignLengthRatio(), AlnFromRangeAscendingSort(), BuildAlignDataSource(), CScore_Overlap::Get(), CScore_OverlapBoth::Get(), CScore_SegPct::Get(), CScore_Entropy::Get(), CSGAlignmentJob::GetAlignType(), GetSeqStart(), GetSeqStop(), CAlignFilter::Match(), SSeqAlignsBySize::operator()(), CAlignSort::SAlignExtractor::operator()(), PatchTargetSequence(), CTabularFormatter_AlignStart::Print(), CTabularFormatter_AlignEnd::Print(), CTabularFormatter_MismatchPositions::Print(), CTabularFormatter_GapRanges::Print(), CTabularFormatter_ExonIntrons::Print(), CTabularFormatter_AlignLengthRatio::Print(), CTabularFormatter_NearestGap::Print(), PrintSAM(), PrintTabular(), CFeatCompareJob_Align::Run(), CTestCompartApplication::Run(), CTestSingleAln_All::RunTest(), s_AlignDist(), s_GetAlignmentSpans_Exon(), s_GetAlignmentSpans_Span(), s_GetAlignmentTooltip(), s_GetCigarString(), s_Seq_align_Seq_loc(), CAlignCompare::SAlignment::SAlignment(), SCompartmentData::SCompartmentData(), CExpansionScorer::ScoreAlignments(), CHangScorer::ScoreAlignments(), CClippedScorer::ScoreAlignments(), sGenerateFields(), CLDS2_AnnotType_Hook::SkipObject(), CAlignCompare::SAlignment::Slice(), CFeatureGenerator::SImplementation::x_CheckMatch(), CQuerySet::x_ContainsAlignment(), CVecscreen::x_GetMatchType(), CFeatureGenerator::SImplementation::x_HandleRnaExceptions(), COligoSpecificityCheck::x_IsPcrLengthInRange(), CUnorderedSplitter::x_MakeAlignmentPairUnique(), CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile(), CSGAlnQualityScore::x_RetrieveQualityMap(), COligoSpecificityCheck::x_SavePrimerInfo(), COligoSpecificityCheck::x_SequencesMappedToSameTarget(), and COligoSpecificityTemplate::x_SortHit().

◆ GetSeqStart()

TSeqPos CSeq_align::GetSeqStart ( TDim  row) const

Definition at line 252 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, CSeq_align_Base::C_Segs::GetDenseg(), CRange_Base::GetFrom(), CSeq_align_Base::GetSegs(), GetSeqRange(), CDense_seg::GetSeqStart(), CSparse_seg::GetSeqStart(), CSpliced_seg::GetSeqStart(), CSeq_align_Base::C_Segs::GetSparse(), CSeq_align_Base::C_Segs::GetSpliced(), NCBI_THROW, and row.

Referenced by CGBProjectHelper::AddProjectItemsFromRID(), BOOST_AUTO_TEST_CASE(), Compare(), CVecscreenRun::CFormatter::FormatResults(), CInstance::GapDistance(), CScore_AlignStartStop::Get(), GetUnalignedLength_3p(), GetUnalignedLength_5p(), CInstance::IsAlignmentContained(), CInstance::MergeIn(), compare_alignments_fwrev_first::operator()(), compare_alignments_revfw_first::operator()(), SAlignSortByQueryId::operator()(), CAlignSort::SAlignExtractor::operator()(), SCompareAlignments::operator()(), SFlybaseCompareAlignments::operator()(), CTabularFormatter_AlignStart::Print(), CTabularFormatter_AlignEnd::Print(), PrintSAM(), PrintTabular(), variation::CVariationUtil::Remap(), CTestSingleAln_All::RunTest(), ScorePositionSort::s_CompareSeqAlignByScoreAndPosition(), s_DJNotCompatible(), s_GetAlignmentMismatches(), s_GetIndels(), s_GetPolyA_genomic_priming(), s_SeqAlignInSet(), s_SeqAlignIntercept(), s_SeqAlignSetToXMLHsps(), CUnorderedSplitter::s_SortByQueryStart(), s_SortSeqAlignByQuery_Subjt(), s_SortSeqAlignByQueryMinus_Subjt(), COverlapScorer::ScoreAlignments(), CCommonComponentScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), CAlignFormatUtil::SortHspByMasterStartAscending(), CAlignFormatUtil::SortHspBySubjectStartAscending(), CQuerySet::x_AlreadyContains(), CIgBlast::x_AnnotateC(), CIgBlast::x_AnnotateD(), CIgBlast::x_AnnotateDJ(), CIgBlast::x_AnnotateDomain(), CIgBlast::x_AnnotateJ(), CIgBlast::x_AnnotateV(), CInversionMergeAligner::x_CreateDiscAlignment(), CIgBlast::x_FillJDomain(), CTableDataAlnSummary::x_GetAlnSummary(), CPrimaryItem::x_GetStrForPrimary(), COligoSpecificityCheck::x_IsPcrLengthInRange(), CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile(), CSGAlnQualityScore::x_RetrieveQualityMap(), CMagicBlastResults::x_SetInfo(), CBlastTabularInfo::x_SetQueryCovSeqalign(), and CUpdateSeqPanel::x_SetUpdateTypes().

◆ GetSeqStop()

TSeqPos CSeq_align::GetSeqStop ( TDim  row) const

Definition at line 273 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetSegs(), GetSeqRange(), CDense_seg::GetSeqStop(), CSparse_seg::GetSeqStop(), CSpliced_seg::GetSeqStop(), CSeq_align_Base::C_Segs::GetSparse(), CSeq_align_Base::C_Segs::GetSpliced(), CRange_Base::GetTo(), NCBI_THROW, and row.

Referenced by CGBProjectHelper::AddProjectItemsFromRID(), CVecscreenRun::CFormatter::FormatResults(), CInstance::GapDistance(), CScore_AlignStartStop::Get(), CScore_3PrimeUnaligned::Get(), GetUnalignedLength_3p(), GetUnalignedLength_5p(), CInstance::IsAlignmentContained(), CInstance::MergeIn(), SAlignSortByQueryId::operator()(), CAlignSort::SAlignExtractor::operator()(), SCompareAlignments::operator()(), SFlybaseCompareAlignments::operator()(), CTabularFormatter_AlignStart::Print(), CTabularFormatter_AlignEnd::Print(), variation::CVariationUtil::Remap(), CTestSingleAln_All::RunTest(), s_DJNotCompatible(), s_GetAlignmentMismatches(), s_GetIndels(), s_GetPolyA_genomic_priming(), s_SeqAlignInSet(), s_SeqAlignIntercept(), s_SeqAlignSetToXMLHsps(), s_SortSeqAlignByQuery_Subjt(), s_SortSeqAlignByQueryMinus_Subjt(), COverlapScorer::ScoreAlignments(), CCommonComponentScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), CAlignFormatUtil::SortHspByMasterStartAscending(), CAlignFormatUtil::SortHspBySubjectStartAscending(), CQuerySet::x_AlreadyContains(), CIgBlast::x_AnnotateC(), CIgBlast::x_AnnotateD(), CIgBlast::x_AnnotateDJ(), CIgBlast::x_AnnotateDomain(), CIgBlast::x_AnnotateJ(), CIgBlast::x_AnnotateV(), CInversionMergeAligner::x_CreateDiscAlignment(), CIgBlast::x_FillJDomain(), CTableDataAlnSummary::x_GetAlnSummary(), CPrimaryItem::x_GetStrForPrimary(), COligoSpecificityCheck::x_IsPcrLengthInRange(), CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile(), CSGAlnQualityScore::x_RetrieveQualityMap(), CBlastTabularInfo::x_SetQueryCovSeqalign(), and CUpdateSeqPanel::x_SetUpdateTypes().

◆ GetSeqStrand()

ENa_strand CSeq_align::GetSeqStrand ( TDim  row) const

Get strand (the first one if segments have different strands).

Definition at line 294 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, CSeq_align_set_Base::Get(), CSeq_align_Base::C_Segs::GetDendiag(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::C_Segs::GetDisc(), CSeq_align_Base::GetSegs(), CDense_seg::GetSeqStrand(), CSparse_seg::GetSeqStrand(), CSpliced_seg::GetSeqStrand(), CSeq_align_Base::C_Segs::GetSparse(), CSeq_align_Base::C_Segs::GetSpliced(), CSeq_align_Base::C_Segs::GetStd(), NCBI_THROW, and row.

Referenced by CVecscreenRun::CFormatter::FormatResults(), CScoreBuilder::GetBlastScoreProtToNucl(), SAlignmentScoringModel::GetPolyA_length(), CProductStringBuilder::GetProductString(), GetTerminalPartialness(), GetUnalignedLength_3p(), GetUnalignedLength_5p(), CAlignGroup::GroupByStrand(), IntronLengthRange(), CInstance::IsAlignmentContained(), CMergeTreeThread::Main(), CTreeAlignMerger::Merge_AllAtOnce(), CTreeAlignMerger::Merge_Pairwise(), compare_alignments_fwrev_first::operator()(), compare_alignments_revfw_first::operator()(), CAlignSort::SAlignExtractor::operator()(), SCompareAlignments::operator()(), SFlybaseCompareAlignments::operator()(), PatchTargetSequence(), CTabularFormatter_AlignStart::Print(), CTabularFormatter_AlignEnd::Print(), CTabularFormatter_AlignStrand::Print(), CTabularFormatter_MismatchPositions::Print(), CTabularFormatter_ExonIntrons::Print(), PrintSAM(), PrintTabular(), ProjectExons(), CMergeyApp::Run(), CFeatCompareJob_Align::Run(), ScorePositionSort::s_CompareSeqAlignByScoreAndPosition(), s_ComputeTraceback(), s_GetAlignmentMismatches(), s_GetAlignmentTooltip(), s_GetCigarString(), s_GetSeqStrand(), s_SeqAlignIntercept(), s_SeqAlignSetToXMLHsps(), s_SortSeqAlignByQuery_Subjt(), s_SortSeqAlignByQueryMinus_Subjt(), CAlignCompare::SAlignment::SAlignment(), COverlapScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), sGenerateFields(), CAlignmentAssistant::TranslateLocations(), CIgBlast::x_AnnotateC(), CIgBlast::x_AnnotateDomain(), CFeatureGenerator::SImplementation::x_CheckMatch(), CInversionMergeAligner::x_CreateDiscAlignment(), CIgBlast::x_FillJDomain(), CTableDataAlnSummary::x_GetAlnSummary(), CPrimaryItem::x_GetStrForPrimary(), CTreeAlignMerger::x_MakeMergeableGroups(), CVecscreen::x_MergeSeqalign(), CAlignFilter::x_Query_Op(), CTabularFormatter_DiscStrand::x_RecurseStrands(), CSGAlnQualityScore::x_RetrieveQualityMap(), and CMagicBlastResults::x_SetInfo().

◆ GetTotalGapCount()

TSeqPos CSeq_align::GetTotalGapCount ( TDim  row = -1) const

Retrieves the total number of gaps in the given row an alignment; all gaps by default.

Exceptions
CSeqalignExceptionif alignment type is not supported

Definition at line 1550 of file Seq_align.cpp.

References COpenRange< TSeqPos >::GetWhole(), row, and s_GetGapCount().

Referenced by CScore_GapCount::Get(), CScoreBuilderBase::GetGapBaseCount(), CTabularFormatter_GapBaseCount::Print(), and s_SeqAlignSetToXMLHsps().

◆ GetTotalGapCountWithinRange()

TSeqPos CSeq_align::GetTotalGapCountWithinRange ( const TSeqRange range,
TDim  row = -1 
) const

Definition at line 1564 of file Seq_align.cpp.

References compile_time_bits::range(), row, and s_GetGapCount().

Referenced by CScoreBuilderBase::GetGapBaseCount().

◆ GetTotalGapCountWithinRanges()

TSeqPos CSeq_align::GetTotalGapCountWithinRanges ( const CRangeCollection< TSeqPos > &  ranges,
TDim  row = -1 
) const

Definition at line 1576 of file Seq_align.cpp.

References row, and s_GetGapCount().

Referenced by CScoreBuilderBase::GetGapBaseCount().

◆ HelpText()

string CSeq_align::HelpText ( EScoreType  score)
static

Definition at line 508 of file Seq_align.cpp.

References sc_ScoreHelpText.

Referenced by CScoreLookup::HelpText().

◆ IntronLengthRange()

CSeq_align::TLengthRange CSeq_align::IntronLengthRange ( ) const

◆ IsIntegerScore()

bool CSeq_align::IsIntegerScore ( EScoreType  score)
static

Definition at line 513 of file Seq_align.cpp.

References sc_IsInteger.

Referenced by CScoreBuilderBase::AddScore(), and CScoreLookup::IsIntegerScore().

◆ OffsetRow()

void CSeq_align::OffsetRow ( TDim  row,
TSignedSeqPos  offset 
)

◆ operator=()

CSeq_align& CSeq_align::operator= ( const CSeq_align value)
private

◆ RemapToLoc()

void CSeq_align::RemapToLoc ( TDim  row,
const CSeq_loc dst_loc,
bool  ignore_strand = false 
)

◆ ResetNamedScore() [1/2]

void CSeq_align::ResetNamedScore ( const string name)

◆ ResetNamedScore() [2/2]

void CSeq_align::ResetNamedScore ( EScoreType  type)

Definition at line 619 of file Seq_align.cpp.

References ResetNamedScore(), and sc_ScoreNames.

◆ Reverse()

void CSeq_align::Reverse ( void  )

Reverse the segments' orientation NOTE: currently *only* works for dense-seg.

--------------------------------------------------------------------------- PRE : currently only implemented for dense-seg segments POST: same alignment, opposite orientation

Definition at line 685 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::GetSegs(), NCBI_THROW, CDense_seg::Reverse(), CSeq_align_Base::C_Segs::SetDenseg(), and CSeq_align_Base::SetSegs().

Referenced by CIgBlastTabularInfo::SetAirrFormatData(), COligoSpecificityCheck::x_AnalyzeOnePrimer(), and CVecscreen::x_MergeSeqalign().

◆ ScoreName()

string CSeq_align::ScoreName ( EScoreType  score)
static

◆ ScoreNameMap()

const CSeq_align::TScoreNameMap & CSeq_align::ScoreNameMap ( )
static

◆ SetNamedScore() [1/4]

void CSeq_align::SetNamedScore ( const string id,
double  score 
)

Definition at line 642 of file Seq_align.cpp.

References x_SetNamedScore().

◆ SetNamedScore() [2/4]

void CSeq_align::SetNamedScore ( const string id,
int  score 
)

◆ SetNamedScore() [3/4]

void CSeq_align::SetNamedScore ( EScoreType  type,
double  score 
)

Definition at line 630 of file Seq_align.cpp.

References sc_ScoreNames, and x_SetNamedScore().

◆ SetNamedScore() [4/4]

void CSeq_align::SetNamedScore ( EScoreType  type,
int  score 
)

Definition at line 624 of file Seq_align.cpp.

References sc_ScoreNames, and x_SetNamedScore().

◆ SplitOnLongDiscontinuity()

void CSeq_align::SplitOnLongDiscontinuity ( list< CRef< CSeq_align > > &  aligns,
TSeqPos  discontinuity_threshold 
) const

Split the alignment at any discontinuity greater than threshold; populate aligns list with new alignments.

If alignment contains no long discontinuities, populate aligns list with a singleton reference to self. Splitting works only for Denseg and Disc; for all other segment types, this function simply populates aligns with a singleton reference to self. This function is only implemented for pairwise alignments; it throws an exception if Dim is more than 2.

Definition at line 1217 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, COpenRange< Position >::Empty(), eUnknown, CSeq_align_set_Base::Get(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetDim(), CSeq_align_Base::C_Segs::GetDisc(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetSegs(), CDense_seg_Base::GetStarts(), CSeq_align_Base::IsSetDim(), ITERATE, NCBI_THROW, COpenRange< Position >::NotEmpty(), s_Distance(), s_GetJoinedAlignment(), CSeq_align_set_Base::Set(), and x_CreateSubsegAlignment().

◆ SwapRows()

void CSeq_align::SwapRows ( TDim  row1,
TDim  row2 
)

Swap the position of two rows in the alignment NOTE: currently *only* works for dense-seg & disc.

--------------------------------------------------------------------------- PRE : currently only implemented for dense-seg segments; two row numbers POST: same alignment, position of the two rows has been swapped

Definition at line 701 of file Seq_align.cpp.

References CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Std, CSeq_align_Base::GetSegs(), NCBI_THROW, NON_CONST_ITERATE, CSeq_align_Base::C_Segs::SetDenseg(), CSeq_align_Base::C_Segs::SetDisc(), CSeq_align_Base::SetSegs(), CDense_seg::SwapRows(), and CSeq_align_set::SwapRows().

◆ Validate()

void CSeq_align::Validate ( bool  full_test = false) const

◆ x_CreateSubsegAlignment()

CRef< CSeq_align > CSeq_align::x_CreateSubsegAlignment ( int  from,
int  to 
) const
private

◆ x_GetNamedScore()

CConstRef< CScore > CSeq_align::x_GetNamedScore ( const string name) const
protected

retrieve a named score object

Definition at line 520 of file Seq_align.cpp.

References CSeq_align_Base::GetScore(), CSeq_align_Base::IsSetScore(), and ITERATE.

Referenced by GetNamedScore().

◆ x_SetNamedScore()

CRef< CScore > CSeq_align::x_SetNamedScore ( const string name)
protected

The documentation for this class was generated from the following files:
Modified on Thu Jun 13 17:32:36 2024 by modify_doxy.py rev. 669887