47 size_t q_index,
size_t s_index,
51 bool reversed =
false;
52 if(denseg.IsSetStrands()) {
55 reversed = (q_minus != s_minus);
73 if(q_start >= 0 && s_start >=0 ) {
83 m_QueryIndex(q_index),
84 m_SubjectIndex(s_index)
86 _ASSERT(align.GetSegs().IsDenseg());
87 const CDense_seg& denseg = align.GetSegs().GetDenseg();
90 unique_ptr<SAlignedSeq> aln_seq;
133 const objects::CSeq_align::TScore& scores =
m_SeqAlign->GetScore();
134 ITERATE(objects::CSeq_align::TScore, itS, scores) {
135 const objects::CScore& score = **itS;
138 if(score.GetId().GetStr() == score_name) {
139 const objects::CScore::TValue&
val = score.GetValue();
140 switch(
val.Which()) {
141 case objects::CScore::TValue::e_Real:
return val.GetReal();
break;
142 case objects::CScore::TValue::e_Int:
return val.GetInt();
break;
177 m_QueryStrand(q_strand),
178 m_SubjectStrand(s_strand)
CAlignRange Represents an element of pairwise alignment of two sequences.
EDirection
Row direction flags.
@ eDirect
Use only sequences whose strand is the same as that of the anchor.
@ eReverse
Use only sequences whose strand is opposite to that of the anchor.
CDenseSegHitElement - IHitElement implementation for CDense_seg-based alignments.
virtual TSignedSeqPos GetSubjectStart() const
virtual objects::ENa_strand GetQueryStrand() const
objects::ENa_strand m_SubjectStrand
virtual ~CDenseSegHitElement()
virtual TSeqPos GetQueryLength() const
virtual const IHit & GetHit() const
virtual TSeqPos GetSubjectLength() const
const CDenseSegHit * m_Hit
virtual TSignedSeqPos GetQueryStart() const
virtual objects::ENa_strand GetSubjectStrand() const
objects::ENa_strand m_QueryStrand
Wraps a CSeq_align containing CDense_seg and provides a simple API for interpreting it as a pairwise ...
virtual const objects::CSeq_align * GetSeqAlign() const
static bool HasAlignment(const objects::CDense_seg &denseg, size_t q_index, size_t s_index, TDirection dir)
CDenseSegHit.
CDenseSegHit(const objects::CSeq_align &align, int q_index, int s_index)
virtual TDim GetElemsCount() const
virtual double GetScoreValue(const string &score_name) const
virtual const IHitElement & GetElem(TDim elem_index) const
const objects::CSeq_align * m_SeqAlign
USING_SCOPE(ncbi::objects)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int TSignedSeqPos
Type for signed sequence position.
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TFrom GetFrom(void) const
Get the From member data.
vector< TSignedSeqPos > TStarts
ENa_strand
strand of nucleic acid
range(_Ty, _Ty) -> range< _Ty >
SAlignedSeq * CreateAlignRow(const objects::CSparse_align &align, bool master_first)
Helper functions used by Converters.