NCBI C++ ToolKit
Classes | Typedefs | Functions | Variables
Seq_align.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/seqalign/seqalign_exception.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqalign/Dense_diag.hpp>
#include <objects/seqalign/Std_seg.hpp>
#include <objects/seqalign/Spliced_seg.hpp>
#include <objects/seqalign/Spliced_exon.hpp>
#include <objects/seqalign/Spliced_exon_chunk.hpp>
#include <objects/seqalign/Sparse_seg.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seqalign/Score.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include <objects/seq/seq_loc_mapper_base.hpp>
#include <serial/iterator.hpp>
#include <util/static_set.hpp>
#include <objects/seqalign/Seq_align.hpp>
+ Include dependency graph for Seq_align.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  ds_cmp< T, Pred >
 Strict weak ordering for pairs (by first) Used by CreateDensegFromDisc. More...
 
struct  SLengthRange
 

Typedefs

typedef SStaticPair< CSeq_align::EScoreType, const char * > TScoreNamePair
 

Functions

static TSeqPos s_Distance (const TSeqRange &range1, const TSeqRange &range2)
 
static CRef< CSeq_aligns_GetJoinedAlignment (const CSeq_align_set &aligns)
 Join the alignments in the set into one alignment. More...
 
CRef< CSeq_alignRemapAlignToLoc (const CSeq_align &align, CSeq_align::TDim row, const CSeq_loc &loc)
 Remap seq-align row to the seq-loc. More...
 
static TSeqPos s_IntersectionLength (const CRangeCollection< TSeqPos > &ranges, const TSeqRange &range)
 Get length of intersection between a range and a range collection. More...
 
static TSeqPos s_GetGapCount (const CSeq_align &align, CSeq_align::TDim row, const CRangeCollection< TSeqPos > &ranges, bool get_total_count)
 Retrieves the number of gaps in an alignment. More...
 
static vector< CSeq_align::SIndels_GetIndels (const CSeq_align &align, CSeq_align::TDim row, const CRangeCollection< TSeqPos > &ranges, bool include_frameshifts, bool include_non_frameshifts)
 
static TSeqPos s_DenseSegLength (const CDense_seg &ds, CDense_seg::TNumseg seg, const CRangeCollection< TSeqPos > &ranges)
 Get length of dense-seg alignment within range. More...
 
static TSeqPos s_GetAlignmentLength (const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, bool ungapped)
 calculate the length of our alignment within given range More...
 

Variables

static const TScoreNamePair sc_ScoreNames []
 
static const char *const sc_ScoreHelpText []
 
static const bool sc_IsInteger []
 

Typedef Documentation

◆ TScoreNamePair

Definition at line 403 of file Seq_align.cpp.

Function Documentation

◆ RemapAlignToLoc()

CRef<CSeq_align> RemapAlignToLoc ( const CSeq_align align,
CSeq_align::TDim  row,
const CSeq_loc loc 
)

Remap seq-align row to the seq-loc.

Treats the given row as being relative to the location, maps it to the sequence(s) referenced by this location.

Parameters
alignThe seq-align object to be mapped (the object will be modified!).
rowRow to be mapped.
locSeq-loc to which the row should be mapped.
Returns
Reference to the new seq-align with the mapped row.

Definition at line 1401 of file Seq_align.cpp.

References copy(), eNa_strand_unknown, CSeq_loc::GetId(), CSeq_loc::GetStrand(), CSeq_loc_Base::IsWhole(), len, CSeq_loc_Mapper_Base::Map(), NCBI_THROW, row, and CSeq_loc::SetStrand().

Referenced by s_RemapToSubjectLoc().

◆ s_DenseSegLength()

static TSeqPos s_DenseSegLength ( const CDense_seg ds,
CDense_seg::TNumseg  seg,
const CRangeCollection< TSeqPos > &  ranges 
)
inlinestatic

Get length of dense-seg alignment within range.

Definition at line 1849 of file Seq_align.cpp.

