& annot_name,
75sprintf(buff,
"gi|%d-%08x-%08x-%04x-%08x-%08x",
77 type, checksum, checksum_name);
88objects::CScope * scope)
92, m_bHasObjectList(
false)
115 TSeqRangerange = (*iNonEmptyBins)->obj->range;
125TMappedBinList::const_iterator itNextBin = iNonEmptyBins;
127 if((itNextBin !=
m_NonEmptyBins.end()) && (((*iNonEmptyBins)->SequentialNumber+1) == (*itNextBin)->SequentialNumber)) {
136area.
m_Signature= (*iNonEmptyBins)->obj->signature;
137p_areas->push_back(area);
155 size_tbin = (size_t) floor( (pos.
X()-start)/window );
158bin = max<size_t>(0, bin);
161 if(
m_Map[bin].obj.Empty())
return;
216 if(iBin->obj.NotEmpty()) {
262 stringsColorKey(
"Default");
267 for(
size_tbin = 0; bin < numBins; bin++)
269 if(
m_Map[bin].obj.NotEmpty()) {
272sColorBinKey =
"Cited";
275sColorBinKey =
"Clinical";
279sColorBinKey =
"Individual";
284sColorBinKey =
"PValue";
292x1 = start + bin*(window);
293x2 = start + (bin+1)*(window);
299gl.
Color4f(.76f,.76f,.76f, 1.0f);
306x1 = ((bin)*(window) + start);
312 intdx = (isFlipped) ? 2 : -2;
319x1+w, y2 - (binHeight - h) * 0.5,
true);
323x1+w, y2 - (binHeight - h) * 0.5,
true);
327gl.
Color4f(0.0f, 0.0f,0.0f, 1.0f);
static CRef< CScope > m_Scope
Checksum and hash calculation classes.
static string GenerateBinSignature(const string &title, const string &annot_name, TGi gi, TSeqRange range, objects::NSnpBins::TBinType BinType)
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
CConstRef< objects::CSeq_loc > m_Location
CBinsGlyph(const TDensityMap &values, const objects::CSeq_loc &loc, objects::CScope *scope)
TMappedBinList m_NonEmptyBins
virtual void x_Draw() const
The default renderer for this layout object.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
const string & GetTitle() const
TSeqRange x_GetBinRange(unsigned int bin) const
CRef< objects::CScope > m_Scope
const string & GetAnnotName() const
list< SBinMapped * > TMappedBinList
virtual TSeqRange GetRange(void) const
get the total range of this object.
virtual bool IsClickable() const
Query if this glyph is clickable.
virtual bool NeedTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Check if need to show tooltip.
virtual bool OnLeftDblClick(const TModelPoint &p)
void x_BuildNonEmptyBinList() const
objects::NSnpBins::TBinType m_Type
virtual void GetTooltip(const TModelPoint &p, ITooltipFormatter &tt, string &t_title) const
Get the tooltip if available.
string x_GetColorTheme() const
CConstRef< CSeqGraphicConfig > GetGlobalConfig() const
expose global configuration
CChecksum â Checksum calculator.
static CGuiRegistry & GetInstance()
access the application-wide singleton
@ fNoPin
tooltip is not pinnable
@ fNoSelection
the object can't be selected
int m_Flags
area flags, will need to replace m_Type
class CRegistryReadView provides a nested hierarchical view at a particular key.
void TextOut(const CGlTextureFont *font, const char *text, TModelUnit x, TModelUnit y, bool center, bool adjust_flip=true) const
TVPUnit SeqToScreenXClipped(const TModelUnit &size) const
void DrawRect(const TModelRect &rc) const
void DrawQuad(const TModelRect &rc, bool border=false) const
const TModelUnit & GetScale() const
bool IsFlippedStrand() const
class CRgbaColor provides a simple abstraction for managing colors.
static CRegistryReadView GetColorReadView(const CGuiRegistry ®, const string &base_key, const string §, const string &key, const string &def_sect="")
Create a read view specifically for 'Color' section.
static void GetColor(const CRegistryReadView &view, const string &key, CRgbaColor &color)
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)
const CRenderingContext * GetRenderingContext() const
Get the rendering context.
virtual void SetWidth(TModelUnit w)
virtual void SetLeft(TModelUnit l)
virtual TModelUnit GetTop() const
vector< CHTMLActiveArea > TAreaVector
const CSeqGlyph * GetParent(void) const
const string & GetColorTheme() const
objects and functions for dealing with variation (historically called SNP) bins
@ eIND
individual tracks (Venter, Watson, etc), data same as in eCLIN
@ eCITED
Cited Variations.
@ eCLIN
Clinical Variations.
@ eGAP
dbGaP analysis files
@ eGCAT
NHGRI GWAS Catalog Track (AKA Association Results)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
void AddLine(const char *line, size_t len)
Uint4 GetChecksum(void) const
Return calculated checksum.
IRender & GetGl()
convenience function for getting current render manager
virtual TModelUnit TextHeight(const CGlTextureFont *font) const =0
void Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void SetHorz(T left, T right)
virtual void ColorC(const CRgbaColor &c)=0
Set current color (glColor{3,4}{f,d}{v,})
@ eFontFace_Helvetica_Bold
CRgbaColor ContrastingColor(bool onlyBW=true) const
Return a color guaranteed to contrast nicely with this color.
static const int c_BinWidth
standard width and height of a bin
static string PValueAsColorKey(double pvalue)
preferred colorings for a given pvalue
static string ClinSigAsColorKey(NSnp::TClinSigID ClinSigID)
preferred colorings for SNP clinical significances
virtual bool IsEmpty() const =0
Indicates if the tooltip is empty.
static void GetBinTooltip(const NSnpBins::SBin &bin, CIRef< ITooltipFormatter > pFormatter, TGi gi, const std::string &colorTheme)
generate a tooltip for a given bin object and put it into the formatter
static const int c_BinHeight
TGi GetGiForId(const objects::CSeq_id &id, CScope &scope, EGetIdType flags=0)
Given a Seq-id retrieve the corresponding GI.
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
position_type GetLength(void) const
#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.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
static void text(MDB_val *v)
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