, m_SeqAlign(&mapped_align)
84, m_OrigSeqAlign(orig_align)
85, m_OrigAnchor(orig_anchor)
86, m_ShowScore(
false)
87, m_DisableTooltipsCaching(
false)
125CreateObjectInterface<IGuiObjectInfo>(scoped_obj,
NULL));
127 if( !gui_info )
return;
143gui_info->GetToolTip(tt, t_title, at_p);
144gui_info->GetLinks(tt,
false);
148tt.
AddRow(
"Last displayed alignment");
149tt.
AddRow(
"Alignment rows truncated for 'Adaptive' display");
150tt.
AddRow(
"To see all alignments select 'Show All'");
168p_areas->push_back(area);
250 if(
ctx.seq_range.Empty())
265 for(
int row= 0;
row< row_num; ++
row) {
266 if(
row== anchor) {
269unique_ptr<IAlnSegmentIterator> p_it(
283 ctx.base_width_anchor;
286 ctx.base_width_anchor;
287 if(curr_seq_from > curr_seq_to) {
288 swap(curr_seq_from, curr_seq_to);
290curr_seq_to += 1.0 /
ctx.base_width_anchor;
292 if(gap_size > 1.5) {
324 if(
ctx.seq_range.Empty())
341 for(
int row= 0;
row< row_num; ++
row) {
342 if(
row== anchor) {
345unique_ptr<IAlnSegmentIterator> p_it(
349 intlast_aligned_seg_to_anchor = -2;
350 intlast_aligned_seg_to_curr = -2;
351 intlast_aligned_seg_from_anchor = -2;
352 intlast_aligned_seg_from_curr = -2;
354 intlast_large_ins = -100000;
356 intseg_iter_dir = 0;
366 if(seg_iter_dir == 0) {
371 if(last_aligned_seg_to_anchor < 0) {
373last_aligned_seg_to_anchor = anchor_to;
374last_aligned_seg_from_anchor = anchor_from;
378 if(anchor_to < last_aligned_seg_to_anchor || anchor_from < last_aligned_seg_to_anchor) {
386 if(seg_iter_dir == -1) {
389 if((
int)t_pos == last_aligned_seg_from_anchor - 1) {
390start = t_pos /
ctx.base_width_anchor;
391 if(
ctx.reverse_strand) {
394ins_len = last_aligned_seg_from_curr - seg.
GetRange().
GetTo();
398last_aligned_seg_to_anchor = t_pos;
401}
else if(seg_iter_dir == 1) {
404 if((
int)f_pos == last_aligned_seg_to_anchor + 1) {
405start = f_pos /
ctx.base_width_anchor;
406 if(
ctx.reverse_strand) {
407ins_len = last_aligned_seg_from_curr - seg.
GetRange().
GetTo();
413last_aligned_seg_from_anchor = f_pos;
427start /=
ctx.base_width_anchor;
430last_aligned_seg_to_anchor = -2;
431last_aligned_seg_from_anchor = -2;
433 if(ins_len <= 0)
continue;
439ins_len_pix /=
ctx.base_width_anchor;
446}
else if(ins_len_pix > 2.0) {
448last_large_ins = (
int)start;
450 if(ins_len_pix < 0.1f)
461start + size_in_model,
ctx.yy - over,
462start - size_in_model,
ctx.yy - over);
464start - size_in_model,
ctx.yy +
ctx.bar_h + over,
465start + size_in_model,
ctx.yy +
ctx.bar_h + over);
481 sort(unaligned_regions.begin(), unaligned_regions.end(),
484return a.GetFrom() < b.GetFrom();
493 if(unaligned_regions.empty()) {
497 for(
const auto& unaligned_rng : unaligned_regions) {
499ln_start = unaligned_rng.GetToOpen();
507 if(
ctx.seq_range.Empty())
526 if(aln_range.
GetFrom() > 0) {
530 for(
int row= 0;
row< row_num; ++
row) {
531 if(
row== anchor) {
535unique_ptr<IAlnSegmentIterator> p_it(
552 ctx.base_width_anchor;
555 ctx.base_width_anchor;
556 if(curr_seq_from > curr_seq_to) {
557 swap(curr_seq_from, curr_seq_to);
559 TSeqRangecurr_seq(curr_seq_from, curr_seq_to - 1);
565 if(visible_range.
Empty())
568unaligned_regions.emplace_back(visible_range.
GetFrom() + 1, visible_range.
GetTo() + 1);
573 if(h_text >
ctx.bar_h) {
580sLabelTextOut +=
" bp unaligned";
585 intlabelsCount =
round(visible_range.
GetLength() / seg_width);
587 if((label_width + label_width*0.5) >= visible_range.
GetLength()) {
600xLF = visible_range.
GetFrom();
601 for(
int i= 0;
i< labelsCount; ++
i) {
602xM = visible_range.
GetFrom() + part_size / 2.0 +
i*part_size;
603xLT = visible_range.
GetFrom() + part_size / 2.0 +
i*part_size - half_label;
605 m_Context->
TextOut(&l_font, sLabelTextOut.c_str(), xM, yM,
true,
true);
606xLF = visible_range.
GetFrom() + part_size / 2.0 +
i*part_size + half_label;
618 if(
ctx.bar_h <= 2)
635 if(tail_5 >
ctx.tail_5)
636tail_5 -=
ctx.tail_5;
639 if(tail_3 >
ctx.tail_3)
640tail_3 -=
ctx.tail_3;
663 if(h_text <
ctx.bar_h) {
687 if(h_text <
ctx.bar_h) {
697 if(
ctx.tail_5 > 0) {
700 if(
ctx.tail_3 > 0) {
706 if((tail_5 >
ctx.tail_5) || (tail_3 >
ctx.tail_3))
723 if(!visible_range.
Empty()) {
738 intaligned_seq = anchor == 0 ? 1 : 0;
742 TSeqRangevisible_unaligned_range(range);
745 if(inrc.
Empty()) {
761 boolab = mhndl.
IsAa();
762 boolrb = hndl.
IsAa();
775 if(
ctx.reverse_strand) {
799 stringtranslated_seq;
802translated_seq = seq;
823 for(
TSeqPosbp = 0; bp < seq.size(); bp++) {
827pos = sStart + bp + addon;
830pos = sStart + bp * 3 + addon + 1;
852 if(
ctx.seq_range.Empty())
870 if( !splice5.empty() && !splice3.empty() &&
884pre_stop = neg_genomic ?
891 if(
ctx.seq_range.Empty())
894 if(
ctx.override_color)
895c =
ctx.read_status_color;
906 if(
ctx.override_color)
919 TModelUnitxM = (
ctx.whole_range.GetFrom() +
ctx.whole_range.GetTo()) * 0.5;
936 doubleidentity = 100.0;
939 intidentities = (
int)align_length;
944identity = identities * 100 / align_length;
947 if(identity > 0.6) {
948identity = 1.75 * identity - 0.75;
955 if(
ctx.override_color)
978 if(aligned_seq < 0) {
985 ctx.f /=
ctx.base_width_anchor;
987 ctx.t /=
ctx.base_width_anchor;
994 ctx.whole_range =
ctx.seq_range;
996 if(
ctx.seq_range.Empty()) {
998<<
"CAlignGlyph::DrawPWAlignElem: zero alignment range!");
1012 ctx.override_color =
false;
1016 ctx.half =
ctx.bar_h * 0.5;
1034 if(aln_r_s > aln_r_e) {
1035 swap(aln_r_s, aln_r_e);
1048 if(show_unaligned_tails) {
1051show_unaligned_tails =
false;
1062 if(
ctx.reverse_strand) {
1077 if(
ctx.reverse_strand && !(show_unaligned_tails &&
ctx.tail_5)) {
1079 ctx.f - over2,
ctx.yy - 1,
ctx.f - over2,
ctx.yy +
ctx.bar_h + 1);
1081 else if(!(show_unaligned_tails &&
ctx.tail_3)) {
1083 ctx.t + 1 + over2,
ctx.yy - 1,
ctx.t + 1 + over2,
ctx.yy +
ctx.bar_h + 1);
1098 for(
int row= 0;
row< row_num; ++
row) {
1099 if(
row== anchor) {
1102 if(
m_Score->IsAverageable()) {
1104 ctx.override_color,
ctx.read_status_color);
1107 ctx.override_color,
ctx.read_status_color);
1119 if(show_unaligned_tails) {
1161 if(
ctx.tail_5 > 0) {
1169 if(
ctx.tail_3 > 0) {
1194*title =
"[Alignment] "+
1211 if(title->length() > 20 && title->find(
"\\panfs\\") != string::npos) {
1212 size_tpos = title->find_last_of(
"\\");
1213 if(pos != string::npos) {
1214*title = title->substr(pos + 1);
1215 if(title->length() > 20) {
1216pos = title->rfind(
'.');
1217 if(pos != string::npos && pos > 0) {
1218pos = title->rfind(
'.', pos - 1);
1219 if(pos != string::npos) {
1220*title = title->substr(pos + 1);
1245gl.
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1314tail_len =
x_GetTailWidth(tail_5, visible_tail_5, base_width_curr);
1320tail_len =
x_GetTailWidth(tail_3, visible_tail_3, base_width_curr);
1343 if( !reverse_strand ) {
1349 if(
row== anchor) {
1360max_label_w =
max(max_label_w, label_w);
1394 if(max_label_width_px > 0.0) {
1397 if(label_width_px > max_label_width_px) {
1398label_width_px = max_label_width_px;
1400 if((string::npos !=
label.find(
"...")) && (
label.length() <= 5))
1409 if(reverse_strand) {
1410xM = inrc.
GetTo() - t_w;
1414inrc.
GetTo(), yM - label_h - 1.0), 0);
1421xM + t_w, yM - label_h - 1.0), 0);
1446 if(anchor_range.
Empty()) {
1448<<
"CAlignGlyph::x_DrawMultiAlign: zero alignment range!");
1454 if(anchor_range.
Empty()) {
1460 booloverride_color =
false;
1468 if(aln_r_s > aln_r_e) {
1469 swap(aln_r_s, aln_r_e);
1481 if(
row== anchor) {
1487 boolreverse_strand =
1502 if(
m_Score->IsAverageable()) {
1504override_color, read_status_color);
1507override_color, read_status_color);
1511gl.
Color4f(1.0f, 0.0f, 0.0f, 1.0f);
1526start /= base_width_anchor;
1554start /= base_width_anchor;
1582 LOG_POST(
Warning<<
"Can't show alignment sequence due to an error: " 1594 charstrandLabel[2] = {
'>',
'\0'};
1597strandLabel[0] = reverse_strand ?
'>':
'<';
1600strandLabel[0] = reverse_strand ?
'<':
'>';
1605strandLabel[0] = reverse_strand ?
'<':
'>';
1608strandLabel[0] = reverse_strand ?
'>':
'<';
1648 if(label_w > max_label_width_px) {
1649label_w = max_label_width_px;
1660xM + label_w, y - gl.
TextHeight(&l_font) - 1.0), 0);
1690 if(anchor_range.
Empty()) {
1704 if(aln_r_s > aln_r_e) {
1705 swap(aln_r_s, aln_r_e);
1709 if(aln_range.
GetFrom() > 2) {
1718unique_ptr<IAlnSegmentIterator> p_it(
1722 boolab = mhndl.
IsAa();
1723 boolrb = hndl.
IsAa();
1754 TSeqPosframe_shift_f = start % base_width_curr;
1755 TSeqPosframe_shift_t = 2 - stop % base_width_curr;
1756 if(base_width_anchor == 3) {
1757frame_shift_f = sStart % base_width_anchor;
1758frame_shift_t = 2 - sStop % base_width_anchor;
1760 if(sStart > sStop) {
1761 swap(sStart, sStop);
1762 swap(frame_shift_f, frame_shift_t);
1764stop /= base_width_curr;
1765start /= base_width_curr;
1766sStart /= base_width_anchor;
1767sStop /= base_width_anchor;
1777sStop += frame_shift_t;
1778sStart -= frame_shift_f;
1781stop += frame_shift_t;
1782start -= frame_shift_f;
1790 stringseq, mseq, tmp_seq, visible_seq;
1791s_vec.
GetSeqData(start, stop + 1, tmp_seq);
1792ms_vec.
GetSeqData(sStart, sStop + 1, mseq);
1793visible_seq = tmp_seq;
1795 if(reverse_strand) {
1817 swap(seq, tmp_seq);
1819 stringtranslated_seq;
1823 stringseq_candidate = mseq;
1824 if(reverse_strand) {
1830 if(reverse_strand) {
1833translated_seq = tmp_seq;
1840 r.SetFrom(
r.GetFrom() - frame_shift_f);
1841 r.SetTo(
r.GetTo() + frame_shift_t);
1858 TSeqPosstart_base = frame_shift_f % base_width_anchor;
1859 TSeqPosstop_base =
min(stop - start + 1 - frame_shift_t % base_width_anchor,
1863 for(
TSeqPosbp = start_base; bp < stop_base; bp++) {
1868pos = sStart + bp + addon;
1869 match= bp < seq.size() && bp < mseq.size()
1870&& seq[bp] == mseq[bp];
1873pos = sStart + bp * 3 + addon + 1;
1874 match= bp < seq.size() && bp < translated_seq.size()
1875&& seq[bp] == translated_seq[bp];
1879 intbp_pos = bp / 3;
1880 match= bp_pos < seq.size() && bp_pos < translated_seq.size()
1881&& mseq[bp_pos] == translated_seq[bp_pos];
1887 if(pos < (seg_start - 0.5))
1889 if(pos > (seg_stop + 1))
1905unique_ptr<IAlnScoreIterator> score_iter(
m_Score->GetScoreIterator(
row));
1906score_iter->MoveTo(bp);
1918bases[0] = visible_seq[bp];
1921pos, center_y + fs * 0.5,
false);
1933 "Alignment rows truncated for 'Adaptive' display - select 'Show All' to see more" 1934:
"The number of alignment rows exceeds the supported limit";
1936 "Select 'Show All' to see all alignments" 1937:
"Number of rows exceeds limit";
1938 const char* char_msg =
"X";
1949 if(width > long_msg_width) {
1951msg_width = long_msg_width;
1953 else if(width > short_msg_width) {
1955msg_width = short_msg_width;
1957 else if(width > char_msg_width) {
1959msg_width = char_msg_width;
1964 TModelUnitmsg_spacing = char_msg_width * 4.0;
1968 if(width < msg_width + msg_spacing*2.0) {
1983vector<TModelPoint> pts;
1984 boolbottom_y =
true;
1986 while(pos <
GetLeft() + seq_w - seq_char_width) {
1988pts.push_back(
TModelPoint(pos, center_y + fs * 0.5));
1990pts.push_back(
TModelPoint(pos, center_y - fs * 0.5));
1992bottom_y = !bottom_y;
1993pos += seq_char_width;
2000 while(pos >
GetRight() - (seq_w - seq_char_width)) {
2002pts.push_back(
TModelPoint(pos, center_y + fs * 0.5));
2004pts.push_back(
TModelPoint(pos, center_y - fs * 0.5));
2006bottom_y = !bottom_y;
2007pos -= seq_char_width;
2036 floatfraction,
bool)
2051 booloverride_color,
2066TR rasterizer(scoreStart, scoreEnd, fromM, toM);
2067 SScPixpix = { 0.0f, 0.0f,
false};
2069unique_ptr<IAlnScoreIterator> score_iter(
m_Score->GetScoreIterator(
row));
2075 while(aln_seg_it && it) {
2084 while(it && start1 > stop2) {
2087stop2 = it.
GetTo();
2090 if(start1 > stop2) {
2095from = std::max<int>(start1, start2);
2096to = std::min<int>(stop1, stop2);
2099act_from /= base_width_anchor;
2101act_to /= base_width_anchor;
2102 if(act_from > act_to) {
2103 swap(act_from, act_to);
2106 if(act_from <= act_to) {
2109rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,
FSetPixMaxCoverage);
2122 constTR::TRaster& raster = rasterizer.GetRaster();
2123 static floateps = 0.0001f;
2124 doubleshift_x = scoreStart;
2128 for(
size_t i= 0;
i< raster.size(); ) {
2129 doublestart =
i+ shift_x;
2130 const SScPix& sc_pix = raster[
i];
2131 while(++
i< raster.size() && raster[
i] == sc_pix);
2137 color= read_status_color;
2149 intoff_y = sc_pix.
m_Gap? GapOffset : 0;
2151 doublex2 =
i+ shift_x;
2153gl.
Begin(GL_LINES);
2155gl.
Vertex2d(start, yy + height - off_y);
2158gl.
Rectd(start, yy + off_y, x2, yy + height - off_y);
2193 static const floateps = 0.00001f;
2219 booloverride_color,
2222 if(seq_range.
Empty())
2237TR rasterizer(scoreStart, scoreEnd, fromM, toM);
2239unique_ptr<IAlnScoreIterator> score_it(
m_Score->GetScoreIterator(
row));
2245 while(aln_seg_it && it) {
2254 while(it && start1 > stop2) {
2258stop2 = it.
GetTo();
2262 if(start1 > stop2) {
2267from = std::max<int>(start1, start2);
2268to = std::min<int>(stop1, stop2);
2270 SScPix2pix = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
false};
2272act_from /= base_width_anchor;
2274act_to /= base_width_anchor;
2275 if(act_from > act_to) {
2276 swap(act_from, act_to);
2278 if(act_from <= act_to && act_from <=toM) {
2286rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,
FSetPix2);
2291 int len= (act_to - act_from) + 1;
2295rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,
FSetPix2);
2312 constTR::TRaster& raster = rasterizer.GetRaster();
2316 doubleshift_x = scoreStart;
2317 static const floateps = 0.001f;
2318 floatvalue_scale = value_limits.
GetTo() - value_limits.
GetFrom();
2319 if(value_scale <= 0)
2323 for(
size_t i= 0;
i< raster.size(); ) {
2324 doublestart =
i+ shift_x;
2325 const SScPix2& sc_pix = raster[
i];
2326 while(++
i< raster.size() && raster[
i] == sc_pix);
2333 color= override_color ?
2336sc =
min(1.0f, ((sc - value_limits.
GetFrom()) / value_scale));
2339 floatalpha = 1.0f - sc * 0.75f;
2346 floatalpha =
min(1.0f, 0.25f + sc_pix.
m_GapLen* 0.75f);
2353 doublex2 =
i+ shift_x;
2355gl.
Begin(GL_LINES);
2362gl.
Rectd(start, yy, x2, yy + height);
2371gl.
Begin(GL_LINES);
2398<<
"CAlignGlyph::x_CalcIntervals: zero alignment range!");
2413intervals.push_back(
r);
2420 if(aln_r_s > aln_r_e) {
2421 swap(aln_r_s, aln_r_e);
2425 int row= target_row;
2427 row=
max(0, 1 - anchor);
2440 if(aln_r.
Empty())
2443start /= base_width_anchor;
2445stop /= base_width_anchor;
2449 if(!intervals.empty()) {
2452intervals.back().SetTo(stop);
2457intervals.push_back(
TSeqRange(start, stop) );
2463 boolshown =
false;
2510 if(
ctx.reverse_strand) {
2513start *=
ctx.base_width_anchor;
2514start += aln_stop + 1;
2516end *=
ctx.base_width_anchor;
2517end += aln_stop + 1;
2522start *=
ctx.base_width_anchor;
2523start = aln_start - start;
2525end *=
ctx.base_width_anchor;
2526end = aln_start - end;
2533start *=
ctx.base_width_anchor;
2536end *=
ctx.base_width_anchor;
2542start *=
ctx.base_width_anchor;
2545end *=
ctx.base_width_anchor;
2573tail_len_pix += label_space_pix;
2580 if(tail_label_len > 0) {
2587tail_len = visible_tail*base_width_curr;
2588 if(visible_tail < tail) {
2592 if(tail_label_len > 0) {
2623override_color =
false;
2628 if((*iter)->GetType().IsStr() &&
2629(*iter)->GetType().GetStr() ==
"PCR duplicate") {
2630override_color =
true;
2633 if((*iter)->GetType().IsStr() &&
2634(*iter)->GetType().GetStr() ==
"Poor sequence quality") {
2635override_color =
true;
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
double CompressLength(double len)
static void FSetPixMaxCoverage(SScPix &dst, const SScPix &src, float fraction, bool)
a pixel with the Max coverage (fraction) overrides all attributes
static const int kCompactLabelSpace_h
static const TSeqPos kTailGlyphLen
static float kMinSegDistance
static const int kLabelSpace_v
static const int kAlignRowSpace
static void FSetPix2(SScPix2 &dst, const SScPix2 &src, float fraction, bool long_seg)
accumulate weighted scores
static const TSeqPos kCompactTailGlyphLen
static const int kLabelSpace_h
static const TModelUnit kPWAlignPackLevel
ELabelPosition m_LabelPos
@ eNormal
no compact mode
@ eExtremeCompact
extreme compact mode
CGlTextureFont m_LabelFont
ECompactMode m_CompactMode
Alignment layout compact mode.
CRgbaColor m_UnalignedSequence
bool m_ShowIdenticalBases
bool m_ShowUnalignedTailsForTrans2GenomicAln
CRgbaColor m_NonConsensus
EUnalignedTailsMode m_UnalignedTailsMode
@ ePos_Above
above the rendered bar
@ ePos_Side
always on 5' side
CGlAttrGuard - guard class for restoring OpenGL attributes.
@ fNoCaching
The tooltip for this feature should not be cached.
int m_Flags
area flags, will need to replace m_Type
bool m_PositiveStrand
the default is true
static string GetAlignSignature(const objects::CSeq_align &align, const objects::CSeq_loc &on_loc, objects::CScope *scope, const objects::CSeq_annot_Handle &annot_handle)
bool IsHorizontal() const
void TextOut(const CGlTextureFont *font, const char *text, TModelUnit x, TModelUnit y, bool center, bool adjust_flip=true) const
void DrawTriangle(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2, TModelUnit x3, TModelUnit y3, bool border=false) const
CGlPane * GetGlPane()
inline method implementations
TModelRange IntersectVisible(const CSeqGlyph *obj) const
TVPUnit SeqToScreenX(const TModelUnit &size) const
void DrawLineStrip(const vector< TModelPoint > &points) const
void DrawUnalignedTail(TModelUnit x1, TModelUnit x2, TModelUnit y1, TModelUnit y2, bool is_polya, const CRgbaColor &color) const
void DrawLine(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2) const
void DrawStippledLine(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2, int factor=2, unsigned short pattern=0xAAAA) const
objects::CScope & GetScope()
void DrawQuad(const TModelRect &rc, bool border=false) const
const TModelUnit & GetScale() const
void DrawSelection(const TModelRect &rc) const
TModelUnit SeqToScreen(const TModelUnit &size) const
convert from sequence positions to screen pixels
TModelUnit SeqToScreenXInModelUnit(const TModelUnit &size) const
TModelUnit ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
bool IsOverviewMode() const
bool IsFlippedStrand() const
bool WillSeqLetterFit() const
is it enougth space to sequence letters.
void DrawDisk2(const TModelPoint &p, TModelUnit size, CRgbaColor color)
const CRgbaColor & GetSelLabelColor() const
void DrawLine_NoAA(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2) const
TSeqPos GetViewWidth() const
bool WillLabelFit(const TModelRect &rc) const
void Draw3DQuad(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2, const CRgbaColor &color, bool border=false) const
void DrawBackground(const TModelRect &rcm, TModelUnit border) const
void DrawGreaterLessSign(TModelUnit x1, TModelUnit x2, TModelUnit bar_h, bool negative) const
class CRgbaColor provides a simple abstraction for managing colors.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
void x_InitHTMLActiveArea(CHTMLActiveArea &area) const
initialize the basic information for a given active area.
CRenderingContext * m_Context
the rendering context
virtual void SetHeight(TModelUnit h)
virtual TModelUnit GetRight() const
virtual void SetWidth(TModelUnit w)
virtual void SetLeft(TModelUnit l)
virtual TModelUnit GetTop() const
virtual TModelUnit GetHeight() const
virtual bool LessBySeqPos(const CSeqGlyph &obj) const
compare this object to another based on glyph sequence position.
float GetFadeFactor() const
size_t GetTearline() const
size_t GetVisible() const
virtual TModelUnit GetWidth() const
virtual TModelUnit GetLeft() const
TModelRect GetModelRect() const
get the bounding box.
vector< CHTMLActiveArea > TAreaVector
virtual TModelUnit GetBottom() const
static SIZE_TYPE Reverse(const string &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst)
static SIZE_TYPE ReverseComplement(const string &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst)
static SIZE_TYPE Complement(const string &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst)
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
@ eRight
Towards higher aln coord (always to the right)
@ eLeft
Towards lower aln coord (always to the left)
@ eBackwards
Towards lower seq coord (to the left if plus strand, right if minus)
@ eForward
Towards higher seq coord (to the right if plus strand, left if minus)
virtual EPolyATail HasPolyATail() const =0
Check if there is any unaligned polyA tail.
pair< ECigarOp, size_t > TCigarPair
virtual void GetUnalignedTails(TSignedSeqPos &start_tail, TSignedSeqPos &end_tail, bool clipped=true) const
virtual const TCigarPair * GetCigarAtAlnPos(int row, TSignedSeqPos pos) const
virtual bool IsRegular() const
virtual bool IsNegativeStrand(TNumrow row) const =0
int GetPartialFlags() const
virtual const objects::CBioseq_Handle & GetBioseqHandle(IAlnExplorer::TNumrow row) const =0
virtual TSeqRange GetAlnRangeWithTails() const
IAlnExplorer::TNumrow TNumrow
virtual TSeqPos GetSeqStart(TNumrow row) const =0
virtual const objects::CSeq_id & GetSeqId(TNumrow row) const =0
int GetGenCode(IAlnExplorer::TNumrow row) const
virtual TSignedRange GetSeqAlnRange(TNumrow row) const =0
virtual IAlnExplorer::TNumrow GetQuery() const
virtual TSeqPos GetSeqStop(TNumrow row) const =0
virtual TSignedSeqPos GetAlnPosFromSeqPos(TNumrow row, TSeqPos seq_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const =0
virtual TSeqPos GetFrom() const =0
virtual float GetAttr() const =0
virtual TSeqPos GetTo() const =0
Alignment segment iterator interface.
@ eAllSegments
Iterate all segments.
@ eSkipGaps
Skip gap segments (show only aligned ranges)
Alignment segment interface.
virtual const TSignedRange & GetRange(void) const =0
Get the selected row range.
@ fAligned
Aligned segment.
@ fIndel
Either anchor or the selected row is not present in the segment.
@ fUnaligned
The range on the selected sequence does not participate in the alignment (the alignment range of the ...
virtual TSegTypeFlags GetType(void) const =0
Get current segment type.
bool IsAligned(void) const
bool IsGap(void) const
Check if there's a gap on the selected row.
virtual const TSignedRange & GetAlnRange(void) const =0
Get alignment range for the segment.
vector< TSeqRange > TIntervals
virtual TSeqPos GetBaseWidth(IAlnExplorer::TNumrow) const =0
virtual string & GetAlnSeqString(IAlnExplorer::TNumrow row, string &buffer, const IAlnExplorer::TSignedRange &aln_range) const =0
virtual IAlnExplorer::TNumrow GetNumRows() const =0
virtual IAlnExplorer::TNumrow GetAnchor() const =0
virtual IAlnSegmentIterator * CreateSegmentIterator(IAlnExplorer::TNumrow, const IAlnExplorer::TSignedRange &, IAlnSegmentIterator::EFlags) const =0
virtual TSignedSeqPos GetSeqPosFromAlnPos(IAlnExplorer::TNumrow for_row, TSeqPos aln_pos, IAlnExplorer::ESearchDirection dir=IAlnExplorer::eNone, bool try_reverse_dir=true) const =0
bool IsConsensusSplice(const string &splice5, const string &splice3)
Consensus splice is GY..AG or AT..AC.
Include a standard set of the NCBI C++ Toolkit most basic headers.
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.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
void Warning(CExceptionArgs_Base &args)
bool IsSimplified() const
void x_DrawInserts(const SDrawContext &ctx) const
virtual void x_Draw() const
The default renderer for this layout object.
virtual bool NeedTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Check if need to show tooltip.
void x_CalcIntervals(TIntervals &intervals, int target_row=-1) const
void x_DrawStrandIndicators(const SDrawContext &ctx) const
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
virtual bool HasObject(CConstRef< CObject > obj) const
check if the wrapped object(s) is the one.
virtual bool LessBySeqPos(const CSeqGlyph &obj) const
compare this object to another based on glyph sequence position.
vector< TModelRange > TMUnitRanges
void x_RenderAveragableScores(TModelUnit yy, TSignedSeqRange aln_range, TSeqRange seq_range, TModelUnit height, int row, bool override_color, const CRgbaColor &read_status_color) const
void x_DrawMultiAlignLabel(int row, TModelUnit y) const
void x_DrawUnalignedBar(const ETail tail, const SDrawContext &ctx, const CRgbaColor &c_fg) const
CAlignGlyph(CConstRef< IAlnGraphicDataSource > aln_mgr, const objects::CSeq_align_Handle &orig_align, const objects::CSeq_align &mapped_align, int orig_anchor)
virtual CConstRef< CObject > GetObject(TSeqPos pos) const
access our core component - we wrap an object(s) of some sort.
TSeqRange x_ConvertAlnTaillRngToSeqRng(const ETail tail, const SDrawContext &ctx, const TSeqRange &aln_range) const
virtual void GetObjects(vector< CConstRef< CObject > > &objs) const
retrieve CObjects corresponding to this CSeqGlyph.
void x_DrawMultiAlign() const
void x_GetOverrideColor(bool &override_color, CRgbaColor &read_status_color) const
TModelUnit x_GetTailLabelWidth(const TSignedSeqPos tail) const
TIntervals m_Intervals
intervals.
virtual string GetSignature() const
return signature for this glyph.
void GetTitle(string *title, CLabel::ELabelType type) const
void x_DrawNonConsensusSpliceSites(const SDrawContext &ctx) const
void x_RenderNonAveragableScores(TModelUnit yy, TSignedSeqRange aln_range, TSeqRange seq_range, TModelUnit height, int row, bool override_color, const CRgbaColor &read_status_color) const
void x_DrawNoScoreAlign(const SDrawContext &ctx, const CRgbaColor &c_fg) const
void DrawPWAlignElem(const TModelRect &rcm, bool selected, bool show_label, const CRgbaColor &c_fg, const CRgbaColor &c_seq, const CRgbaColor &c_mis) const
virtual TSeqRange GetRange(void) const
get the total range of this object.
const IAlnGraphicDataSource & GetAlignMgr(void) const
Inline methods.
void x_DrawIntronsAndInternalUnalignedRegions(const SDrawContext &ctx, TSignedSeqPos from, TSignedSeqPos to) const
void x_DrawGaps(const SDrawContext &ctx) const
virtual void GetTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
CConstRef< CAlignmentConfig > m_Config
const objects::CSeq_align_Handle & GetOrigAlignment(void) const
virtual bool IsClickable() const
Query if this glyph is clickable.
void x_DrawUnalignedRowSequence(const ETail tail, const SDrawContext &ctx, const CRgbaColor &c_fg) const
virtual const objects::CSeq_loc & GetLocation(void) const
access the position of this object.
void x_DrawInternalUnalignedRegions(const SDrawContext &ctx, TMUnitRanges &unaligned_regions) const
CRef< objects::CSeq_loc > m_Location
static bool IsVDBAccession(const string &acc)
Check if string starts with ("SRA", "SRR", "DRR", "ERR")
TModelUnit GetBarHeight() const
TModelUnit x_GetTailWidth(const TSignedSeqPos tail, const TSignedSeqPos visible_tail, const TSignedSeqPos base_width_curr) const
virtual const TIntervals & GetIntervals(void) const
access sub-intervals (if any).
void x_DrawAlignRowSequence(TModelUnit center_y, int row, const CRgbaColor &c_fg, const CRgbaColor &c_seq, const CRgbaColor &c_mis) const
TSeqRange x_GetAlnTailRange(const ETail tail, const SDrawContext &ctx) const
void x_DrawSimplified(const SDrawContext &ctx, const CRgbaColor &c_fg) const
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
CConstRef< IAlnGraphicDataSource > m_AlnMgr
pointer to the actual alignment information.
bool x_ShowUnalignedTails(TModelUnit align_len) const
bool m_DisableTooltipsCaching
Indicates whether the front-end can cache the tooltips.
void x_DrawTailSequences(const SDrawContext &ctx, const CRgbaColor &c_fg) const
void x_DrawPWAlign() const
const objects::CSeq_align & GetAlignment(void) const
CConstRef< objects::CSeq_align > m_SeqAlign
CConstIRef< ISGAlnScore > m_Score
objects::CSeq_align_Handle m_OrigSeqAlign
int m_OrigAnchor
The anchor row number in original Seq-algin, not alnmgr.
void x_DrawTailGlyphs(const SDrawContext &ctx, bool show_label, const CRgbaColor &c_fg) const
virtual void Scalef(GLfloat x, GLfloat y, GLfloat z)=0
virtual void Enable(GLenum glstate)=0
virtual void Begin(GLenum mode)=0
Start rendering.
virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0
Options to be used when GL_BLEND is enabled.
void Color3f(GLfloat r, GLfloat g, GLfloat b)
IRender & GetGl()
convenience function for getting current render manager
void Vertex2d(GLdouble x, GLdouble y)
TVPRect & GetViewport(void)
virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0
virtual TModelUnit TextWidth(const CGlTextureFont *font, const char *text) const =0
void Color4d(GLdouble r, GLdouble g, GLdouble b, GLdouble a)
virtual void PopMatrix()=0
virtual void End()=0
Finish rendering (create buffer and send to renderer)
virtual void PolygonMode(GLenum face, GLenum mode)=0
Set the polygon rasterization mode.
void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
TModelRect & GetVisibleRect(void)
CGlRect< TModelUnit > TModelRect
virtual void Disable(GLenum glstate)=0
glDisable()
virtual void LineWidth(GLfloat w)=0
Set line width for drawing: glLineWidth()
TModelUnit GetScaleY(void) const
CGlPoint< TModelUnit > TModelPoint
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
void Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
virtual void PushMatrix()=0
string Truncate(const char *text, TModelUnit w, ETruncate trunc=eTruncate_Ellipsis) const
Truncate text to the secified width.
void SetDataSource(const CConstRef< IAlnGraphicDataSource > &data_source)
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
void SetAnchorRow(int anchor)
void SetFlippedStrands(bool flipped=true)
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
void Set(float r, float g, float b)
set the color from an Fl_Color
float GetBlue(void) const
float GetGreen(void) const
void SetScale(double scale)
void Lighten(float scale)
static CRgbaColor Interpolate(const CRgbaColor &color1, const CRgbaColor &color2, float alpha)
Interpolate two colors.
static bool IsPolyA(const objects::CBioseq_Handle &bsh, TSeqPos start, TSeqPos stop)
float GetRed(void) const
Get specific channels in floating point values.
const string AsFastaString(void) const
CConstRef< CSeq_id > GetSeqId(void) const
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
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,...
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
Translate a string using a specified genetic code.
@ fIs5PrimePartial
= 0x4 Translate first codon even if not start codon (because sequence is 5' partial)
TSeqPos GetBioseqLength(void) const
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
position_type GetLength(void) const
TThisType IntersectionWith(const TThisType &r) const
position_type GetToOpen(void) const
TThisType & Set(position_type from, position_type to)
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
CRange< TSignedSeqPos > TSignedSeqRange
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
@ fWithCommas
Use commas as thousands separator.
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
const TDonor_after_exon & GetDonor_after_exon(void) const
Get the Donor_after_exon member data.
TGenomic_start GetGenomic_start(void) const
Get the Genomic_start member data.
const TAcceptor_before_exon & GetAcceptor_before_exon(void) const
Get the Acceptor_before_exon member data.
bool IsSetAcceptor_before_exon(void) const
splice sites Check if a value has been assigned to Acceptor_before_exon data member.
list< CRef< CUser_object > > TExt
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
const TBases & GetBases(void) const
Get the Bases member data.
TGenomic_end GetGenomic_end(void) const
Get the Genomic_end member data.
bool IsSetDonor_after_exon(void) const
Check if a value has been assigned to Donor_after_exon data member.
unsigned int
A callback function used to compare two keys in a database.
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
represents a pixel with two scores, one corresponds to a gap interval, another - to an aligned segmen...
bool operator==(const SScPix2 &other) const
represents a pixel with a score, if several intervals cover a pixel, the interval with the maximum co...
float m_MaxCoverage
score assigned to the pixel
bool m_Gap
fraction of the pixel corresponding to the m_Score
bool operator==(const SScPix &other) const
true if this is a gap interval
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4