References CRangeCollection< Position >::begin(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetStarts(), and s_IntersectionLength().

Referenced by s_GetAlignmentLength().

◆ s_Distance()

static TSeqPos s_Distance ( const TSeqRange range1,
const TSeqRange range2 
)
static

◆ s_GetAlignmentLength()

static TSeqPos s_GetAlignmentLength ( const CSeq_align align,
const CRangeCollection< TSeqPos > &  ranges,
bool  ungapped 
)
static

◆ s_GetGapCount()

static TSeqPos s_GetGapCount ( const CSeq_align align,
CSeq_align::TDim  row,
const CRangeCollection< TSeqPos > &  ranges,
bool  get_total_count 
)
static

◆ s_GetIndels()

static vector<CSeq_align::SIndel> s_GetIndels ( const CSeq_align align,
CSeq_align::TDim  row,
const CRangeCollection< TSeqPos > &  ranges,
bool  include_frameshifts,
bool  include_non_frameshifts 
)
static

◆ s_GetJoinedAlignment()

static CRef<CSeq_align> s_GetJoinedAlignment ( const CSeq_align_set aligns)
static

◆ s_IntersectionLength()

static TSeqPos s_IntersectionLength ( const CRangeCollection< TSeqPos > &  ranges,
const TSeqRange range 
)
inlinestatic

Get length of intersection between a range and a range collection.

Definition at line 1439 of file Seq_align.cpp.

References ITERATE, and compile_time_bits::range().

Referenced by s_DenseSegLength(), s_GetGapCount(), and s_GetIndels().

Variable Documentation

◆ sc_IsInteger

const bool sc_IsInteger[]
static
Initial value:
= {
true,
true,
false,
false,
true,
true,
true,
true,
true,
true,
false,
false,
false,
false,
false,
false,
false,
true,
false,
true,
true,
false,
false
}

Definition at line 456 of file Seq_align.cpp.

Referenced by CSeq_align::IsIntegerScore().

◆ sc_ScoreHelpText

const char* const sc_ScoreHelpText[]
static
Initial value:
= {
"Blast score",
"Blast score",
"Blast-style bit score",
"Blast-style e-value",
"Length of the aligned segments, including the length of all gap segments",
"Count of identities",
"Count of positives; protein-to-DNA score",
"Count of negatives; protein-to-DNA score",
"Count of mismatches",
"Number of gaps in the alignment",
"Percent identity (0.0-100.0); count each base in a gap in any row as a mismatch",
"Percent identity (0.0-100.0); don't count gaps",
"Percent identity (0.0-100.0); count a gap of any length in any row as a mismatch of length 1",
"Percentage of query sequence aligned to subject (0.0-100.0)",
"Blast-style sum_e",
"Composition-adjustment method from BLAST",
"Percent coverage (0.0-100.0) of high quality region",
"Count of identities",
"Percent identity; count gaps within exons and introns on product",
"Number of splices; 2 x number of introns that have no gap on product",
"Number of splices with consensus splice sequence",
"Percentage of query sequence aligned to subject (0.0-100.0)",
"Percent identity; count gaps within exons only"
}

Definition at line 430 of file Seq_align.cpp.

Referenced by CSeq_align::HelpText().

◆ sc_ScoreNames

const TScoreNamePair sc_ScoreNames[]
static
Initial value:
= {
{ CSeq_align::eScore_BitScore, "bit_score" },
{ CSeq_align::eScore_EValue, "e_value" },
{ CSeq_align::eScore_AlignLength, "align_length" },
{ CSeq_align::eScore_PositiveCount, "num_positives" },
{ CSeq_align::eScore_NegativeCount, "num_negatives" },
{ CSeq_align::eScore_MismatchCount, "num_mismatch" },
{ CSeq_align::eScore_GapCount, "gap_count" },
{ CSeq_align::eScore_PercentIdentity_GapOpeningOnly, "pct_identity_gapopen_only" },
{ CSeq_align::eScore_CompAdjMethod, "comp_adjustment_method" },
{ CSeq_align::eScore_ConsensusSplices, "consensus_splices"},
{ CSeq_align::eScore_ProductCoverage, "product_coverage"},
{ CSeq_align::eScore_ExonIdentity, "exon_identity"}
}
@ eScore_PercentIdentity_GapOpeningOnly
Definition: Seq_align.hpp:165
@ eScore_PercentIdentity_Gapped
Definition: Seq_align.hpp:163
@ eScore_ConsensusSplices
Definition: Seq_align.hpp:183
@ eScore_OverallIdentity
Definition: Seq_align.hpp:181
@ eScore_SumEValue
Definition: Seq_align.hpp:171
@ eScore_AlignLength
Definition: Seq_align.hpp:142
@ eScore_PercentIdentity_Ungapped
Definition: Seq_align.hpp:164
@ eScore_NegativeCount
Definition: Seq_align.hpp:151
@ eScore_ExonIdentity
Definition: Seq_align.hpp:185
@ eScore_PositiveCount
Definition: Seq_align.hpp:148
@ eScore_PercentCoverage
Definition: Seq_align.hpp:168
@ eScore_HighQualityPercentCoverage
Definition: Seq_align.hpp:177
@ eScore_ProductCoverage
Definition: Seq_align.hpp:184
@ eScore_CompAdjMethod
Definition: Seq_align.hpp:174
@ eScore_IdentityCount
Definition: Seq_align.hpp:145
@ eScore_MismatchCount
Definition: Seq_align.hpp:154

Definition at line 404 of file Seq_align.cpp.

Referenced by CSeq_align::GetNamedScore(), CSeq_align::ResetNamedScore(), CSeq_align::ScoreName(), CSeq_align::ScoreNameMap(), and CSeq_align::SetNamedScore().

Modified on Sun Apr 14 05:28:38 2024 by modify_doxy.py rev. 669887