NCBI C++ ToolKit
vcf_track.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: vcf_track.cpp 46858 2021-11-10 17:00:12Z evgeniev $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Liangshou Wu
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
43 #include <gui/objutils/utils.hpp>
45 #include <gui/objects/TextBox.hpp>
46 #include <objmgr/util/sequence.hpp>
47 #include <util/checksum.hpp>
48 
51 
52 ///////////////////////////////////////////////////////////////////////////////
53 /// CVcfTrack
54 ///////////////////////////////////////////////////////////////////////////////
56 static const TLayoutStr s_LayoutStrs[] = {
61 };
62 
65 
66 static CFeatureTrack::ELayout s_LayoutStrToValue(const string& layout)
67 {
68  TLayoutMap::const_iterator iter = sm_LayoutMap.find(layout);
69  if (iter != sm_LayoutMap.end()) {
70  return iter->second;
71  }
72  NCBI_THROW(CException, eInvalid, "Invalid layout string: " + layout);
73 }
74 
75 
77 {
79  if (iter->second == layout) {
80  return iter->first;
81  }
82  }
83  return kEmptyStr;
84 }
85 
86 
88  "VCF records");
89 
91  : CFeatureTrack(ds, r_cntx)
92 {
94 }
95 
96 
98 {
99  if (!m_DS->AllJobsFinished()) {
100  m_DS->DeleteAllJobs();
101  }
102 }
103 
104 
106 {
107  return m_TypeInfo;
108 }
109 
110 
111 bool CVcfTrack::CheckRange(TSeqRange range, string& sMsg, size_t& nFeats)
112 {
113  // we want to limit downloads to about 30M variations to prevent users from downloading whole chromosomes
114  static size_t s_MaxFeatures(5 * 1000 * 1000);
115 
116  CVcfFeatureDS* vcf_ds = dynamic_cast<CVcfFeatureDS*>(m_DS.GetPointer());
117  if (nullptr != vcf_ds) {
118  nFeats = vcf_ds->GetFeaturesCountInRange(m_Annot, range);
119  auto extra = GetDiagContext().Extra();
120  extra.Print("VCF-records-in-range", nFeats);
121  }
122 
123  if(nFeats > s_MaxFeatures) {
124  sMsg = "You have requested a range that contains approximately " + NStr::NumericToString(nFeats) +
125  " variations. We do not support downloads of more than " + NStr::NumericToString(s_MaxFeatures) +
126  " records. Please reduce the range and try again.";
127  return false;
128  }
129  return true;
130 }
131 
133 {
134  if (m_ZoomToSee) {
135  string msg = "Zoom to see if data exists for this region";
137  TModelUnit x = (range.GetFrom() + range.GetTo() ) * 0.5;
138  CSeqGlyph::TObjects objs;
139  CRef<CCommentGlyph> comment(new CCommentGlyph(msg, TModelPoint(x, 0.0)));
140  objs.push_back(comment);
141  CRef<CCommentConfig> config(new CCommentConfig(*x_GetGlobalConfig()->GetCommentConfig()));
142  config->m_ShowConnection = false;
143  SetCommentGlyphs(objs, config);
144  return;
145  }
147 }
148 
149 void CVcfTrack::x_LoadSettings(const string& preset_style, const TKeyValuePairs &settings)
150 {
151  CFeatureTrack::x_LoadSettings(preset_style, settings);
152  auto it = settings.find("zoom_to_see");
153  m_ZoomToSee = (it != settings.end() && NStr::StringToBool(it->second));
154 }
155 
157 {
158  // feature track doesn't use profile
159  ITERATE (TKeyValuePairs, iter, settings) {
160  try {
161  if (NStr::EqualNocase(iter->first, "Layout")) {
162  m_Layout = s_LayoutStrToValue(iter->second);
163  }
164  if (NStr::EqualNocase(iter->first, "ShowOnlyPathogenic")) {
166  CVcfFeatureDS* vcf_ds = dynamic_cast<CVcfFeatureDS*>(m_DS.GetPointer());
167  if (nullptr != vcf_ds) {
169  }
170  }
171  } catch (CException& e) {
172  LOG_POST(Warning << "CVcfTrack::x_LoadSettings() " << e.GetMsg());
173  }
174  }
175 }
176 
178 {
179  m_DS->ClearJobID(notify.GetJobID());
180  CRef<CObject> res_obj = notify.GetResult();
181  CSGJobResult* result = dynamic_cast<CSGJobResult*>(&*res_obj);
182  if (!result) {
183  LOG_POST(Error << "CVcfTrack::x_OnJobCompleted() notification for job \
184  does not contain results.");
185  return;
186  }
187  CSeqGlyph::TObjects& objs(result->m_ObjectList);
188  const size_t obj_size = objs.size();
189  bool compact_mode = (long)obj_size > m_CompactThreshold;
190  if (obj_size > 0) {
191  //!! we might want a separate section later!
192  CConstRef<CFeatureParams> conf(x_GetGlobalConfig()->GetFeatParams("dbvar"));
193  SetObjects(objs);
195  NON_CONST_ITERATE (CSeqGlyph::TObjects, iter, objs) {
196  CSeqGlyph* glyph = *iter;
197  glyph->SetHideLabel(compact_mode);
199  CVcfGlyph* vcf_glyph = dynamic_cast<CVcfGlyph*>(glyph);
200  if(vcf_glyph) {
201  vcf_glyph->SetConfig(conf);
202  } else {
203  CHistogramGlyph* hist_glyph = dynamic_cast<CHistogramGlyph*>(glyph);
204  if(hist_glyph) {
205  hist_glyph->SetConfig(*x_GetGlobalConfig());
206  }
207  }
208  }
209  string msg = ", total ";
210  msg += NStr::SizetToString(obj_size, NStr::fWithCommas);
211  if (obj_size > 1) {
212  msg += " features";
213  } else {
214  msg += " feature";
215  }
216  msg += " shown";
217  SetMsg(msg);
218  m_Attrs |= fNavigable;
219  }
220  else {
221  SetObjects(objs);
222  SetMsg(", no data");
223  }
224  x_UpdateLayout();
225 }
226 
227 
229 {
230  if (!GetChildren().empty()) {
231  TModelUnit tb_height = x_GetTBHeight();
232 
233  // for Associated results/GAP types of tracks, generate a separate area for the track caption
234  CHTMLActiveArea area;
236 
237  // adjust the bounds height to that of the caption only
238  TVPRect& bound(area.m_Bounds);
239  bound.SetBottom(bound.Top() + (TVPUnit)tb_height + (tb_height > 0.0 ? 2 : 0));
240 
241  // user uploaded tracks are not based on NA annots
242  // we don't need to generate signature for them
243  // otherwise CTrackContainer will create multiple signatures
244  // and sviewer will issue seqgraphic call to get track's tooltip
245  // we don't want that for user uploaded tracks
246 
248  if (!(m_Attrs & fNavigable))
250  p_areas->push_back(area);
251  return &(p_areas->back());
252  }
253  auto area = CLayoutTrack::InitHTMLActiveArea(p_areas);
254  if (area && isRmtBased()) // turn off navigation for VCFTabix
255  area->m_Flags |= CHTMLActiveArea::fNoNavigation;
256  return area;
257 }
258 
259 ///////////////////////////////////////////////////////////////////////////////
260 /// CVcfTrackFactory
261 ///////////////////////////////////////////////////////////////////////////////
264  ISGDataSourceContext* ds_context,
265  CRenderingContext* r_cntx,
266  const SExtraParams& params,
267  const TAnnotMetaDataList& src_annots) const
268 {
269  TAnnotNameTitleMap annots;
270  TTrackMap tracks;
271 
272  TKeyValuePairs track_settings;
273  CSGConfigUtils::ParseProfileString(params.m_TrackProfile, track_settings);
274 
275  if (!params.m_Annots.empty()) {
276  ITERATE(SExtraParams::TAnnots, iter, params.m_Annots) {
277  if (NStr::StartsWith(*iter, "ColumnarVCF_")) {
278  annots.insert(TAnnotNameTitleMap::value_type(*iter, ""));
279  }
280  }
281  } else {
282 
283  TSeqRange range = params.m_Range;
284  if (range.Empty()) {
285  range = r_cntx->GetVisSeqRange();
286  }
287 
288 
289  // collect VCF tracks
290  if ( !src_annots.empty() ) {
291  GetMatchedAnnots(ds_context, src_annots, params, annots);
292  }
293  }
294 
295  // create VCF tracks
296  ITERATE (TAnnotNameTitleMap, iter, annots) {
297  CRef<CVcfTrack> feat_track;
298  CIRef<ISGDataSource> ds = ds_context->GetDS(
299  typeid(CVcfFeatureDSType).name(), object);
300  CVcfFeatureDS* vcf_ds = dynamic_cast<CVcfFeatureDS*>(ds.GetPointer());
301  feat_track.Reset(new CVcfTrack(vcf_ds, r_cntx));
302  feat_track->SetAnnot(iter->first);
303  if ( !iter->second.empty() ) {
304  feat_track->SetTitle(iter->second);
305  }
306  tracks[iter->first] = feat_track.GetPointer();
307  }
308 
309  return tracks;
310 }
311 
313  const TAnnotMetaDataList& src_annots,
314  const ILayoutTrackFactory::SExtraParams& params,
315  TAnnotNameTitleMap& out_annots) const
316 {
317  //!!
318  // currently VCF annots are captured by the fact that they have special "ColumnarVCF_" prefix
319  // this prefix may change
320  for (auto& i : src_annots) {
321  if(NStr::StartsWith(i.first, "ColumnarVCF_")) {
323  i.first, i.second->m_Title));
324  }
325  }
326 }
327 
328 
330  ISGDataSourceContext* ds_context,
331  const TAnnotMetaDataList& src_annots,
332  const ILayoutTrackFactory::SExtraParams& params,
333  TAnnotNameTitleMap& out_annots) const
334 {
335  INonAsnDataRegistry *registry = dynamic_cast<INonAsnDataRegistry*>(ds_context);
336  if (nullptr == registry) {
337  return GetMatchedAnnots(src_annots, params, out_annots);
338  }
339  for (auto& i : src_annots) {
340  if (!registry->HasNonAsnData(i.first))
341  continue;
342 
343  out_annots.insert(TAnnotNameTitleMap::value_type(i.first, i.second->m_Title));
344  }
345 }
346 
347 
349 {
350  return CVcfTrack::m_TypeInfo.GetId();
351 }
352 
353 
355 {
357 }
358 
359 
361 CVcfTrackFactory::GetSettings(const string& /*profile*/,
362  const TKeyValuePairs& settings,
363  const CTempTrackProxy* track_proxy) const
364 {
365  //!! totally rework this, probably similar to CSnpTrackFactory::GetSettings()
366  CRef<CTrackConfigSet> config_set(new CTrackConfigSet);
368  config_set->Set().push_back(config);
369  config->SetHelp() = GetThisTypeInfo().GetDescr();
370  config->SetLegend_text("anchor_5");
371 
373  string hist_t = "0";
374  bool show_only_pathogenic {false};
375 
376  ITERATE (TKeyValuePairs, iter, settings) {
377  try {
378  if (NStr::EqualNocase(iter->first, "Rendering")) {
379  rendering_str = iter->second;
380  if (rendering_str == "Histogram") // support legacy value
381  rendering_str = "Heatmap";
382  } else if (NStr::EqualNocase(iter->first, "HistThreshold")) {
383  int val = NStr::StringToInt(iter->second);
384  if (val > 0) hist_t = iter->second;
385  }
386  else if (NStr::EqualNocase(iter->first, "ShowOnlyPathogenic")) {
387  show_only_pathogenic = NStr::StringToBool(iter->second);
388  }
389  } catch (CException& e) {
390  LOG_POST(Warning << "CVcfTrackFactory::x_LoadSettings() "
391  << e.GetMsg());
392  }
393  }
394 
395  string sort_by;
396  if (track_proxy) {
397  sort_by = track_proxy->GetSortBy();
398  }
399 
401  "Rendering", "Rendering options",
402  rendering_str,
403  "Rendering options for linked features.");
404 
405  choice->SetValues().push_back(
408  "Show all",
409  "All features, both parent and all child features",
410  "The bar on top represents the variant region. Each bar below represents \
411  the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
412  Green: A Gain or Insertion<br>Light Gray: An Inversion"));
413 
414  choice->SetValues().push_back(
417  "Show parent, Expand children upon a click",
418  "Show parent on one line and expand all children upon a mouse click.",
419  "The bar on top represents the variant region. The bars below appear upon a mouse click and each bar represents \
420  the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
421  Green: A Gain or Insertion<br>Light Gray: An Inversion"));
422 
423  choice->SetValues().push_back(
426  "Show parent, Merge children",
427  "Show parent on one line and all children merged below it.",
428  "The bar on top represents the variant region. The bar below represents \
429  all of the sample level variants merged onto a single line.<br>Red: A Deletion or Loss<br> \
430  Green: A Gain or Insertion<br>Light Gray: An Inversion"));
431 
432  choice->SetValues().push_back(
435  "Show children, not parent",
436  "Show only the supporting variants (chidlren) not the variant region (parent)",
437  "The bar represent supporting variants in this study.<br>Red: A Deletion or Loss<br>\
438  Green: A Gain or Insertion<br>Light Gray: An Inversion"));
439 
440  choice->SetValues().push_back(
443  "Show parent, not children ",
444  "Show the variant region (parent) not the supporting variants (children)",
445  "The bar represents the variant region."));
446 
447  choice->SetValues().push_back(
449  "SingleLine",
450  "Display on a single line",
451  "Track is displayed, with all features collapsed on a single line.",
452  "All the features are packed into one line."));
453  choice->SetValues().push_back(
455  "Heatmap",
456  "Heatmap",
457  "Track is displayed, with all features displayed as a heatmap.",
458  "All the features are packed and shown as a heatmap."));
459 
460  config->SetChoice_list().push_back(choice);
461 
462 
463  CRef<CTextBox> txt_box(new CTextBox);
464  txt_box->SetName("HistThreshold");
465  txt_box->SetValue(hist_t);
466  txt_box->SetDisplay_name("Heatmap Threshold");
467  txt_box->SetHelp("Display a heatmap when there are more features in this track than the value specificed."
468  " 'None' or '0' means threshold is disabled, and the display is up to 'Rendering Options'");
469  config->SetText_boxes().push_back(txt_box);
470 
471  config->SetCheck_boxes().push_back(
473  "ShowOnlyPathogenic",
474  "Show only pathogenic/likely pathogenic",
475  "Show only pathogenic/likely pathogenic",
476  "", show_only_pathogenic, true));
477 
478  return config_set;
479 }
480 
481 
User-defined methods of the data storage class.
static const map< string, CAlignmentTrack::ELayout > sm_LayoutMap
Checksum and hash calculation classes.
CAppJobNotification Notification send by CAppJobEventTranslator.
CCommentConfig – help config class for holding a set of settings for a comment glyph.
CCommentGlyph – utility class for having comments in graphical glyphs.
void x_UpdateLayout()
Definition: data_track.hpp:127
CFeatureTrack –.
static const string & LinkedFeatDisplayValueToStr(ELinkedFeatDisplay linked_feat)
CRef< CSGFeatureDS > m_DS
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings)
load the track settings.
void x_AdjustFeatureLayout()
virtual void x_UpdateData()
update track content.
@ eLayout_AdaptiveInline
adaptively switch between packed and inline
@ eLayout_ExpandedLayered
show all features with layered layout
@ eLayout_AdaptiveLayered
adaptively switch between packed and layered
int m_CompactThreshold
Feature number threshold between compact mode and non-compact mode.
void SetObjects(const CLayoutGroup::TObjectList &objs)
const CLayoutGroup::TObjectList & GetChildren() const
CRef< CLayeredLayout > m_Layered
void SetLayoutPolicy(ILayoutPolicy *policy)
Set policy on how to deploy the layout of its children.
void SetCommentGlyphs(const CSeqGlyph::TObjects &objs, CRef< CCommentConfig > config)
@ fNoNavigation
track title won't show navigation controls
@ fNoPin
tooltip is not pinnable
@ fTrack
track title bar
@ fNoSelection
the object can't be selected
int m_Flags
area flags, will need to replace m_Type
void SetConfig(const CSeqGraphicConfig &config)
TTrackAttrFlags m_Attrs
various track attributes
@ fNavigable
Track has navigation controls.
TModelUnit x_GetTBHeight() const
Get title bar height including margin.
void SetMsg(const string &msg)
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.
bool isRmtBased() const
CRef –.
Definition: ncbiobj.hpp:618
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)
CSGFeatureDS.
Definition: feature_ds.hpp:49
virtual bool AllJobsFinished() const
virtual void ClearJobID(TJobID job_id)
virtual void DeleteAllJobs()
Remove waiting jobs from queue or cancel the unfinished jobs.
CSGJobResult – the data structure holding the seqgraphic job results.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
Definition: seq_glyph.hpp:82
void x_InitHTMLActiveArea(CHTMLActiveArea &area) const
initialize the basic information for a given active area.
Definition: seq_glyph.cpp:380
CRenderingContext * m_Context
the rendering context
Definition: seq_glyph.hpp:346
virtual void SetHideLabel(bool)
Force to hide label.
Definition: seq_glyph.hpp:179
vector< CHTMLActiveArea > TAreaVector
Definition: seq_glyph.hpp:84
list< CRef< CSeqGlyph > > TObjects
Definition: seq_glyph.hpp:85
void SetRenderingContext(CRenderingContext *context)
Set the rendering context.
Definition: seq_glyph.hpp:684
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
Definition: static_map.hpp:175
TBase::const_iterator const_iterator
Definition: static_map.hpp:179
File Description:
const string & GetSortBy() const
CTextBox –.
Definition: TextBox.hpp:66
CTrackConfigSet –.
static CRef< objects::CChoice > CreateChoice(const string &name, const string &disp_name, const string &curr_val, const string &help, bool optional=false)
Definition: layout_conf.hpp:79
static CRef< objects::CCheckBox > CreateCheckBox(const string &name, const string &disp_n, const string &help_text, const string &legend_txt, bool value, bool optional=false)
Definition: layout_conf.hpp:96
static CRef< objects::CChoiceItem > CreateChoiceItem(const string &name, const string &disp_name, const string &help, const string &legend_txt, bool optional=false)
Definition: layout_conf.hpp:61
CTrackConfig –.
Definition: TrackConfig.hpp:66
CTrackTypeInfo - holds description of a layout track type.
const string & GetDescr() const
const string & GetId() const
CSGFeatureDSType.
Definition: vcf_ds.hpp:158
CVcfFeatureDS.
Definition: vcf_ds.hpp:110
void ShowOnlyPathogenic(bool show=true)
Definition: vcf_ds.hpp:143
size_t GetFeaturesCountInRange(const string &annot_name, const TSeqRange &range)
Definition: vcf_ds.cpp:273
void SetConfig(CConstRef< CFeatureParams > conf)
Definition: vcf_glyph.hpp:198
virtual string GetExtensionLabel() const override
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
Definition: vcf_track.cpp:354
virtual string GetExtensionIdentifier() const override
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
Definition: vcf_track.cpp:348
virtual TTrackMap CreateTracks(SConstScopedObject &object, ISGDataSourceContext *ds_context, CRenderingContext *r_cntx, const SExtraParams &params=SExtraParams(), const TAnnotMetaDataList &src_annots=TAnnotMetaDataList()) const override
CVcfTrackFactory.
Definition: vcf_track.cpp:263
virtual const CTrackTypeInfo & GetThisTypeInfo() const override
Definition: vcf_track.hpp:130
virtual CRef< objects::CTrackConfigSet > GetSettings(const string &profile, const TKeyValuePairs &settings, const CTempTrackProxy *track_proxy) const override
Definition: vcf_track.cpp:361
virtual void GetMatchedAnnots(const TAnnotMetaDataList &src_annots, const ILayoutTrackFactory::SExtraParams &params, TAnnotNameTitleMap &out_annots) const override
Definition: vcf_track.cpp:312
CVcfTrack –.
Definition: vcf_track.hpp:47
bool m_ZoomToSee
Definition: vcf_track.hpp:96
CVcfTrack(CSGFeatureDS *ds, CRenderingContext *r_cntx)
Definition: vcf_track.cpp:90
virtual bool CheckRange(TSeqRange range, string &sMsg, size_t &nFeats) override
Definition: vcf_track.cpp:111
virtual void x_UpdateData() override
update track content.
Definition: vcf_track.cpp:132
virtual void x_OnJobCompleted(CAppJobNotification &notify) override
Definition: vcf_track.cpp:177
virtual const CTrackTypeInfo & GetTypeInfo() const override
Definition: vcf_track.cpp:105
virtual ~CVcfTrack()
Definition: vcf_track.cpp:97
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const override
Initialize the HTML active area for a track.
Definition: vcf_track.cpp:228
bool m_ShowOnlyPathogenic
Definition: vcf_track.hpp:97
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings) override
load the track settings.
Definition: vcf_track.cpp:149
static CTrackTypeInfo m_TypeInfo
Definition: vcf_track.hpp:95
virtual void x_ParseSettings(const TKeyValuePairs &settings) override
Definition: vcf_track.cpp:156
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
Definition: map.hpp:152
iterator_bool insert(const value_type &val)
Definition: map.hpp:165
bool empty() const
Definition: map.hpp:149
const_iterator find(const key_type &key) const
Definition: map.hpp:153
static CMemoryRegistry registry
Definition: cn3d_tools.cpp:81
struct config config
@ eLFD_Default
@ eLFD_Expandable
@ eLFD_ParentHidden
@ eLFD_Hidden
@ eLFD_Packed
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
Definition: ncbidiag.cpp:2622
CDiagContext & GetDiagContext(void)
Get diag context instance.
Definition: logging.cpp:818
CDiagContext_Extra Extra(void) const
Create a temporary CDiagContext_Extra object.
Definition: ncbidiag.hpp:2095
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
Definition: ncbidiag.hpp:226
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
const string & GetMsg(void) const
Get message string.
Definition: ncbiexpt.cpp:461
void Warning(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1191
GLdouble TModelUnit
Definition: gltypes.hpp:48
int TVPUnit
Definition: gltypes.hpp:47
CGlPoint< TModelUnit > TModelPoint
Definition: gltypes.hpp:51
CRef< CObject > GetResult() const
returns non-null pointer only if Completed or Running and has temporary results available
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static bool StringToBool(const CTempString str)
Convert string to bool.
Definition: ncbistr.cpp:2821
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
Definition: ncbistr.cpp:2751
#define kEmptyStr
Definition: ncbistr.hpp:123
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
Definition: ncbistr.cpp:630
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
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.
Definition: ncbistr.hpp:673
@ fWithCommas
Use commas as thousands separator.
Definition: ncbistr.hpp:254
Tdata & Set(void)
Assign a value to data member.
int i
range(_Ty, _Ty) -> range< _Ty >
constexpr bool empty(list< Ts... >) noexcept
T bound(T x_, T xlo_, T xhi_)
extra parameter for initializing a track.
TAnnots m_Annots
particular annotations the track will be looking at.
TSeqRange m_Range
The requested range we want to look at.
string m_TrackProfile
Track setting profile for additionial parameters.
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
Definition: static_set.hpp:60
else result
Definition: token2.c:20
static const TLayoutStr s_LayoutStrs[]
Definition: vcf_track.cpp:56
USING_SCOPE(objects)
SStaticPair< const char *, CFeatureTrack::ELayout > TLayoutStr
CVcfTrack.
Definition: vcf_track.cpp:55
static CFeatureTrack::ELayout s_LayoutStrToValue(const string &layout)
Definition: vcf_track.cpp:66
const string & s_LayoutValueToStr(CFeatureTrack::ELayout layout)
Definition: vcf_track.cpp:76
DEFINE_STATIC_ARRAY_MAP(TLayoutMap, sm_LayoutMap, s_LayoutStrs)
CStaticArrayMap< string, CFeatureTrack::ELayout > TLayoutMap
Definition: vcf_track.cpp:63
Modified on Mon Apr 22 04:05:19 2024 by modify_doxy.py rev. 669887