55 "Variation features");
76 string msg =
"Zoom to see if data exists for this region";
81 objs.push_back(comment);
83 config->m_ShowConnection =
false;
93 auto it = settings.
find(
"zoom_to_see");
103 if (g1->
GetLeft() != g2->GetLeft())
104 return g1->
GetLeft() < g2->GetLeft();
106 return g1->
GetTop() < g2->GetTop();
113 const string& annot_name,
127 if (!title.empty()) {
137 sprintf(buff,
"gi|%d-%08x-%08x-%04x-%08x-%08x",
139 type, checksum, checksum_name);
180 p_areas->push_back(area);
181 return &(p_areas->back());
216 LOG_POST(
Error <<
"CVarTrackFactory::CreateTracks() subtype " << params.
m_Subkey <<
" is not supported!");
243 if ( !src_annots.
empty() ) {
250 if (iter->first ==
"SNP")
258 if (track_settings.count(
"graph_cache_key") > 0) {
261 if (track_settings.count(
"rmt_type") > 0) {
270 feat_track->SetAnnot(iter->first);
271 feat_track->ExcludeAnnotName(
"SNP");
272 feat_track->SetFeatSubtype(subtype);
273 if ( !iter->second.empty() ) {
274 feat_track->SetTitle(iter->second);
276 tracks[iter->first] = feat_track.
GetPointer();
311 config_set->
Set().push_back(
x_GetSettings(settings, track_proxy, is_remote_track));
325 config->SetLegend_text(
"anchor_5");
327 config->SetLegend_text(
"anchor_4");
337 rendering_str = iter->second;
338 if (rendering_str ==
"Histogram")
339 rendering_str =
"Heatmap";
342 if (
val > 0) hist_t = iter->second;
356 "Rendering",
"Rendering options",
358 "Rendering options for linked features.");
360 choice->SetValues().push_back(
364 "All features, both parent and all child features",
365 "The bar on top represents the variant region. Each bar below represents \
366 the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
367 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
369 choice->SetValues().push_back(
372 "Show parent, Expand children upon a click",
373 "Show parent on one line and expand all children upon a mouse click.",
374 "The bar on top represents the variant region. The bars below appear upon a mouse click and each bar represents \
375 the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
376 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
378 choice->SetValues().push_back(
381 "Show parent, Merge children",
382 "Show parent on one line and all children merged below it.",
383 "The bar on top represents the variant region. The bar below represents \
384 all of the sample level variants merged onto a single line.<br>Red: A Deletion or Loss<br> \
385 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
387 choice->SetValues().push_back(
390 "Show children, not parent",
391 "Show only the supporting variants (chidlren) not the variant region (parent)",
392 "The bar represent supporting variants in this study.<br>Red: A Deletion or Loss<br>\
393 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
395 choice->SetValues().push_back(
398 "Show parent, not children ",
399 "Show the variant region (parent) not the supporting variants (children)",
400 "The bar represents the variant region."));
402 choice->SetValues().push_back(
405 "Display on a single line",
406 "Track is displayed, with all features collapsed on a single line.",
407 "All the features are packed into one line."));
408 choice->SetValues().push_back(
412 "Track is displayed, with all features displayed as a heatmap.",
413 "All the features are packed and shown as a heatmap."));
415 config->SetChoice_list().push_back(choice);
418 "sort_by",
"Sort variants by",
420 "Sort variants according to a selected criterion.");
422 sortby_choice->SetValues().push_back(
424 "",
"No sorting",
"Don't sort variants",
""));
428 sortby_choice->SetValues().push_back(
433 sortby_choice->SetValues().push_back(
438 sortby_choice->SetValues().push_back(
443 sortby_choice->SetValues().push_back(
448 sortby_choice->SetValues().push_back(
452 config->SetChoice_list().push_back(sortby_choice);
455 txt_box->SetName(
"HistThreshold");
456 txt_box->SetValue(hist_t);
457 txt_box->SetDisplay_name(
"Heatmap Threshold");
458 txt_box->SetHelp(
"Display a heatmap when there are more features in this track than the value specificed."
459 " 'None' or '0' means threshold is disabled, and the display is up to 'Rendering Options'");
460 config->SetText_boxes().push_back(txt_box);
User-defined methods of the data storage class.
Checksum and hash calculation classes.
CAppJobNotification Notification send by CAppJobEventTranslator.
CChecksum – Checksum calculator.
static SSorterDescriptor GetSorterDescr()
static SSorterDescriptor GetSorterDescr()
static SSorterDescriptor GetSorterDescr()
static SSorterDescriptor GetSorterDescr()
static SSorterDescriptor GetSorterDescr()
static const string & LinkedFeatDisplayValueToStr(ELinkedFeatDisplay linked_feat)
CRef< CSGFeatureDS > m_DS
virtual void x_OnJobCompleted(CAppJobNotification ¬ify)
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings)
load the track settings.
virtual void x_UpdateData()
update track content.
const CLayoutGroup::TObjectList & GetChildren() const
void SetCommentGlyphs(const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
@ fNoNavigation
track title won't show navigation controls
@ fNoPin
tooltip is not pinnable
@ fNoSelection
the object can't be selected
int m_Flags
area flags, will need to replace m_Type
CLayoutGroup is a container of CSeqGlyphs (layout objects).
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
string GetTitle() const
get the track title.
TTrackAttrFlags m_Attrs
various track attributes
@ fNavigable
Track has navigation controls.
TModelUnit x_GetTBHeight() const
Get title bar height including margin.
CConstRef< CSeqGraphicConfig > x_GetGlobalConfig() const
Method for getting global configuration from rendering context.
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const
Initialize the HTML active area for a track.
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
const TSeqRange & GetVisSeqRange() const
static void ParseProfileString(const string &profile_str, TKeyValuePairs &settings)
void SetRemoteDataType(const string &data_type)
void SetGraphCacheKey(const string &graph_cache_key)
void SetSortBy(const string &sortby)
void SetFilter(const string &filter)
CSGFeatureDS inline method.
void GetAnnotNames_var(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
objects::CBioseq_Handle & GetBioseqHandle(void)
Get the underlying bioseq handle.
void SetDepth(int depth)
Set the annotation selector resolving depth.
void SetAdaptive(bool flag)
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
void x_InitHTMLActiveArea(CHTMLActiveArea &area) const
initialize the basic information for a given active area.
CRenderingContext * m_Context
the rendering context
virtual TModelUnit GetTop() const
virtual TModelUnit GetLeft() const
vector< CHTMLActiveArea > TAreaVector
list< CRef< CSeqGlyph > > TObjects
const string & GetSortBy() const
const string & GetSource() const
static CRef< objects::CChoice > CreateChoice(const string &name, const string &disp_name, const string &curr_val, const string &help, bool optional=false)
static CRef< objects::CChoiceItem > CreateChoiceItem(const string &name, const string &disp_name, const string &help, const string &legend_txt, bool optional=false)
CTrackTypeInfo - holds description of a layout track type.
const string & GetDescr() const
const string & GetId() const
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
CRef< objects::CTrackConfig > x_GetSettings(const TKeyValuePairs &settings, const CTempTrackProxy *track_proxy, bool is_vcf_track) const
virtual CRef< objects::CTrackConfigSet > GetSettings(const string &profile, const TKeyValuePairs &settings, const CTempTrackProxy *track_proxy) const
virtual void GetMatchedAnnots(const TAnnotMetaDataList &src_annots, const ILayoutTrackFactory::SExtraParams ¶ms, TAnnotNameTitleMap &out_annots) const
virtual const CTrackTypeInfo & GetThisTypeInfo() const
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual TTrackMap CreateTracks(SConstScopedObject &object, ISGDataSourceContext *ds_context, CRenderingContext *r_cntx, const SExtraParams ¶ms=SExtraParams(), const TAnnotMetaDataList &src_annots=TAnnotMetaDataList()) const
create a layout track based on the input objects and extra parameters.
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings) override
load the track settings.
virtual void x_UpdateData() override
update track content.
static CTrackTypeInfo m_TypeInfo
CVarTrack.
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const override
Initialize the HTML active area for a track.
CVarTrack(CSGFeatureDS *ds, CRenderingContext *r_cntx)
virtual const CTrackTypeInfo & GetTypeInfo() const override
virtual void x_OnJobCompleted(CAppJobNotification ¬ify) override
static void GetMatchedAnnots(const TAnnotMetaDataList &src_annots, const vector< string > &target_annots, const string &annot_type, const string &track_type, TAnnotNameTitleMap &out_annots)
Help function to find matched annotations.
ISGDSManager is seqgraphic data source manage that serves as an data source context.
virtual CIRef< ISGDataSource > GetDS(const string &type, SConstScopedObject &object)=0
Get a seqgraphic data source instance of the specified type.
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
string GenerateSignature(const string &title, const string &annot_name, TGi gi, TSeqRange range)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void AddLine(const char *line, size_t len)
Uint4 GetChecksum(void) const
Return calculated checksum.
#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)
static bool IsNAA(const string &annot, bool isStrict=false)
check if a given annotation is a named annotation accession[.version][number] when isSctrict == false...
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
CGlPoint< TModelUnit > TModelPoint
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,...
TGi GetGiForId(const objects::CSeq_id &id, CScope &scope, EGetIdType flags=0)
Given a Seq-id retrieve the corresponding GI.
@ eGetId_ForceGi
return only a gi-based seq-id
SAnnotSelector & SetFeatSubtype(TFeatSubtype subtype)
Set feature subtype (also set annotation and feat type)
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint16_t Uint2
2-byte (16-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool StringToBool(const CTempString str)
Convert string to bool.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
@ eNocase
Case insensitive compare.
Tdata & Set(void)
Assign a value to data member.
range(_Ty, _Ty) -> range< _Ty >
constexpr bool empty(list< Ts... >) noexcept
T bound(T x_, T xlo_, T xhi_)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)