1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___HISTOGRAM_GLYPH__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___HISTOGRAM_GLYPH__HPP
65 accum_functor* func =
NULL,
float def = 0);
70 m_InterpolationMethod = interpolation_method;
74 return m_InterpolationMethod;
123 return fabs(left) >
fabs(right) ? left : right;
136 const string& title =
"");
149 virtual void GetHTMLActiveAreas(
TAreaVector* p_areas)
const;
150 virtual bool IsClickable()
const;
152 virtual bool IsCoverageGraph()
const;
158 const TMaps& GetDensityMaps(
void)
const;
161 const int GetMapNum()
const;
166 objects::CSeqFeatData::E_Choice GetFeatType()
const;
171 void SetAnnotName(
const string& name);
172 const string& GetAnnotName()
const;
174 void SetSubtype(objects::CSeqFeatData::ESubtype subtype);
176 void SetDesc(
const string& desc);
177 const string& GetDesc()
const;
197 void SetFixedScale(
bool value);
199 void SetShowTitle(
bool f);
203 void DrawGrid(
bool include_background)
const;
207 void RunSettingsDialog();
209 void GetLegend(objects::CTrackConfig::TLegend& legend)
const;
212 bool isRmtBased()
const;
215 virtual void x_Draw()
const;
216 virtual void x_UpdateBoundingBox();
219 TDataType x_HighestValueBelowMax(
const TMap& densityMap)
const;
220 TDataType x_LowesetValueBelowMin(
const TMap& densityMap)
const;
222 void x_DrawLogRuler(
bool negative)
const;
223 void x_DrawLinearRuler(
bool negative)
const;
226 void x_DrawGraph(TMaps::const_iterator& map_iter)
const;
227 void x_DrawDataPoints(
const TMap& densityMap)
const;
229 void x_DrawHeatMap(TMaps::const_iterator& map_iter,
const CHistParams&
config)
const;
230 void x_DrawGraphMap(TMaps::const_iterator& map_iter,
const CHistParams&
config)
const;
232 void x_DrawSmoothCurve(vector<TModelPoint>& points)
const;
234 void x_UpdateLegend();
235 bool x_HasLegend()
const;
239 void x_GetLabel(
string&
label)
const;
246 #ifdef ATTRIB_MENU_SUPPORT
273 mutable int m_NumBins = 0;
274 mutable int m_BinSize = 0;
320 range.CombineWith(iter->second.GetRange());
352 double max_val = DBL_MIN;
354 max_val =
max(max_val, (
double)map_iter->second.GetMax());
362 double min_val = DBL_MAX;
364 min_val =
min(min_val, (
double)map_iter->second.GetMin());
417 if (
m_Subtype != objects::CSeqFeatData::eSubtype_any &&
m_Subtype != objects::CSeqFeatData::eSubtype_bad) {
User-defined methods of the data storage class.
class CDensityMap generates a low-resolution view of a set of features.
CRef< CHistParams > GetHistParams(TFeatSubtype subtype) const
Get histogram settings using feature subtype.
TModelPoint GetFirstPoint() const
TModelPoint GetLastPoint() const
void SetInterpolationMethod(EInterpolationMethod interpolation_method)
EInterpolationMethod m_InterpolationMethod
@ eInterpolation_Piecewise
EInterpolationMethod GetInterpolationMethod() const
const TDataPoints & GetDataPoints() const
TModelPoint GetDataPoint(size_t idx) const
const string & GetAnnotName() const
void SetAxisMin(TDataType min)
CConstRef< CSeqGraphicConfig > m_gConfig
TDataType GetAxisMin() const
CHistogramGlyph(const TMaps &maps, objects::CSeqFeatData::ESubtype subtype)
void SetDialogHost(IGlyphDialogHost *host)
const TMap & GetDensityMap(void) const
Access the first density map.
void SetShowTitle(bool f)
const string & GetDesc() const
void SetAxisMaxFixed(TDataType max)
void SetAxisMax(TDataType max)
string m_AnnotName
Key for accessing histogram settings.
void SetFixedScale(bool value)
const string & GetTitle() const
const int GetMapNum() const
Access the number of maps.
TDataType GetAxisMax() const
Get the axis limits (max/min).
map< string, TMap > TMaps
void SetSubtype(objects::CSeqFeatData::ESubtype subtype)
struct { TSeqRange range SOutlier
IGlyphDialogHost * m_DlgHost
TDataType GetMax() const
Get the actually density max/min values.
void SetRenderingMode(ERenderingMode mode)
CRef< CLayoutGroup > m_Legend
virtual TSeqRange GetRange(void) const
get the total range of this object.
objects::CSeqFeatData::ESubtype GetFeatSubtype() const
void SetDesc(const string &desc)
CHistogramGlyph(const TMap &map, objects::CSeqFeatData::ESubtype subtype, const string &title="")
vector< SOutlier > m_Outliers
const TMaps & GetDensityMaps(void) const
Access all the maps.
CRef< CHistParams > GetHistParams() const
objects::CSeqFeatData::ESubtype m_Subtype
void SetAxisMinFixed(TDataType min)
CLayoutGroup is a container of CSeqGlyphs (layout objects).
class CRgbaColor provides a simple abstraction for managing colors.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
vector< CHTMLActiveArea > TAreaVector
CRef< CHistParamsManager > GetHistParamsManager() const
Get histogram config manager.
IGlyphDialogHost An interface used for handling issues related to any dialog pops up that requires so...
container_type::const_iterator const_iterator
const_iterator begin() const
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
objects::CSeqFeatData::ESubtype GetFeatSubtype(const string &feat_type)
static bool isRmtAnnotName(const string &sAnnotname)
check if a given annotation was created by a remote file pipeline
vector< size_t > TDataPoints
static TSeqPos GetDensityMap(const objects::CBioseq_Handle &handle, TSeqPos start, TSeqPos stop, TSeqPos window, objects::SAnnotSelector sel, vector< TSeqPos > &density)
OLD static method.
CDensityMap< CntType > & operator=(const CDensityMap< CntType > &map)
TSeqRange GetRange() const
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
static const char label[]
range(_Ty, _Ty) -> range< _Ty >
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double f(double x_, const double &y_)
virtual binary_functor< TDataType > * clone() const
virtual TDataType operator()(const TDataType &left, const TDataType &right) const
TEMPLATE binary functor base struct.