NCBI C++ ToolKit
|
Search Toolkit Book for CSeq_align
#include <objects/seqalign/Seq_align.hpp>
Classes | |
struct | SIndel |
struct | SSeqIdChooser |
Create a Dense-seg from a Std-seg Used by AlnMgr to handle nucl2prot alignments. 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< TSeqPos > | 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. 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_id & | GetSeq_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< SIndel > | GetIndels (TDim row=-1) const |
Retrieves descriptions of all indels on a given row. More... | |
vector< SIndel > | GetIndelsWithinRange (const TSeqRange &range, TDim row=-1) const |
vector< SIndel > | GetIndelsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const |
vector< SIndel > | GetFrameshifts (TDim row=-1) const |
Retrieves descriptions of all frameshifts on a given row; i.e. More... | |
vector< SIndel > | GetFrameshiftsWithinRange (const TSeqRange &range, TDim row=-1) const |
vector< SIndel > | GetFrameshiftsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const |
vector< SIndel > | GetNonFrameshifts (TDim row=-1) const |
Retrieves descriptions of all non-frameshift indels on a given row; i.e. More... | |
vector< SIndel > | GetNonFrameshiftsWithinRange (const TSeqRange &range, TDim row=-1) const |
vector< SIndel > | GetNonFrameshiftsWithinRanges (const CRangeCollection< TSeqPos > &ranges, TDim row=-1) const |
CRangeCollection< TSeqPos > | GetAlignedBases (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_align > | CreateDensegFromStdseg (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_align > | CreateDensegFromDisc (SSeqIdChooser *SeqIdChooser=0) const |
CRef< 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. 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_loc > | CreateRowSeq_loc (TDim row) const |
TLengthRange | GapLengthRange () const |
TLengthRange | IntronLengthRange () const |
TLengthRange | ExonLengthRange () const |
CConstRef< CUser_object > | FindExt (const string &ext_type) const |
Find extension by type in ext container. More... | |
CRef< CUser_object > | FindExt (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... | |
TType & | SetType (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... | |
TDim & | SetDim (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 TScore & | GetScore (void) const |
Get the Score member data. More... | |
TScore & | SetScore (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 TSegs & | GetSegs (void) const |
Get the Segs member data. More... | |
void | SetSegs (TSegs &value) |
Assign a value to Segs data member. More... | |
TSegs & | SetSegs (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 TBounds & | GetBounds (void) const |
Get the Bounds member data. More... | |
TBounds & | SetBounds (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 TId & | GetId (void) const |
Get the Id member data. More... | |
TId & | SetId (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 TExt & | GetExt (void) const |
Get the Ext member data. More... | |
TExt & | SetExt (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 CTypeInfo * | GetThisTypeInfo (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 string & | GetNamespaceName (void) const |
Get namespace name. More... | |
bool | HasNamespacePrefix (void) const |
Check if data type has namespace prefix. More... | |
const string & | GetNamespacePrefix (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... | |
CObject & | operator= (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 |
Protected Member Functions | |
CConstRef< CScore > | x_GetNamedScore (const string &name) const |
retrieve a named score object More... | |
CRef< CScore > | x_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_align & | operator= (const CSeq_align &value) |
CRef< CSeq_align > | x_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... | |
Definition at line 54 of file Seq_align.hpp.
typedef pair<TSeqPos, TSeqPos> CSeq_align::TLengthRange |
Definition at line 192 of file Seq_align.hpp.
|
private |
Definition at line 56 of file Seq_align.hpp.
typedef map<string, EScoreType> CSeq_align::TScoreNameMap |
Definition at line 194 of file Seq_align.hpp.
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)
Definition at line 128 of file Seq_align.hpp.
|
inline |
constructor
Definition at line 445 of file Seq_align.hpp.
CSeq_align::~CSeq_align | ( | void | ) |
destructor
Definition at line 68 of file Seq_align.cpp.
|
private |
Prohibit copy constructor and assignment operator.
double CSeq_align::AlignLengthRatio | ( | ) | const |
Definition at line 2017 of file Seq_align.cpp.
References GetSeqRange(), r(), r0, and r1.
Referenced by CScore_AlignLengthRatio::Get().
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().
CRef< CSeq_align > CSeq_align::CreateDensegFromDisc | ( | SSeqIdChooser * | SeqIdChooser = 0 | ) | const |
Definition at line 1015 of file Seq_align.cpp.
References _ASSERT, CSeq_id::AsFastaString(), CSeq_align::SSeqIdChooser::ChooseSeqId(), CSeq_align_Base::eType_not_set, Get(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetIds(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetScore(), CSeq_align_Base::GetSegs(), CDense_seg::GetSeqStart(), CDense_seg_Base::GetStarts(), CDense_seg_Base::GetStrands(), IsReverse(), CSeq_align_Base::IsSetScore(), CDense_seg_Base::IsSetStrands(), ITERATE, NCBI_THROW, row, SerialAssign(), SerialEquals(), CDense_seg_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetScore(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), CDense_seg_Base::SetStrands(), CSeq_align_Base::SetType(), ncbi::grid::netcache::search::fields::size, ct::sort(), string, and Validate().
Referenced by CFeaturePropagator::CFeaturePropagator(), and s_GetIndels().
CRef< CSeq_align > CSeq_align::CreateDensegFromStdseg | ( | 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
Definition at line 728 of file Seq_align.cpp.
References CSeq_id::AsFastaString(), CSeq_interval_Base::CanGetStrand(), CSeq_align::SSeqIdChooser::ChooseSeqId(), eNa_strand_unknown, CSeq_align_Base::eType_not_set, CStd_seg_Base::GetDim(), CSeq_interval_Base::GetFrom(), CStd_seg_Base::GetLoc(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetScore(), CSeq_align_Base::GetSegs(), CSeq_interval_Base::GetStrand(), CSeq_interval_Base::GetTo(), i, CSeq_align_Base::IsSetScore(), ITERATE, NCBI_THROW, CDense_seg::ResetWidths(), row, SerialAssign(), SerialEquals(), CDense_seg_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetScore(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), CDense_seg_Base::SetStrands(), CSeq_align_Base::SetType(), CDense_seg::SetWidths(), and string.
Referenced by CAlnMix::Add(), CFeaturePropagator::CFeaturePropagator(), CDisplaySeqalign::DisplaySeqalign(), CAlignFormatUtil::GetAlignmentLength(), SCigarAlignment::operator()(), s_SeqAlignSetToXMLHsps(), CBlastTabularInfo::SetFields(), CCIGAR_Formatter::x_FormatAlignmentRows(), and CDisplaySeqalign::x_GetAlnVecForSeqalign().
Definition at line 2028 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_Packed, CSeq_align_Base::C_Segs::e_Sparse, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, Get(), CSpliced_seg_Base::GetExons(), CSeq_align_Base::GetSegs(), CSeq_align_Base::C_Segs::GetSpliced(), ITERATE, NCBI_THROW, row, CSeq_loc::SetInt(), CSeq_loc::SetMix(), and CSeq_loc::SetPacked_int().
Referenced by variation::CVariationUtil::FindLocationProperties(), CInternalStopFinder::FindStartStopRanges(), CDesktopAlignItem::s_ContainsFarPointers(), CSequenceEditingEventHandler::x_CacheSelectedLocations(), CSGAlignmentJob::x_GetAlignments(), CFeatureGenerator::SImplementation::x_HandleCdsExceptions(), and CIdMapperTestApp::x_RecurseMapSeqAligns().
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().
CSeq_align::TLengthRange CSeq_align::ExonLengthRange | ( | ) | const |
Definition at line 2214 of file Seq_align.cpp.
References SLengthRange::AddLength(), CSpliced_exon_Base::GetGenomic_end(), CSpliced_exon_Base::GetGenomic_start(), CSeq_align_Base::GetSegs(), ITERATE, NCBI_THROW, and SLengthRange::range.
Referenced by CScore_MinExonLength::Get().
CRef< CUser_object > CSeq_align::FindExt | ( | const string & | ext_type | ) |
Non-const version of FindExt().
Definition at line 2289 of file Seq_align.cpp.
References CObject_id_Base::GetStr(), CSeq_align_Base::IsSetExt(), CObject_id_Base::IsStr(), NON_CONST_ITERATE, CRef< C, Locker >::Reset(), and CSeq_align_Base::SetExt().
CConstRef< CUser_object > CSeq_align::FindExt | ( | const string & | ext_type | ) | const |
Find extension by type in ext container.
ext_type | String id of the extension to find. |
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().
CSeq_align::TLengthRange CSeq_align::GapLengthRange | ( | ) | const |
Definition at line 2114 of file Seq_align.cpp.
References SLengthRange::AddLength(), SLengthRange::AddRange(), CheckNumRows(), CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_align_Base::C_Segs::e_Spliced, Get(), CSeq_align_Base::C_Segs::GetDenseg(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSpliced_exon::GetRowSeq_insertions(), CSeq_align_Base::GetSegs(), CDense_seg_Base::GetStarts(), i, ITERATE, NCBI_THROW, r(), SLengthRange::range, and s_Distance().
Referenced by CScore_LongestGapLength::Get().
CRangeCollection< TSeqPos > CSeq_align::GetAlignedBases | ( | TDim | row | ) | const |
Retrieves the locations of aligned bases in the given row, excluding gaps and incontinuities.
CSeqalignException | if alignment type is not supported |
Definition at line 1796 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_Spliced, Get(), CSeq_align_Base::C_Segs::GetDenseg(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetSegs(), CDense_seg_Base::GetStarts(), i, ITERATE, NCBI_THROW, and row.
Referenced by CScore_Overlap::Get(), CScore_OverlapBoth::Get(), CTabularFormatter_GapRanges::Print(), and CAlignFilter::x_FuncCall().
Get the length of this alignment.
This length corresponds to the score 'align_length'. By default, this function computes an alignment length including all gap segments.
Definition at line 1993 of file Seq_align.cpp.
References COpenRange< TSeqPos >::GetWhole(), and s_GetAlignmentLength().
Referenced by CSAM_CIGAR_Formatter::AddRow(), sequpd::CompareAlignments(), CScore_AlignLength::Get(), CScore_SymmetricOverlap::Get(), CScore_Coverage::Get(), CScoreBuilderBase::GetAlignLength(), SAlignmentScoringModel::GetIdentOdds(), SAlignmentScoringModel::GetScore(), CAlignModel::MakeSeqAlign(), SSeqAlignsBySize::operator()(), SSeqAlignsByPctIdent::operator()(), CTabularFormatter_AlignLengthRatio::Print(), s_CompareSeqAlignByEvalue(), s_CompareSeqAlignByScore(), s_CompareSeqAlignByScoreAndName(), ScorePositionSort::s_CompareSeqAlignByScoreAndPosition(), s_GetCountIdentityMismatch(), SAlignmentScoringModel::s_GetIdentOdds_protSS(), s_IsSeqAlignAsGood(), s_SeqAlignSetToXMLHsps(), and CWeightedIdentityScorer::ScoreAlignments().
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().
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().
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.
CSeqalignException | if alignment type is not supported |
Definition at line 1741 of file Seq_align.cpp.
References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().
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().
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().
vector< CSeq_align::SIndel > CSeq_align::GetIndels | ( | TDim | row = -1 | ) | const |
Retrieves descriptions of all indels on a given row.
CSeqalignException | if alignment type is not supported |
Definition at line 1777 of file Seq_align.cpp.
References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().
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().
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().
--------------------------------------------------------------------------- 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().
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(), CWeightedIdentityScorer::ScoreAlignments(), CClippedScorer::ScoreAlignments(), CIgBlastTabularInfo::SetAirrFormatData(), sGenerateFields(), CDUpdater::update(), CTableDataAlnSummary::x_GetAlnSummary(), CBlastTabularInfo::x_SetQueryCovSeqalign(), CBlastTabularInfo::x_SetQueryCovSubject(), and CBlastTabularInfo::x_SetQueryCovUniqSubject().
bool CSeq_align::GetNamedScore | ( | EScoreType | type, |
double & | score | ||
) | const |
Definition at line 600 of file Seq_align.cpp.
References GetNamedScore(), and sc_ScoreNames.
bool CSeq_align::GetNamedScore | ( | EScoreType | type, |
int & | score | ||
) | const |
Definition at line 595 of file Seq_align.cpp.
References GetNamedScore(), and sc_ScoreNames.
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.
CSeqalignException | if alignment type is not supported |
Definition at line 1759 of file Seq_align.cpp.
References COpenRange< TSeqPos >::GetWhole(), row, and s_GetIndels().
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().
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().
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.
CSeqalignException | if 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().
Definition at line 1725 of file Seq_align.cpp.
References compile_time_bits::range(), row, and s_GetIndels().
Referenced by CScore_FrameShifts::Get().
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().
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.
CSeqalignException | if 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().
Definition at line 1570 of file Seq_align.cpp.
References compile_time_bits::range(), row, and s_GetGapCount().
Referenced by CScore_FrameShifts::Get(), and CScoreBuilderBase::GetGapCount().
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().
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 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_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().
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_SeqAlignSetToXMLHsps(), 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().
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_SeqAlignSetToXMLHsps(), 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().
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_SeqAlignSetToXMLHsps(), 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().
Retrieves the total number of gaps in the given row an alignment; all gaps by default.
CSeqalignException | if 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().
Definition at line 1564 of file Seq_align.cpp.
References compile_time_bits::range(), row, and s_GetGapCount().
Referenced by CScoreBuilderBase::GetGapBaseCount().
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().
|
static |
Definition at line 508 of file Seq_align.cpp.
References sc_ScoreHelpText.
Referenced by CScoreLookup::HelpText().
CSeq_align::TLengthRange CSeq_align::IntronLengthRange | ( | ) | const |
Definition at line 2186 of file Seq_align.cpp.
References SLengthRange::AddLength(), eNa_strand_minus, CSpliced_exon_Base::GetGenomic_end(), CSpliced_exon_Base::GetGenomic_start(), COpenRange< Position >::GetLength(), CSeq_align_Base::GetSegs(), GetSeqStrand(), ITERATE, NCBI_THROW, NULL, and SLengthRange::range.
Referenced by CScore_MaxIntronLength::Get().
|
static |
Definition at line 513 of file Seq_align.cpp.
References sc_IsInteger.
Referenced by CScoreBuilderBase::AddScore(), and CScoreLookup::IsIntegerScore().
void CSeq_align::OffsetRow | ( | TDim | row, |
TSignedSeqPos | offset | ||
) |
Offset row's coords.
Definition at line 1332 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_Std, NCBI_THROW, NON_CONST_ITERATE, offset, CDense_seg::OffsetRow(), row, CSeq_align_Base::C_Segs::SetDenseg(), and CSeq_align_Base::SetSegs().
Referenced by CFarPointerSeq::GetCommand(), and RemapToQueryLoc().
|
private |
Definition at line 1365 of file Seq_align.cpp.
References CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Disc, CSeq_loc_Base::e_Int, CSeq_align_Base::C_Segs::e_Std, CSeq_loc_Base::e_Whole, NCBI_THROW, NON_CONST_ITERATE, CDense_seg::RemapToLoc(), row, CSeq_align_Base::C_Segs::SetDenseg(), CSeq_align_Base::SetSegs(), and CSeq_loc_Base::Which().
Definition at line 606 of file Seq_align.cpp.
References CSeq_align_Base::IsSetScore(), NON_CONST_ITERATE, and CSeq_align_Base::SetScore().
Referenced by CScoreBuilderBase::AddScore(), CFeatureGenerator::SImplementation::ClearScores(), CFeatureGenerator::SImplementation::RecalculateScores(), and ResetNamedScore().
void CSeq_align::ResetNamedScore | ( | EScoreType | type | ) |
Definition at line 619 of file Seq_align.cpp.
References ResetNamedScore(), and sc_ScoreNames.
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().
|
static |
Definition at line 503 of file Seq_align.cpp.
References sc_ScoreNames, and SStaticPair< FirstType, SecondType >::second.
Referenced by CScoreBuilderBase::AddSplignScores(), and CScoreBuilderBase::ComputeScore().
|
static |
Definition at line 483 of file Seq_align.cpp.
References DEFINE_STATIC_FAST_MUTEX, map_checker< Container >::empty(), eScore_Blast, eScore_ExonIdentity, SStaticPair< FirstType, SecondType >::first, sc_ScoreNames, and SStaticPair< FirstType, SecondType >::second.
Referenced by CScoreBuilderBase::AddSplignScores(), CScoreLookup::Complexity(), CScoreLookup::GetScore(), CScoreLookup::HelpText(), CScoreLookup::IsIntegerScore(), and CScoreLookup::PrintDictionary().
Definition at line 642 of file Seq_align.cpp.
References x_SetNamedScore().
Definition at line 636 of file Seq_align.cpp.
References x_SetNamedScore().
Referenced by CScoreBuilderBase::AddScore(), AddStandardAlignmentScores(), CScoreBuilder::AddTieBreaker(), BOOST_AUTO_TEST_CASE(), CBlastAligner::GenerateAlignments(), CRemoteBlastAligner::GenerateAlignments(), CAlignModel::MakeSeqAlign(), MakeSubjectScores(), CDemoSeqQaApp::Run(), s_CreateSeqAlign(), CExpansionScorer::ScoreAlignments(), CWeightedIdentityScorer::ScoreAlignments(), CHangScorer::ScoreAlignments(), COverlapScorer::ScoreAlignments(), CClippedScorer::ScoreAlignments(), CCommonComponentScorer::ScoreAlignments(), CAdvancedAlignCleanup::x_AddStandardAlignmentScores(), CPssmCddInputTest::x_CreateAlignment(), CInversionMergeAligner::x_CreateDiscAlignment(), CVecscreen::x_MergeSeqalign(), CMergeAligner::x_MergeSeqAlignSet(), CInstancedAligner::x_RunAligner(), and CGff2Reader::xAlignmentSetScore().
void CSeq_align::SetNamedScore | ( | EScoreType | type, |
double | score | ||
) |
Definition at line 630 of file Seq_align.cpp.
References sc_ScoreNames, and x_SetNamedScore().
void CSeq_align::SetNamedScore | ( | EScoreType | type, |
int | score | ||
) |
Definition at line 624 of file Seq_align.cpp.
References sc_ScoreNames, and x_SetNamedScore().
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().
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().
Definition at line 649 of file Seq_align.cpp.
References 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(), CSeq_align_Base::C_Segs::GetSpliced(), ITERATE, NCBI_THROW, CDense_seg::Validate(), CSparse_seg::Validate(), and CSpliced_seg::Validate().
Referenced by BOOST_AUTO_TEST_CASE(), CreateDensegFromDisc(), CAlignCleanup::CreatePairwiseFromMultiple(), CAlnContainer::insert(), CAlnBuildApp::InsertAln(), CAlnTestApp::InsertAln(), CPairwiseAlnApp::InsertAln(), LoadAligns(), CAnnotationASN1::CImplementationData::model2spliced_seq_align(), CAlnSeqIdsExtract< TAlnSeqId, TIdConverter >::operator()(), CAlnIdMap< _TAlnVec, TAlnSeqIdExtract >::push_back(), s_GetJoinedAlignment(), CGff3Writer::WriteAlign(), CAlignCleanup::x_Cleanup_AnchoredAln(), CSGAlignmentJob::x_CreateAlignGlyphsForCrossOriginAlign(), CMergeAlignmentsJob::x_CreateProjectItems(), x_CreateSubsegAlignment(), and CTreeAlignMerger::x_MakeSeqAlign().
|
private |
Create a partial alignment containing the specified range of segments.
Can only be called for Denseg alignments.
Definition at line 2230 of file Seq_align.cpp.
References ERR_POST, Error(), CSeq_align_Base::eType_partial, CSeq_align_Base::C_Segs::GetDenseg(), CDense_seg_Base::GetIds(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), CSeq_align_Base::GetSegs(), CDense_seg_Base::GetStarts(), CDense_seg_Base::GetStrands(), i, CDense_seg_Base::IsSetStrands(), MSerial_AsnText, CDense_seg_Base::SetDim(), CSeq_align_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), CDense_seg_Base::SetStrands(), CSeq_align_Base::SetType(), CDense_seg::TrimEndGaps(), and Validate().
Referenced by SplitOnLongDiscontinuity().
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().
Definition at line 537 of file Seq_align.cpp.
References CSeq_align_Base::IsSetScore(), NON_CONST_ITERATE, CRef< C, Locker >::Reset(), and CSeq_align_Base::SetScore().
Referenced by SetNamedScore().