CHistogramGlyph::m_SDMult = 5;
60 floatCHistogramGlyph::m_SD = 0.0f;
63 #define M_NCBI_E 2.71828182845904523536 77:
CDensityMap<float>(start, stop, window, funct, def)
78, m_InterpolationMethod(eInterpolation_None)
85, m_DataPoints(
map.m_DataPoints)
86, m_InterpolationMethod(
map.m_InterpolationMethod)
87, m_FirstPoint(
map.m_FirstPoint)
88, m_LastPoint(
map.m_LastPoint)
116 for(
intx = 0; x <
GetBins(); ++x) {
120last_val = (*this)[x];
121}
else if(last_val != (*
this)[x]) {
122last_x += (x - last_x) / 2;
124last_val = (*this)[x];
125last_val < min_v ? min_v = last_val : max_v =
max(max_v, last_val);
128}
else if(last_x != -1) {
129last_x += (x - last_x) / 2;
131last_val < min_v ? min_v = last_val : max_v =
max(max_v, last_val);
136last_x += (
GetBins() - last_x) / 2;
138last_val < min_v ? min_v = last_val : max_v =
max(max_v, last_val);
149 return ctx.GetScale() <= 1.0f/2.0f;
174 doublelog_remainder = 0;
180log_max =
log10((
double)AxisMax);
182log_max =
log((
double)AxisMax) /
log(2.0);
184log_max =
log((
double)AxisMax);
186log_remainder = log_max - floor(log_max);
187log_max = floor(log_max);
188tick_n = (
int)log_max;
193denom = tick_n + log_remainder;
204 intdir =
val> 0 ? 1 : -1;
205 TModelUnity_ratio = (m_AxisMin < 0 && m_AxisMax > 0) ? 0.5f : 1.0;
207 if(dir < 0 && y_ratio != 1.)
231 TModelUnitdist_between_ticks = log_val - lower_tick_log;
240 val= lower_tick_log * dist_y + dist_between_ticks * dist_y;
257, m_FixedScale(
false)
258, m_AnnotName(
CSeqUtils::GetUnnamedAnnot())
260, m_ShowTitle(
false)
261, m_Mode(eMode_Single)
264m_RmtAnnotName = title;
279, m_FixedScale(
false)
280, m_AnnotName(
CSeqUtils::GetUnnamedAnnot())
282, m_ShowTitle(
false)
283, m_Mode(eMode_Single)
296, m_FixedScale(
false)
297, m_AnnotName(
CSeqUtils::GetUnnamedAnnot())
299, m_ShowTitle(
false)
300, m_Mode(eMode_Single)
309, m_FixedScale(
false)
311, m_ShowTitle(
false)
312, m_Mode(eMode_Single)
338 floatdenom = pow(10, floor(
log10(max_val)));
339max_val =
round(max_val/denom) * denom;
368lowest_max =
std::max(low_max, lowest_max);
378lowest_min =
std::min(low_min, lowest_min);
395 doublesign_max =
m_AxisMax>= 0 ? 1.0f : -1.0f;
396 doublesign_min =
m_AxisMin>= 0 ? 1.0f : -1.0f;
419 #ifdef ATTRIB_MENU_SUPPORT 423 if(!m.
FindMenu(
"Graph Glyph")) {
425sub_menu->
AddInt(
"SD Multiplier", &m_SDMult, 3.0f, 1, 40, 1);
435 #ifdef ATTRIB_MENU_SUPPORT 480 if(dlg.ShowModal() == wxID_OK) {
510 value+=
" heatmap";
527 boolcheck_data_points =
false;
529 const TMap& densityMap = map_iter->second;
531check_data_points =
true;
536 if(check_data_points) {
545 const TMap& densityMap = map_iter->second;
565tt.
AddRow(
"Double click on the histogram to change settings");
583 if(y_ratio > 0 && y_ratio < 1.) {
586 if(
y>= neg_height) {
600 TModelUnity_ratio = (m_AxisMin < 0 && m_AxisMax > 0) ? 0.5f : 1.0f;
604scale_y = (
y>= h) ? 1 : -1;
630 if(!
label.empty())
646 boolcheck_data_points =
false;
648 const TMap& densityMap = map_iter->second;
653 boolarea_added =
false;
654 if(check_data_points) {
660 const TMap& densityMap = map_iter->second;
678p_areas->push_back(area);
692 if(outlier.value > 0)
701p_areas->push_back(area);
714ival.
SetId().Assign(*seq_id);
739area.
m_Descr+=
" distribution histogram";
745ival.
SetFrom(first_map->second.GetStart());
746ival.
SetTo(first_map->second.GetStop());
772tooltip->SetTrustedData(
false);
774s = tooltip->Render();
778p_areas->push_back(area);
793 autoright = view_width;
816p_areas->emplace_back(label_area);
853 returnobjects::CSeqFeatData::GetTypeFromSubtype(
m_Subtype);
890 if(y_ratio == 0.0f || y_ratio > 1.0f)
900 boolforced_min_ticks =
false;
903forced_min_ticks =
true;
908 doubleaxis_max = AxisMax;
915 if(height_per_tick < 10)
922 for(
size_t i=0;
i<=(size_t)tick_n; ++
i) {
929 if(dist_x < min_dist) {
936 for(; x <
GetRight(); x += dist_x) {
959 if(forced_min_ticks)
961 for(
size_t i=0;
i<(size_t)tick_n; ++
i) {
968 if(height == 0 &&
negative&& y_ratio != 1.0)
971 intcurrent_precision = 0;
972 if(
precision> 0 && height-floor(height) >= 0.1f)
977x + label_off, top + dist_y*
i+ gl.
TextHeight(&font) + 1,
false);
998 TModelUnity_ratio = (m_AxisMin < 0 && m_AxisMax > 0) ? 0.5f : 1.0f;
1000 if(
negative&& y_ratio != 1.0f) {
1006 doublelog_base = 10.0;
1007 doublelog_max = 0.0;
1008 doublelog_min = 0.0;
1009 doublelog_remainder = 0.0;
1010 doubleaxis_max = AxisMax;
1017log_max =
log10((
double)axis_max);
1018log_min =
log10((
double)axis_min);
1022log_max =
log((
double)axis_max )/
log( 2.0 );
1023log_min =
log((
double)axis_min )/
log( 2.0 );
1027log_max =
log((
double)axis_max );
1028log_min =
log((
double)axis_min );
1034log_remainder = log_max-floor(log_max);
1035log_max = floor(log_max);
1036log_min =
max(0.0, ceil(log_min));
1038 inttick_n = (
int)log_max;
1041log_remainder = 0.0;
1048 TModelUnittop_y = height * (log_remainder/(log_max+log_remainder));
1049 TModelUnitdist_y = (height - top_y) /
double(tick_n);
1056 if(dist_x < min_dist) {
1063 booldraw_horizontal_lines =
true;
1065 for(; x <
GetRight(); x += dist_x) {
1075 if(axis_max != 0) {
1077x + label_off, top + gl.
TextHeight(&font) + 1,
false);
1082bottom - 1,
false);
1085 if(axis_max != 0) {
1087x + label_off, bottom - 1,
false);
1092 if(draw_horizontal_lines) {
1096 if(y_ratio != 1.0f)
1103 booldraw_unlabled_lines = (tick_n*dist_y-vertical_text_space_min*0.5) < vertical_text_space_min;
1112 for(
int i=1;
i<=tick_n; ++
i) {
1119 if(vertical_text_space >= vertical_text_space_min &&
1120bottom_gap >= vertical_text_space_min*0.5) {
1124 if(draw_horizontal_lines) {
1133x + label_off,
y- 1,
false);
1136x + label_off,
y+ gl.
TextHeight(&font) + 1,
false);
1144 else if(draw_horizontal_lines && draw_unlabled_lines &&
1145vertical_line_space > (vertical_text_space_min*0.5) &&
1146bottom_gap >= vertical_text_space_min*0.5) {
1154vertical_text_space += dist_y;
1155vertical_line_space += dist_y;
1158draw_horizontal_lines =
false;
1166 intdir = (
val< 0) ? -1 : 1;
1174 if((dir < 0 &&
val< AxisMax) || (dir > 0 &&
val> AxisMax)) {
1193y_curr =
max(0., y_curr);
1201y_curr = min<TModelUnit>(y_curr,
fabs(AxisMax));
1213gl.
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1214gl.
Enable(GL_LINE_SMOOTH);
1215glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
1223null_val = logscale.
MapValue(null_val);
1225vector<TModelPoint> points;
1227vector<const CRgbaColor*>
colors;
1241p.
m_X-=
ctx->GetOffset();
1244points.push_back(p);
1256 for(
size_t i= 0;
i< points.size(); ++
i) {
1260points[
i].m_Y = logscale.
MapValue(points[
i].Y());
1267 if((prev_y > 0 && curr_y < 0) || (prev_y < 0 && curr_y > 0)) {
1268 doublem = (curr_y - prev_y) / (points[
i].X() - points[
i- 1].X());
1269 TModelUnitx = (-prev_y / m) + points[
i- 1].X();
1279gl.
Vertex2d(points[
i].X(), null_val);
1280gl.
Vertex2d(points[
i].X(), points[
i].Y());
1287 TModelUnitx = points[
i- 1].X() + (points[
i].X() - points[
i- 1].X()) / 2;
1291gl.
Vertex2d(points[
i- 1].X(), null_val);
1292gl.
Vertex2d(points[
i- 1].X(), prev_y);
1298 if((prev_y > 0 && curr_y < 0) || (prev_y < 0 && curr_y > 0)) {
1315gl.
Vertex2d(points[
i].X(), null_val);
1345 booloutlier =
false;
1346 for(
size_tidx = 0; idx < densityMap.
GetDataPoints().size(); ++idx) {
1353p.
m_X-=
ctx->GetOffset();
1358gl.
Begin(GL_TRIANGLE_FAN);
1361 for(;
f<
t+ step * 0.02;
f+= step) {
1362gl.
Vertex2d(p.
X() - radius_x * cos(
f), p.
Y() - radius_y * sin(
f));
1385gl.
Begin(GL_LINES);
1401vector<double> x_points;
1402x_points.reserve(points.size());
1403vector<double> y_points;
1404y_points.reserve(points.size());
1406 autofrom = orig_pane->
ProjectX(points.front().X());
1407 autoto = orig_pane->
ProjectX(points.back().X());
1413 for(
const auto& p : points) {
1414 autox = orig_pane->
ProjectX(p.X());
1415 const auto&
y= p.Y();
1416y_max = max<double>(
y, y_max);
1417y_min = min<double>(
y, y_min);
1420x_points.push_back(x);
1421y_points.push_back(
y);
1424 if(
fabs(
y) >
fabs(y_points[idx - 1]))
1425y_points[idx - 1] =
y;
1429reverse(x_points.begin(), x_points.end());
1430reverse(y_points.begin(), y_points.end());
1433Splines::PchipSpline spline;
1434spline.build(x_points, y_points);
1439orig_pane->
Close();
1447 t= (rcVP.Top() -
t);
1451 floatheight = vp_rect.
Height();
1458 autobottom = vp_rect.
Bottom() + 1;
1460gl.
Scalef(1.0f, scale, 1.0f);
1470 else if(m_AxisMin < 0 && m_AxisMax > 0)
1476bottom_colors[0].
Lighten(0.55f);
1477bottom_colors[1].
Lighten(0.55f);
1492model_heights[0] = model_heights[1] =
m_AxisMin< 0 ? height * 0.5f : height;
1495gl.
Begin(GL_LINES);
1499 float y= spline(pos);
1503 else if(
y>= y_max)
1506 size_tidx =
y< 0 ? 1 : 0;
1507 intdir =
y< 0 ? -1 : 1;
1509 automodel_hh = model_heights[idx] * 0.3;
1510 if(
fabs(
y) > model_hh) {
1511 automiddle_y = model_hh * dir;
1516 floatalpha = (
fabs(
y) - model_hh) / (model_heights[idx] - model_hh);
1523gl.
ColorC(bottom_colors[idx]);
1532gl.
Enable(GL_LINE_SMOOTH);
1533glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
1542gl.
Begin(GL_LINE_STRIP);
1545 float y= spline(pos);
1548 else if(
y>= y_max)
1552 if((y < 0 && prev_y > 0) || (prev_y < 0 && y > 0)) {
1572 const TMap& densityMap = map_iter->second;
1594gl.
Enable(GL_LINE_SMOOTH);
1595glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
1604gl.
Begin(GL_LINE_STRIP);
1607gl.
Begin(GL_QUADS);
1612vector<TModelPoint> points;
1622 if(m_AxisMin < 0 && m_AxisMax > 0) {
1632bottom_colors[0].
Lighten(0.55f);
1633bottom_colors[1].
Lighten(0.55f);
1636model_heights3[0] = model_heights[0] * 0.3f;
1637model_heights3[1] = model_heights[1] * 0.3f;
1640 for(; seg_it; seg_it.
Advance()) {
1651gl.
Begin(GL_QUADS);
1665 intdir = (
val< 0) ? -1 : 1;
1666 size_tidx = (
val< 0) ? 1 : 0;
1668 booloutlier =
false;
1670gl.
ColorC(*curr_color);
1672y_curr = logscale.
MapValue(y_curr);
1701points.emplace_back(x1, y_curr);
1703 autopix_len = (x2 - x1);
1707 intsteps = pix_len / step_len;
1708 for(
size_t i= 1;
i< steps; ++
i) {
1709points.emplace_back(x1 +
i* step_len, y_curr);
1711points.emplace_back(x2, y_curr);
1719 auto y=
fabs(y_curr);
1720 if(
y> model_heights3[idx]) {
1721 automiddle_y = model_heights3[idx] * dir;
1725 floatalpha = (
y- model_heights3[idx]) / (model_heights[idx] - model_heights3[idx]);
1734gl.
ColorC(bottom_colors[idx]);
1741 if((prev_y > 0 && y_curr < 0) || (prev_y < 0 && y_curr > 0)) {
1742 doublem = (y_curr - prev_y) / (
f- prev_x);
1743 f= (-prev_y / m) + prev_x;
1746gl.
ColorC(*curr_color);
1773 if(o.value > o_max)
1775 if(o.value < o_min)
1785gl.
Begin(GL_QUADS);
1789three_pix = -three_pix;
1796 floatfactor = o.value / (o.value >= 0 ? o_max : o_min);
1804gl.
Vertex2d(x2, o.y - three_pix);
1805gl.
Vertex2d(x1, o.y - three_pix);
1839gl.
Enable(GL_LINE_SMOOTH);
1852 const TMap& densityMap = map_iter->second;
1853 floatl_scale = (densityMap.
GetMax() - densityMap.
GetMin()) + 1;;
1854 if(l_scale > 0.0f) {
1856l_scale = 1.0f / l_scale;
1863 config.m_Colors.find(map_iter->first);
1864 if(c_iter !=
config.m_Colors.end()) {
1865color_max = c_iter->second;
1867color_min = color_max;
1872 for(; seg_it; seg_it.
Advance()) {
1887score = 0.5 - score;
1898score =
max(0.0f, score);
1899score =
min(1.0f, score);
1914 if(
m_Maps.
size() > 1 &&
config.m_Colors.count(map_iter->first) > 0) {
1948gl.
Scalef(1.0f, -scale, 1.0f);
1958 else if(m_AxisMin < 0 && m_AxisMax > 0)
1982 #ifdef ATTRIB_MENU_SUPPORT 1991 if(range.
GetLength() < two_pix_size) {
1998range.
GetFrom() + two_pix_size, bottom);
2007 CGlAttrGuardguard(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT);
2009gl.
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2036 const TModelRect& vr = pane->GetVisibleRect();
2038 autox = vr.
Right() - ((w + 16) * one_px);
2039 auto y= vr.
Top() + h + 2;
2044gl.
Enable(GL_LINE_SMOOTH);
2073vector<SLegendData> legend_fields;
2074 for(
intbin = 0; bin <
m_NumBins; ++bin) {
2079 data.label +=
"..";
2087legend_fields.push_back(
data);
2089 if(legend_fields.empty())
2094 if(view_width == 0)
2098 intnum_cols =
min((
int)(view_width / legend_item_span), (
int)legend_fields.size());
2113 intnum_rows = ceil((
float)legend_fields.size() / num_cols);
2115 for(
int row= 0;
row< num_rows; ++
row) {
2116 size_tbase_index =
row* num_cols;
2118 if(base_index + num_cols >= legend_fields.size())
2119num_cols =
static_cast<int>(legend_fields.size() - base_index);
2120 intc = num_cols / 2;
2122 if(num_cols % 2 != 0)
2123left -= legend_item_span / 2;
2124 for(
intcol = 0; col < c; ++col) {
2126left -= legend_item_span;
2129 for(
intcol = 0; col < num_cols; ++col) {
2132legend_fields[base_index + col].
label,
2134legend_fields[base_index + col].
color,
2135legend_fields[base_index + col].params->
m_LabelColor));
2136 g->SetTop(
row* row_height +
row* 4 + 2);
2137 g->SetHeight(row_height);
2145left += legend_item_span;
2179 for(; seg_it; seg_it.
Advance()) {
2192 for(; seg_it2; seg_it2.
Advance()) {
2205 for(; seg_it3; seg_it3.
Advance()) {
2216variance = sqrt(variance);
2218 #ifdef ATTRIB_MENU_SUPPORT 2231 booloutlier=
false;
2235 for(; seg_it; seg_it.
Advance()) {
2256 booloutlier=
false;
2260 for(; seg_it; seg_it.
Advance()) {
2286 for(
intbin = 0; bin <
m_NumBins; ++bin) {
2288legend_item->SetId(
"");
2296legend_item->SetLabel(
label);
2298legend_item->SetColor(
color.ToString());
2299legend.push_back(legend_item);
User-defined methods of the data storage class.
Run iterator. iterate through runs of equal values in the bins.
class CDensityMap generates a low-resolution view of a set of features.
virtual void SetRegistryPath(const string &path)
CConfigurableItems - a static list of items that can be configured.
string GetStoragekey(int type, int subtype) const
Get the key used to store this type of feature.
string GetDescription(int type, int subtype) const
Get the displayable description of this type of feature.
CGlAttrGuard - guard class for restoring OpenGL attributes.
string m_Descr
description that can be used as label or tooltip
@ fNoTooltip
do not request and show tooltip
@ fZoomOnDblClick
Zoom on Double click.
@ fNoPin
tooltip is not pinnable
@ fNoHighlight
no highlighting on mouse over
@ fComment
render a label/comment on client side
@ fNoSelection
the object can't be selected
@ fTooltipEmbedded
tooltip embedded
string m_ID
area identifier
int m_Flags
area flags, will need to replace m_Type
bool m_PositiveStrand
the default is true
void SetConfig(CRef< CHistParams > config)
bool CreateX(wxWindow *parent, wxWindowID id=ID_CHISTCONFIGDLG, const wxString &caption=_("Graph Rendering Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
void SetHistName(const string &title)
CRef< CHistParams > GetConfig() const
void SetConfigName(const string &name)
void AddSettings(const string &name, CRef< CHistParams > hist_params)
Add a new settings for a given name.
bool IsTempSettings(const string &name) const
Check if there is settings for a given name.
CRgbaColor m_SmearColorMin
int m_SDeviationThreshold
EScale m_StoredScale
stored scale of the underlying data (e.g. as reported by TMS)
CRgbaColor m_OutlierColor
EScale m_Scale
requested scale
CRange< float > m_ValueRange
static const string & ScaleValueToName(CHistParams::EScale scale)
CRgbaColor m_SmearColorMax
CHistogramData(TSeqPos start=0, TSeqPos stop=0, double window=1, accum_functor *func=NULL, float def=0)
CHistogramData & operator=(const CHistogramData &map)
TModelPoint GetFirstPoint() const
TModelPoint GetLastPoint() const
EInterpolationMethod m_InterpolationMethod
void InitDataPoints(const TModelPoint &first_point, const TModelPoint &last_point)
@ eInterpolation_Piecewise
EInterpolationMethod GetInterpolationMethod() const
const TDataPoints & GetDataPoints() const
TModelPoint GetDataPoint(size_t idx) const
const string & GetAnnotName() const
TDataType x_MapValue(TDataType val, CRgbaColor **color=0, bool *outlier=0) const
void x_DrawDataPoints(const TMap &densityMap) const
CConstRef< CSeqGraphicConfig > m_gConfig
TDataType GetAxisMin() const
virtual void x_Draw() const
The default renderer for this layout object.
void x_DrawLogRuler(bool negative) const
objects::CSeqFeatData::E_Choice GetFeatType() const
const string & GetDesc() const
void x_GetLabel(string &label) const
void SetAnnotName(const string &name)
virtual bool IsClickable() const
Query if this glyph is clickable.
void x_DrawGraph(TMaps::const_iterator &map_iter) const
virtual void GetTooltip(const TModelPoint &, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
string m_AnnotName
Key for accessing histogram settings.
const string & GetTitle() const
virtual bool NeedTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Check if need to show tooltip.
void x_DrawGraphMap(TMaps::const_iterator &map_iter, const CHistParams &config) const
void x_DrawHeatMap(TMaps::const_iterator &map_iter, const CHistParams &config) const
void x_DrawSmoothCurve(vector< TModelPoint > &points) const
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
TDataType GetAxisMax() const
Get the axis limits (max/min).
virtual bool OnLeftDblClick(const TModelPoint &)
struct { TSeqRange range SOutlier
IGlyphDialogHost * m_DlgHost
TDataType GetMax() const
Get the actually density max/min values.
void x_DrawLinearRuler(bool negative) const
CRef< CLayoutGroup > m_Legend
virtual TSeqRange GetRange(void) const
get the total range of this object.
objects::CSeqFeatData::ESubtype GetFeatSubtype() const
TDataType x_HighestValueBelowMax(const TMap &densityMap) const
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
void GetLegend(objects::CTrackConfig::TLegend &legend) const
CHistogramGlyph(const TMap &map, objects::CSeqFeatData::ESubtype subtype, const string &title="")
vector< SOutlier > m_Outliers
void DrawGrid(bool include_background) const
TDataType x_ComputeDeviation(const TMap &densityMap, TDataType &mean) const
TModelPoint x_PointToWorld(TModelPoint p) const
virtual bool IsCoverageGraph() const
CRef< CHistParams > GetHistParams() const
objects::CSeqFeatData::ESubtype m_Subtype
TDataType x_LowesetValueBelowMin(const TMap &densityMap) const
void SetConfig(const CSeqGraphicConfig &config)
CLayeredLayout is a standard 2D layout policy.
CLayoutGroup is a container of CSeqGlyphs (layout objects).
void SetLayoutPolicy(ILayoutPolicy *policy)
Set policy on how to deploy the layout of its children.
void PushBack(CSeqGlyph *obj)
Append a layout object to the end.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
static string GetHistogramSignature(const objects::CSeq_loc &loc, EObjectType obj_type, objects::CScope *scope, const string &title, const string &data_source="", int subtype=0)
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
void TextOut(const CGlTextureFont *font, const char *text, TModelUnit x, TModelUnit y, bool center, bool adjust_flip=true) const
CRef< CSGSequenceDS > GetSeqDS() const
CGlPane * GetGlPane()
inline method implementations
const TModelUnit & GetOffset() const
TModelRange IntersectVisible(const CSeqGlyph *obj) const
TVPUnit SeqToScreenX(const TModelUnit &size) const
void DrawLine(TModelUnit x1, TModelUnit y1, TModelUnit x2, TModelUnit y2) 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 ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
bool IsFlippedStrand() const
TSeqPos GetViewWidth() const
class CRgbaColor provides a simple abstraction for managing colors.
static bool IsBackgroundJob()
TSeqPos GetSequenceLength() const
objects::CBioseq_Handle GetBioseqHandle(void) const
Get the underlying bioseq handle.
static E_Choice GetTypeFromSubtype(ESubtype subtype)
static const CFeatList * GetFeatList()
void x_InitHTMLActiveArea(CHTMLActiveArea &area) const
initialize the basic information for a given active area.
CRenderingContext * m_Context
the rendering context
virtual void x_OnLayoutChanged()
update the layout.
virtual void SetHeight(TModelUnit h)
const CRenderingContext * GetRenderingContext() const
Get the rendering context.
virtual TModelUnit GetRight() const
void SetParent(CSeqGlyph *p)
virtual void SetWidth(TModelUnit w)
virtual void SetLeft(TModelUnit l)
virtual TModelUnit GetTop() const
virtual TModelUnit GetHeight() const
virtual void SetTop(TModelUnit b)
void Draw() const
render the layout.
void x_Local2World(TModelPoint &p) const
Transform the coordiantes from local coord. to world coord.
virtual TModelUnit GetWidth() const
virtual TModelUnit GetLeft() const
TModelRect GetModelRect() const
get the bounding box.
vector< CHTMLActiveArea > TAreaVector
void SetRenderingContext(CRenderingContext *context)
Set the rendering context.
CRef< CHistParamsManager > GetHistParamsManager() const
Get histogram config manager.
virtual void PostDialogShow()=0
Post-processing after showing a dialog.
virtual void PreDialogShow()=0
Prepare for showing a dialog.
container_type::const_iterator const_iterator
const_iterator begin() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
static const Colors colors
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)
static bool IsCoverageAnnotName(const string &annot_name)
static bool IsUnnamed(const string &annot)
check if a given annotation is a unnamed annotation.
static bool isRmtAnnotName(const string &sAnnotname)
check if a given annotation was created by a remote file pipeline
virtual void Scalef(GLfloat x, GLfloat y, GLfloat z)=0
void SetViewport(const TVPRect &R)
virtual void Translatef(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)
TVPUnit ProjectX(TModelUnit m_x) const
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
virtual void PopAttrib()=0
virtual void PushAttrib(GLbitfield mask)=0
virtual void LoadIdentity()=0
virtual void PopMatrix()=0
virtual void ShadeModel(GLenum mode)=0
Set shade model for default lighting: glShadeModel(GL_FLAT or GL_SMOOTH)
bool PtInRect(T x, T y) const
virtual void End()=0
Finish rendering (create buffer and send to renderer)
virtual ERenderTarget GetApi()=0
virtual void PolygonMode(GLenum face, GLenum mode)=0
Set the polygon rasterization mode.
void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
virtual TModelUnit GetMetric(EMetric metric, const char *text=NULL, int len=-1) const
void Vertex2f(GLfloat x, GLfloat y)
virtual void Disable(GLenum glstate)=0
glDisable()
virtual void LineWidth(GLfloat w)=0
Set line width for drawing: glLineWidth()
CGlPoint< TModelUnit > TModelPoint
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
virtual void PushMatrix()=0
void SetMin(const float &min)
TSeqPos GetSeqPosition() const
virtual void AddRow(const string &sContents="", unsigned colspan=2)=0
add a row with a cell, spanning across all columns
float GetBlue(void) const
float GetGreen(void) const
void SetMax(const float &max)
static CIRef< ITooltipFormatter > CreateTooltipFormatter(ETooltipFormatters)
factory for requested tooltip formatter creation
runlen_iterator RunLenBegin() const
TSeqPos GetSeqRunEndPosition() const
float GetAlpha(void) const
position_type GetRunLength() const
CDensityMap< CntType > & operator=(const CDensityMap< CntType > &map)
void Lighten(float scale)
static CRgbaColor Interpolate(const CRgbaColor &color1, const CRgbaColor &color2, float alpha)
Interpolate two colors.
position_type GetPosition() const
float GetRed(void) const
Get specific channels in floating point values.
@ eTooltipFormatter_CSSTable
generated table is CSS based, generated NCBI URLs are paths (recommended for SViewer)
bool ExtractZoomLevel(const string &full_name, string *acc_ptr, int *zoom_level_ptr)
Extract optional zoom level suffix from named annotation string.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
position_type GetLength(void) const
static position_type GetEmptyFrom(void)
static position_type GetEmptyTo(void)
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
#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 string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
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.
list< CRef< CLegendItem > > TLegend
void SetTo(TTo value)
Assign a value to To data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetFrom(TFrom value)
Assign a value to From data member.
unsigned int
A callback function used to compare two keys in a database.
static const float kDataPointRadius
static const string kCoverageLabel
static bool IsOutlierTooltips(CRenderingContext &ctx)
static const int kLegendBarWidth
static const int kRulerLebelsMinDistance
static const int kLegendLabelGap
static const int kLegenPadding
if(yy_accept[yy_current_state])
static void text(MDB_val *v)
constexpr bool empty(list< Ts... >) noexcept
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
Int4 delta(size_t dimension_, const Int4 *score_)
#define row(bind, expected)
void x_InitDenominator(double AxisMax, double &denom)
SLogScaleData(double AxisMax, double AxisMin, int height, CHistParams::EScale scale)
CHistParams::EScale m_Scale
double MapValue(double val)
double bottom_denominator
TEMPLATE binary functor base struct.
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
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