54 const CObject& obj = *iter->object;
55 const type_info&
type =
typeid(obj);
76 int num_rows = (*aix)->CheckNumRows();
77 int total = prev_total + num_rows -1;
298 return *iter->second;
339 sum->m_SStop = align.
GetSeqStop(seqrow+1) + 1;
349 double coverage = 0.0;
351 double identity = 0.0;
353 size_t gap_bases = 0;
361 if (align_length < 1000000) {
369 identity = identities * 100.0 / align_length;
383 sum->m_PctCoverage = coverage;
384 sum->m_PctIdentity = identity;
385 sum->m_Mismatches = mismatches;
387 sum->m_GappedBases = gap_bases;
393 sum->m_Score = score;
398 double e_value = 0.0;
400 sum->m_EValue = e_value;
405 sequence::CDeflineGenerator
gen;
408 sum->m_QDefline =
gen.GenerateDefline(bsh);
410 sum->m_QDefline = sum->m_Query;
414 sum->m_SDefline =
gen.GenerateDefline(bsh);
416 sum->m_SDefline = sum->m_Subject;
435 return "Both reverse";
TSeqPos GetAlignLength(const CSeq_align &align, bool ungapped=false)
Compute the length of the alignment (= length of all segments, gaps + aligned)
int GetGapCount(const CSeq_align &align)
Compute the number of gaps in the alignment.
double GetPercentCoverage(CScope &scope, const CSeq_align &align, unsigned query=0)
Compute percent coverage of the query (sequence 0) (range 0-100)
int GetMismatchCount(CScope &scope, const CSeq_align &align)
Compute the number of mismatches in the alignment.
int GetGapBaseCount(const CSeq_align &align)
Compute the number of gap bases in the alignment (= length of all gap segments)
TSeqPos GetSeqStop(TDim row) const
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
bool GetNamedScore(const string &id, int &score) const
Get score.
TSeqPos GetSeqStart(TDim row) const
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
objects::ENa_strand m_QStrand
objects::ENa_strand m_SStrand
virtual long GetIntValue(size_t row, size_t col) const
virtual ColumnType GetColumnType(size_t col) const
virtual string GetColumnLabel(size_t col) const
virtual double GetRealValue(size_t row, size_t col) const
virtual SConstScopedObject GetObjectValue(size_t row, size_t col) const
virtual size_t GetRowsCount() const
CRef< objects::CScope > m_Scope
CTableDataAlnSummary(TConstScopedObjects &objects)
vector< CConstRef< objects::CSeq_align > > m_Aligns
virtual SConstScopedObject GetRowObject(size_t row) const
const CAlnSummary & x_GetAlnSummary(size_t row) const
virtual void GetStringValue(size_t row, size_t col, string &value) const
TAlnSummary m_CachedSummary
virtual size_t GetColsCount() const
string x_StrandToStr(objects::ENa_strand strand) const
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
API (CDeflineGenerator) for computing sequences' titles ("definitions").
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
vector< SConstScopedObject > TConstScopedObjects
CConstRef< CSeq_id > GetSeqId(void) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
const Tdata & Get(void) const
Get the member data.
ENa_strand
strand of nucleic acid
@ eNa_strand_both_rev
in reverse orientation
@ eNa_strand_both
in forward orientation
list< CRef< CSeq_align > > TAlign
const TAlign & GetAlign(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const GenericPointer< typename T::ValueType > T2 value
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
#define row(bind, expected)
static const string s_ColNames[CTableDataAlnSummary::eMaxColNum]
static ITableData::ColumnType s_ColTypes[CTableDataAlnSummary::eMaxColNum]