A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/alignment__glyph_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/seq_graphic/alignment_glyph.cpp Source File

83

, m_SeqAlign(&mapped_align)

84

, m_OrigSeqAlign(orig_align)

85

, m_OrigAnchor(orig_anchor)

86

, m_ShowScore(

false

)

87

, m_DisableTooltipsCaching(

false

)

125

CreateObjectInterface<IGuiObjectInfo>(scoped_obj,

NULL

));

127  if

( !gui_info )

return

;

143

gui_info->GetToolTip(tt, t_title, at_p);

144

gui_info->GetLinks(tt,

false

);

148

tt.

AddRow

(

"Last displayed alignment"

);

149

tt.

AddRow

(

"Alignment rows truncated for 'Adaptive' display"

);

150

tt.

AddRow

(

"To see all alignments select 'Show All'"

);

168

p_areas->push_back(area);

250  if

(

ctx

.seq_range.Empty())

265  for

(

int row

= 0;

row

< row_num; ++

row

) {

266  if

(

row

== anchor) {

269

unique_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);

290

curr_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) {

345

unique_ptr<IAlnSegmentIterator> p_it(

349  int

last_aligned_seg_to_anchor = -2;

350  int

last_aligned_seg_to_curr = -2;

351  int

last_aligned_seg_from_anchor = -2;

352  int

last_aligned_seg_from_curr = -2;

354  int

last_large_ins = -100000;

356  int

seg_iter_dir = 0;

366  if

(seg_iter_dir == 0) {

371  if

(last_aligned_seg_to_anchor < 0) {

373

last_aligned_seg_to_anchor = anchor_to;

374

last_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) {

390

start = t_pos /

ctx

.base_width_anchor;

391  if

(

ctx

.reverse_strand) {

394

ins_len = last_aligned_seg_from_curr - seg.

GetRange

().

GetTo

();

398

last_aligned_seg_to_anchor = t_pos;

401

}

else if

(seg_iter_dir == 1) {

404  if

((

int

)f_pos == last_aligned_seg_to_anchor + 1) {

405

start = f_pos /

ctx

.base_width_anchor;

406  if

(

ctx

.reverse_strand) {

407

ins_len = last_aligned_seg_from_curr - seg.

GetRange

().

GetTo

();

413

last_aligned_seg_from_anchor = f_pos;

427

start /=

ctx

.base_width_anchor;

430

last_aligned_seg_to_anchor = -2;

431

last_aligned_seg_from_anchor = -2;

433  if

(ins_len <= 0)

continue

;

439

ins_len_pix /=

ctx

.base_width_anchor;

446

}

else if

(ins_len_pix > 2.0) {

448

last_large_ins = (

int

)start;

450  if

(ins_len_pix < 0.1f)

461

start + size_in_model,

ctx

.yy - over,

462

start - size_in_model,

ctx

.yy - over);

464

start - size_in_model,

ctx

.yy +

ctx

.bar_h + over,

465

start + size_in_model,

ctx

.yy +

ctx

.bar_h + over);

481  sort

(unaligned_regions.begin(), unaligned_regions.end(),

484

return a.GetFrom() < b.GetFrom();

493  if

(unaligned_regions.empty()) {

497  for

(

const auto

& unaligned_rng : unaligned_regions) {

499

ln_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) {

535

unique_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  TSeqRange

curr_seq(curr_seq_from, curr_seq_to - 1);

565  if

(visible_range.

Empty

())

568

unaligned_regions.emplace_back(visible_range.

GetFrom

() + 1, visible_range.

GetTo

() + 1);

573  if

(h_text >

ctx

.bar_h) {

580

sLabelTextOut +=

" bp unaligned"

;

585  int

labelsCount =

round

(visible_range.

GetLength

() / seg_width);

587  if

((label_width + label_width*0.5) >= visible_range.

GetLength

()) {

600

xLF = visible_range.

GetFrom

();

601  for

(

int i

= 0;

i

< labelsCount; ++

i

) {

602

xM = visible_range.

GetFrom

() + part_size / 2.0 +

i

*part_size;

603

xLT = 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

);

606

xLF = 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)

636

tail_5 -=

ctx

.tail_5;

639  if

(tail_3 >

ctx

.tail_3)

640

tail_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  int

aligned_seq = anchor == 0 ? 1 : 0;

742  TSeqRange

visible_unaligned_range(range);

745  if

(inrc.

Empty

()) {

761  bool

ab = mhndl.

IsAa

();

762  bool

rb = hndl.

IsAa

();

775  if

(

ctx

.reverse_strand) {

799  string

translated_seq;

802

translated_seq = seq;

823  for

(

TSeqPos

bp = 0; bp < seq.size(); bp++) {

827

pos = sStart + bp + addon;

830

pos = sStart + bp * 3 + addon + 1;

852  if

(

ctx

.seq_range.Empty())

870  if

( !splice5.empty() && !splice3.empty() &&

884

pre_stop = neg_genomic ?

891  if

(

ctx

.seq_range.Empty())

894  if

(

ctx

.override_color)

895

c =

ctx

.read_status_color;

906  if

(

ctx

.override_color)

919  TModelUnit

xM = (

ctx

.whole_range.GetFrom() +

ctx

.whole_range.GetTo()) * 0.5;

936  double

identity = 100.0;

939  int

identities = (

int

)align_length;

944

identity = identities * 100 / align_length;

947  if

(identity > 0.6) {

948

identity = 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) {

1051

show_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_t

pos = title->find_last_of(

"\\"

);

1213  if

(pos != string::npos) {

1214

*title = title->substr(pos + 1);

1215  if

(title->length() > 20) {

1216

pos = title->rfind(

'.'

);

1217  if

(pos != string::npos && pos > 0) {

1218

pos = title->rfind(

'.'

, pos - 1);

1219  if

(pos != string::npos) {

1220

*title = title->substr(pos + 1);

1245

gl.

BlendFunc

(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

1314

tail_len =

x_GetTailWidth

(tail_5, visible_tail_5, base_width_curr);

1320

tail_len =

x_GetTailWidth

(tail_3, visible_tail_3, base_width_curr);

1343  if

( !reverse_strand ) {

1349  if

(

row

== anchor) {

1360

max_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) {

1398

label_width_px = max_label_width_px;

1400  if

((string::npos !=

label

.find(

"..."

)) && (

label

.length() <= 5))

1409  if

(reverse_strand) {

1410

xM = inrc.

GetTo

() - t_w;

1414

inrc.

GetTo

(), yM - label_h - 1.0), 0);

1421

xM + 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  bool

override_color =

false

;

1468  if

(aln_r_s > aln_r_e) {

1469  swap

(aln_r_s, aln_r_e);

1481  if

(

row

== anchor) {

1487  bool

reverse_strand =

1502  if

(

m_Score

->IsAverageable()) {

1504

override_color, read_status_color);

1507

override_color, read_status_color);

1511

gl.

Color4f

(1.0f, 0.0f, 0.0f, 1.0f);

1526

start /= base_width_anchor;

1554

start /= base_width_anchor;

1582  LOG_POST

(

Warning

<<

"Can't show alignment sequence due to an error: " 1594  char

strandLabel[2] = {

'>'

,

'\0'

};

1597

strandLabel[0] = reverse_strand ?

'>'

:

'<'

;

1600

strandLabel[0] = reverse_strand ?

'<'

:

'>'

;

1605

strandLabel[0] = reverse_strand ?

'<'

:

'>'

;

1608

strandLabel[0] = reverse_strand ?

'>'

:

'<'

;

1648  if

(label_w > max_label_width_px) {

1649

label_w = max_label_width_px;

1660

xM + 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) {

1718

unique_ptr<IAlnSegmentIterator> p_it(

1722  bool

ab = mhndl.

IsAa

();

1723  bool

rb = hndl.

IsAa

();

1754  TSeqPos

frame_shift_f = start % base_width_curr;

1755  TSeqPos

frame_shift_t = 2 - stop % base_width_curr;

1756  if

(base_width_anchor == 3) {

1757

frame_shift_f = sStart % base_width_anchor;

1758

frame_shift_t = 2 - sStop % base_width_anchor;

1760  if

(sStart > sStop) {

1761  swap

(sStart, sStop);

1762  swap

(frame_shift_f, frame_shift_t);

1764

stop /= base_width_curr;

1765

start /= base_width_curr;

1766

sStart /= base_width_anchor;

1767

sStop /= base_width_anchor;

1777

sStop += frame_shift_t;

1778

sStart -= frame_shift_f;

1781

stop += frame_shift_t;

1782

start -= frame_shift_f;

1790  string

seq, mseq, tmp_seq, visible_seq;

1791

s_vec.

GetSeqData

(start, stop + 1, tmp_seq);

1792

ms_vec.

GetSeqData

(sStart, sStop + 1, mseq);

1793

visible_seq = tmp_seq;

1795  if

(reverse_strand) {

1817  swap

(seq, tmp_seq);

1819  string

translated_seq;

1823  string

seq_candidate = mseq;

1824  if

(reverse_strand) {

1830  if

(reverse_strand) {

1833

translated_seq = tmp_seq;

1840  r

.SetFrom(

r

.GetFrom() - frame_shift_f);

1841  r

.SetTo(

r

.GetTo() + frame_shift_t);

1858  TSeqPos

start_base = frame_shift_f % base_width_anchor;

1859  TSeqPos

stop_base =

min

(stop - start + 1 - frame_shift_t % base_width_anchor,

1863  for

(

TSeqPos

bp = start_base; bp < stop_base; bp++) {

1868

pos = sStart + bp + addon;

1869  match

= bp < seq.size() && bp < mseq.size()

1870

&& seq[bp] == mseq[bp];

1873

pos = sStart + bp * 3 + addon + 1;

1874  match

= bp < seq.size() && bp < translated_seq.size()

1875

&& seq[bp] == translated_seq[bp];

1879  int

bp_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))

1905

unique_ptr<IAlnScoreIterator> score_iter(

m_Score

->GetScoreIterator(

row

));

1906

score_iter->MoveTo(bp);

1918

bases[0] = visible_seq[bp];

1921

pos, 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) {

1951

msg_width = long_msg_width;

1953  else if

(width > short_msg_width) {

1955

msg_width = short_msg_width;

1957  else if

(width > char_msg_width) {

1959

msg_width = char_msg_width;

1964  TModelUnit

msg_spacing = char_msg_width * 4.0;

1968  if

(width < msg_width + msg_spacing*2.0) {

1983

vector<TModelPoint> pts;

1984  bool

bottom_y =

true

;

1986  while

(pos <

GetLeft

() + seq_w - seq_char_width) {

1988

pts.push_back(

TModelPoint

(pos, center_y + fs * 0.5));

1990

pts.push_back(

TModelPoint

(pos, center_y - fs * 0.5));

1992

bottom_y = !bottom_y;

1993

pos += seq_char_width;

2000  while

(pos >

GetRight

() - (seq_w - seq_char_width)) {

2002

pts.push_back(

TModelPoint

(pos, center_y + fs * 0.5));

2004

pts.push_back(

TModelPoint

(pos, center_y - fs * 0.5));

2006

bottom_y = !bottom_y;

2007

pos -= seq_char_width;

2036  float

fraction,

bool

)

2051  bool

override_color,

2066

TR rasterizer(scoreStart, scoreEnd, fromM, toM);

2067  SScPix

pix = { 0.0f, 0.0f,

false

};

2069

unique_ptr<IAlnScoreIterator> score_iter(

m_Score

->GetScoreIterator(

row

));

2075  while

(aln_seg_it && it) {

2084  while

(it && start1 > stop2) {

2087

stop2 = it.

GetTo

();

2090  if

(start1 > stop2) {

2095

from = std::max<int>(start1, start2);

2096

to = std::min<int>(stop1, stop2);

2099

act_from /= base_width_anchor;

2101

act_to /= base_width_anchor;

2102  if

(act_from > act_to) {

2103  swap

(act_from, act_to);

2106  if

(act_from <= act_to) {

2109

rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,

FSetPixMaxCoverage

);

2122  const

TR::TRaster& raster = rasterizer.GetRaster();

2123  static float

eps = 0.0001f;

2124  double

shift_x = scoreStart;

2128  for

(

size_t i

= 0;

i

< raster.size(); ) {

2129  double

start =

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  int

off_y = sc_pix.

m_Gap

? GapOffset : 0;

2151  double

x2 =

i

+ shift_x;

2153

gl.

Begin

(GL_LINES);

2155

gl.

Vertex2d

(start, yy + height - off_y);

2158

gl.

Rectd

(start, yy + off_y, x2, yy + height - off_y);

2193  static const float

eps = 0.00001f;

2219  bool

override_color,

2222  if

(seq_range.

Empty

())

2237

TR rasterizer(scoreStart, scoreEnd, fromM, toM);

2239

unique_ptr<IAlnScoreIterator> score_it(

m_Score

->GetScoreIterator(

row

));

2245  while

(aln_seg_it && it) {

2254  while

(it && start1 > stop2) {

2258

stop2 = it.

GetTo

();

2262  if

(start1 > stop2) {

2267

from = std::max<int>(start1, start2);

2268

to = std::min<int>(stop1, stop2);

2270  SScPix2

pix = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,

false

};

2272

act_from /= base_width_anchor;

2274

act_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) {

2286

rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,

FSetPix2

);

2291  int len

= (act_to - act_from) + 1;

2295

rasterizer.AddInterval(act_from, act_to + 1.0 / base_width_anchor, pix,

FSetPix2

);

2312  const

TR::TRaster& raster = rasterizer.GetRaster();

2316  double

shift_x = scoreStart;

2317  static const float

eps = 0.001f;

2318  float

value_scale = value_limits.

GetTo

() - value_limits.

GetFrom

();

2319  if

(value_scale <= 0)

2323  for

(

size_t i

= 0;

i

< raster.size(); ) {

2324  double

start =

i

+ shift_x;

2325  const SScPix2

& sc_pix = raster[

i

];

2326  while

(++

i

< raster.size() && raster[

i

] == sc_pix);

2333  color

= override_color ?

2336

sc =

min

(1.0f, ((sc - value_limits.

GetFrom

()) / value_scale));

2339  float

alpha = 1.0f - sc * 0.75f;

2346  float

alpha =

min

(1.0f, 0.25f + sc_pix.

m_GapLen

* 0.75f);

2353  double

x2 =

i

+ shift_x;

2355

gl.

Begin

(GL_LINES);

2362

gl.

Rectd

(start, yy, x2, yy + height);

2371

gl.

Begin

(GL_LINES);

2398

<<

"CAlignGlyph::x_CalcIntervals: zero alignment range!"

);

2413

intervals.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

())

2443

start /= base_width_anchor;

2445

stop /= base_width_anchor;

2449  if

(!intervals.empty()) {

2452

intervals.back().SetTo(stop);

2457

intervals.push_back(

TSeqRange

(start, stop) );

2463  bool

shown =

false

;

2510  if

(

ctx

.reverse_strand) {

2513

start *=

ctx

.base_width_anchor;

2514

start += aln_stop + 1;

2516

end *=

ctx

.base_width_anchor;

2517

end += aln_stop + 1;

2522

start *=

ctx

.base_width_anchor;

2523

start = aln_start - start;

2525

end *=

ctx

.base_width_anchor;

2526

end = aln_start - end;

2533

start *=

ctx

.base_width_anchor;

2536

end *=

ctx

.base_width_anchor;

2542

start *=

ctx

.base_width_anchor;

2545

end *=

ctx

.base_width_anchor;

2573

tail_len_pix += label_space_pix;

2580  if

(tail_label_len > 0) {

2587

tail_len = visible_tail*base_width_curr;

2588  if

(visible_tail < tail) {

2592  if

(tail_label_len > 0) {

2623

override_color =

false

;

2628  if

((*iter)->GetType().IsStr() &&

2629

(*iter)->GetType().GetStr() ==

"PCR duplicate"

) {

2630

override_color =

true

;

2633  if

((*iter)->GetType().IsStr() &&

2634

(*iter)->GetType().GetStr() ==

"Poor sequence quality"

) {

2635

override_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