82 int idx = (
int)(score / 5);
135 static const string kScoreName =
"Quality score";
141 template <
typename ValType>
145 const vector<ValType>& vec)
147 if (vec.empty())
return;
159 ranges += iter.GetRange();
162 typename vector<ValType>::const_iterator iter_gr = vec.
begin();
174 bool unsigned_char =
false;
175 if (
sizeof(ValType) == 1) unsigned_char =
true;
177 while (iter_gr != vec.end() && pos <
r.GetToOpen()) {
179 val = (
unsigned char)((*iter_gr) *
a +
b);
181 int val_i = (
int)((*iter_gr) *
a +
b);
182 if (val_i > 255)
val = 255;
183 else val = (
unsigned char)val_i;
208 if (graph_iter && graph_iter.
GetSize() == 1) {
213 bool reverse =
false;
218 seq_graph = mapper.
Map(*seq_graph);
227 switch (graph.
Which())
234 std::reverse(values.begin(), values.end());
246 std::reverse(values.begin(), values.end());
258 std::reverse(values.begin(), values.end());
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
void s_AddGraphToMap(CSGAlnQualityScore::TScoreColl &score, const TSeqRange &range, const CSeq_graph &gr, const vector< ValType > &vec)
Seq-loc and seq-align mapper exceptions.
size_t GetSize(void) const
const_iterator begin() const
position_type GetFrom() const
class CRgbaColor provides a simple abstraction for managing colors.
virtual const string & GetScoringMethod() const
virtual IAlnScoreIterator * GetScoreIterator(int row) const
void x_RetrieveQualityMap(IAlnExplorer::TNumrow row, bool remap)
CRef< CAlnInfo > m_AlnInfo
virtual int GetSupportedColorTypes() const
virtual bool IsCacheable() const
static const string & GetScoreName()
virtual bool IsAverageable() const
virtual bool HasScores() const
virtual CRgbaColor GetColorForScore(float score, IScoringMethod::EColorType type) const
virtual void CalculateScores()
CAlignOhterScore.
CRange< TSeqPos > GetSeqRange(TDim row) const
GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin par...
TSeqPos GetSeqStop(TDim row) const
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
TSeqPos GetSeqStart(TDim row) const
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
Seq-loc iterator class – iterates all intervals from a seq-loc in the correct order.
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
void SetFrom(TSeqPos start)
void push_back(const attr_type &attr)
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
CRef< CSeq_loc > GetRangeSeq_loc(TSeqPos start, TSeqPos stop, ENa_strand strand=eNa_strand_unknown) const
Return CSeq_loc referencing the given range and strand on the bioseq If start == 0,...
const CSeq_graph & GetMappedGraph(void) const
Graph mapped to the master sequence.
SAnnotSelector & AddUnnamedAnnots(void)
Add unnamed annots to set of annots names to look for.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsSetComp(void) const
compression (residues/value) Check if a value has been assigned to Comp data member.
bool IsSetB(void) const
display = (a x value) + b Check if a value has been assigned to B data member.
const TInt & GetInt(void) const
Get the variant data.
bool IsSetA(void) const
for scaling values Check if a value has been assigned to A data member.
const TGraph & GetGraph(void) const
Get the Graph member data.
const TValues & GetValues(void) const
Get the Values member data.
TB GetB(void) const
Get the B member data.
const TByte & GetByte(void) const
Get the variant data.
const TReal & GetReal(void) const
Get the variant data.
const TValues & GetValues(void) const
Get the Values member data.
E_Choice Which(void) const
Which variant is currently selected.
const TValues & GetValues(void) const
Get the Values member data.
const TLoc & GetLoc(void) const
Get the Loc member data.
TA GetA(void) const
Get the A member data.
TComp GetComp(void) const
Get the Comp member data.
unsigned int
A callback function used to compare two keys in a database.
range(_Ty, _Ty) -> range< _Ty >
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)