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

Go to the SVN repository for this file.

1 /* $Id: graph_track.cpp 47485 2023-05-02 14:46:59Z ucko $
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, Dmitry Rudnev, Andrei Shkeda
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
39 //#include <gui/widgets/seq_graphic/seqgraphic_widget.hpp>
46 //#include <gui/widgets/wx/ui_command.hpp>
47 
48 #include <gui/objutils/utils.hpp>
49 #include <gui/objutils/label.hpp>
50 
53 
55 #include <corelib/rwstream.hpp>
57 #include <serial/objistr.hpp>
58 #include <serial/objostr.hpp>
59 #include <serial/serial.hpp>
60 #include <util/checksum.hpp>
61 
62 #include <wx/menu.h>
63 
64 
67 
68 
69 ///////////////////////////////////////////////////////////////////////////////
70 /// CGraphTrack
71 
72 static const string kTrackTitle = "Graphs";
73 static const string kScale = "scale";
74 static const string kStoredScale = "stored_scale";
75 static const string kClipOutliers = "clip";
76 static const string kOutlierColor = "ocolor";
77 static const string kSDeviationThreshold = "sdthresh";
78 static const string kValueRange = "range";
79 static const string kNumBins = "num_bins";
80 
81 static const string kNegColor = "neg_color";
82 
83 const string CGraphTrack::kOverlayed = "_overlayed"; // used to suffix annot name for the overl;ayed tracks
84 
86  "Graph track");
87 
89 static const bool kDefaultFixedScale = false;
90 
91 static
92 string s_GetCacheKey(const string& annot_name)
93 {
95  cs.AddLine(annot_name);
96  string key = cs.GetHexSum();
97  key += "_ylimits";
98  return key;
99 }
100 
102  : CDataTrack(r_cntx)
103  , m_DS(ds)
104  , m_FixedScale(kDefaultFixedScale)
105  , m_Layout(kDefaultLayout)
106 {
109  m_DS->SetJobListener(this);
111 
113  eIcon_Settings, "Settings", true, "track_settings"));
114 
115  // initialize annotation selector
116  if (m_DS->IsSeqTable()) {
118  } else {
120  }
121 }
122 
123 
125 {
126  if ( !m_DS->AllJobsFinished() ) {
127  m_DS->DeleteAllJobs();
128  }
129 }
130 
131 
133 {
134  return m_TypeInfo;
135 }
136 
138 {
140 }
141 
142 
144 {
146 }
147 
148 
150 {
151 
154 }
155 
156 
158 {
159 
160  // for cases that there is only one graph, we initialize
161  // it differently.
162  if (GetChildren().size() == 1) {
163  TModelUnit tb_height = x_GetTBHeight();
164 
165  // get child/graph's signature
166  if (GetId().empty()) {
167  GetChildren().front()->GetHTMLActiveAreas(p_areas);
168  } else {
169  TAreaVector areas;
170  GetChildren().front()->GetHTMLActiveAreas(&areas);
171  for (auto& area : areas) {
172  area.m_ParentId = GetId();
173  area.m_Descr.clear();
174  area.m_Flags &= ~CHTMLActiveArea::fTooltipEmbedded;
176  && !m_Title.empty()
177  && area.m_Signature != "otl" /* exlude outlier tooltips*/) {
178  area.m_Descr = m_Title;
179  }
180  }
181  p_areas->insert(p_areas->end(), areas.begin(), areas.end());
182  }
183 
184  // but use track range and size
185  CHTMLActiveArea& area = p_areas->back();
187  TVPRect& bound = area.m_Bounds;
188  bound.SetBottom(bound.Top() + (TVPUnit)tb_height + (tb_height > 0.0 ? 2 : 0));
189  // add is_track flag
191  return &area;
192  }
193  return CLayoutTrack::InitHTMLActiveArea(p_areas);
194 }
195 
196 
197 void CGraphTrack::SetAnnot(const string& annot)
198 {
199  m_AnnotName = annot;
200  m_Sel.ResetAnnotsNames();
203  m_Sel.AddUnnamedAnnots();
204  } else {
205  m_Sel.AddNamedAnnots(m_AnnotName);
206  if (NStr::StartsWith(m_AnnotName, "NA0")) {
207  if (m_AnnotName.find(".") == string::npos) {
208  m_AnnotName += ".1";
209  }
210  m_Sel.IncludeNamedAnnotAccession(m_AnnotName);
211  }
212  }
213 }
214 
215 
217 {
219  : m_Height(-1)
220  {}
221 
222  int m_Height;
223  string m_Type;
224  string m_Color;
225 };
226 
227 
229 {
231  string cache_svc = reg.GetString("Configuration", "service", "NC_SV_Conf_PROD");
232  string cache_name = reg.GetString("Configuration", "cache", "conf");
233  return CNetICacheClient(cache_svc, cache_name, "sviewer");
234 }
235 
237 {
238  static CNetICacheClient cache_instance(s_InitICache());
239  return cache_instance;
240 }
241 
243 {
244  if (NStr::EqualNocase(layout, "layered"))
245  return eLayout_Layered;
246  if (NStr::EqualNocase(layout, "overlay"))
247  return eLayout_Overlay;
248  return eLayout_Layered;
249 }
250 
252 {
253  switch (layout) {
254  case eLayout_Layered:
255  return "layered";
256  case eLayout_Overlay:
257  return "overlay";
258  default:
259  break;
260  }
261  return "layered";
262 }
263 
264 
265 void CGraphTrack::x_LoadSettings(const string& /*preset_style*/,
266  const TKeyValuePairs& settings)
267 {
269  if (!m_gConfig)
270  return;
271  // Load min/max for Y axis
272  if (m_gConfig->GetCgiMode()) try {
274  string key = s_GetCacheKey(m_AnnotName);
275  if (icache.HasBlobs(key, NcbiEmptyString)) {
277  unique_ptr<IReader> reader(icache.GetReadStream(key, 0, ""));
278  unique_ptr<CNcbiIstream> strm(new CRStream(reader.release(), 0, 0, CRWStreambuf::fOwnReader));
279  unique_ptr<CObjectIStream> obj_str(CObjectIStream::Open(eSerial_AsnBinary, *strm));
280  *obj_str >> *uo;
281  obj_str->Close();
282  if (uo->HasField("min"))
283  m_YLimits.min = min(m_YLimits.min, uo->GetField("min").GetData().GetReal());
284  if (uo->HasField("max"))
285  m_YLimits.max = max(m_YLimits.max, uo->GetField("max").GetData().GetReal());
286  }
287  } catch (exception& e) {
288  ERR_POST(Error << e.what());
289  }
290 
291  SCustomizedHistSettings hist_settings;
292  // Parse known parameters
293  bool parameter_present = false, smooth_curve = false;
294  string scale, clip_outliers, outlier_color, sd_thresh, stored_scale, num_bins, neg_color, value_range;
295  int opacity = 100;
296  int fit_step = 4;
297  ITERATE (TKeyValuePairs, iter, settings) {
298  try {
299  // cerr << "==== key: " << iter->first << ", value: " << iter->second << endl;
300  if (NStr::EqualNocase(iter->first, "fixed_scale")) {
301  m_FixedScale = NStr::StringToBool(iter->second);
302  } else
303  if (NStr::EqualNocase(iter->first, "layout")) {
304  m_Layout = x_LayoutStrToValue(iter->second);
305  } else if (NStr::EqualNocase(iter->first, "color")) {
306  hist_settings.m_Color = iter->second;
307  parameter_present = true;
308  } else if (NStr::EqualNocase(iter->first, "opacity")) {
309  opacity = NStr::StringToInt(iter->second, NStr::fConvErr_NoThrow);
310  opacity = (opacity <= 0) ? 100 : min(opacity, 100);
311  parameter_present = true;
312  } else if (NStr::EqualNocase(iter->first, "height")) {
313  hist_settings.m_Height = NStr::StringToInt(iter->second);
314  parameter_present = true;
315  } else if (NStr::EqualNocase(iter->first, "style")) {
316  hist_settings.m_Type = iter->second;
317  parameter_present = true;
318  } else if (NStr::EqualNocase(iter->first, kScale)) {
319  scale = iter->second;
320  parameter_present = true;
321  } else if (NStr::EqualNocase(iter->first, kStoredScale) || NStr::EqualNocase(iter->first, "is_scaled")) {
322  stored_scale = iter->second;
323  parameter_present = true;
324  //} else if (NStr::EqualNocase(iter->first, kClipOutliers)) {
325  // clip_outliers = iter->second;
326  // parameter_present = true;
327  } else if (NStr::EqualNocase(iter->first, kOutlierColor)) {
328  outlier_color = iter->second;
329  parameter_present = true;
330  } else if (NStr::EqualNocase(iter->first, kSDeviationThreshold)) {
331  sd_thresh = iter->second;
332  parameter_present = true;
333  } else if (NStr::EqualNocase(iter->first, kNegColor)) {
334  neg_color = iter->second;
335  parameter_present = true;
336  } else if (NStr::EqualNocase(iter->first, kNumBins)) {
337  num_bins = iter->second;
338  parameter_present = true;
339  } else if (NStr::EqualNocase(iter->first, kValueRange)) {
340  value_range = iter->second;
341  parameter_present = true;
342  } else if (NStr::EqualNocase(iter->first, "smooth_curve")) {
343  try {
344  smooth_curve = NStr::StringToBool(iter->second);
345  } catch (exception& e) {
346  ERR_POST(Error << e.what());
347  }
348  parameter_present = true;
349  } else if (NStr::EqualNocase(iter->first, "fit_step")) {
350  fit_step = NStr::StringToInt(iter->second);
351  fit_step = max<int>(fit_step, 1);
352  parameter_present = true;
353  }
354  } catch (std::exception&) {
355  LOG_POST(Error << "CGraphTrack::x_LoadSettings: invalid settings "
356  << iter->second);
357  }
358  }
359  // cerr << "==== scale: " << scale << endl;
360  // cerr << "==== stored_scale: " << stored_scale << endl;
361 
362  if (!parameter_present)
363  return;
364 
366  CRef<CHistParams> hist_conf;
367 
368  if (conf_mgr->HasSettings(m_AnnotName)) {
369  // Get the corresponding setting for this data track if exists
370  hist_conf = conf_mgr->GetHistParams(m_AnnotName);
371  } else {
372  CRef<CHistParams> def_conf = conf_mgr->GetDefHistParams();
373  hist_conf.Reset(new CHistParams(*def_conf));
374  conf_mgr->AddSettings(m_AnnotName, hist_conf);
375  }
376 
377  try {
378  if ( !hist_settings.m_Color.empty() ) {
379  CRgbaColor color(hist_settings.m_Color);
380  hist_conf->m_fgColor = color;
381 
382  // We also use the only color setting as the main color
383  // for smear bar or heat map, but use darken version as
384  // the max color and lighten version as min color.
385  hist_conf->m_SmearColorMax = color;
386  hist_conf->m_SmearColorMin = color;
387  hist_conf->m_SmearColorMin.Lighten(0.5f);
388  hist_conf->m_SmearColorMin.SetAlpha(0.4f);
389  }
390  if (!neg_color.empty())
391  hist_conf->m_fgNegColor = CRgbaColor(neg_color);
392  float alpha = opacity;
393  alpha /= 100.;
394  hist_conf->m_fgColor.SetAlpha(alpha);
395  hist_conf->m_SmearColorMax.SetAlpha(alpha);
396  hist_conf->m_SmearColorMin.SetAlpha(alpha);
397  hist_conf->m_fgNegColor.SetAlpha(alpha);
398 
399  hist_conf->m_SmoothCurve = smooth_curve;
400  hist_conf->m_FitStep = fit_step;
401 
402  if ( !hist_settings.m_Type.empty() ) {
404  hist_conf->m_Type = style;
405 
406  if (style == CHistParams::eSmearBar) {
407  // use a different default height for smearbar from histgoram
408  hist_conf->m_Height = 10.0;
409 
410  // for smearbar, change the background color to use lighter
411  // version of foreground color, and enable background color
412  hist_conf->m_DrawBg = true;
413  hist_conf->m_bgColor = hist_conf->m_fgColor;
414  hist_conf->m_bgColor.Lighten(0.8f);
415  hist_conf->m_bgColor.SetAlpha(0.2f);
416  }
417  }
418 
419  if (hist_settings.m_Height > 0) {
420  // use user-provided size
421  hist_conf->m_Height = hist_settings.m_Height;
422  }
423 
424  if (!scale.empty()) {
425  hist_conf->m_Scale = CHistParams::ScaleStrToValue(scale);
426  }
427 
428  if (!stored_scale.empty()) {
429  hist_conf->m_StoredScale = CHistParams::ScaleStrToValue(stored_scale);
430  }
431 
432  if (!clip_outliers.empty()) {
433  hist_conf->m_ClipOutliers = NStr::StringToBool(clip_outliers);
434  }
435 
436  if (!outlier_color.empty()) {
437  hist_conf->m_OutlierColor.FromString(outlier_color);
438  }
439 
440  if (!sd_thresh.empty()) {
441  hist_conf->m_SDeviationThreshold = NStr::StringToInt(sd_thresh);
442  }
443 
444  if (!num_bins.empty()) {
446  hist_conf->m_NumBins = min(hist_conf->m_NumBins, 10);
447  }
448 
449  if (!value_range.empty()) {
450  string range_min, range_max;
451  CTrackConfigUtils::DecodeValueRange(value_range, range_min, range_max, hist_conf->m_RangeAutoscale);
452  if (!range_min.empty() && range_min != "inf") {
453  hist_conf->m_ValueRange.SetFrom(NStr::StringToNumeric<float>(range_min, NStr::fConvErr_NoThrow));
454  }
455  if (!range_max.empty() && range_max != "inf") {
456  hist_conf->m_ValueRange.SetTo(NStr::StringToNumeric<float>(range_max, NStr::fConvErr_NoThrow));
457  }
458  bool not_empty = hist_conf->m_ValueRange.GetFrom() != hist_conf->m_ValueRange.GetEmptyFrom()
459  && hist_conf->m_ValueRange.GetTo() != hist_conf->m_ValueRange.GetEmptyTo();
460  if (not_empty) {
461  // swap if from > to
462  if (hist_conf->m_ValueRange.GetFrom() > hist_conf->m_ValueRange.GetTo()) {
463  hist_conf->m_ValueRange.Set(hist_conf->m_ValueRange.GetTo(), hist_conf->m_ValueRange.GetFrom());
464  }
465  }
466 
467  }
468 
469  } catch (std::exception&) {
470  LOG_POST(Error << "CGraphTrack::x_LoadSettings: invalid histogram settings");
471  }
472 }
473 
474 
475 void CGraphTrack::x_SaveSettings(const string& /*preset_style*/)
476 {
477  vector<string> settings;
479  settings.push_back("fixed_scale:" + NStr::BoolToString(m_FixedScale));
480  if (m_Layout != kDefaultLayout)
481  settings.push_back("layout:" + x_LayoutValueToStr(m_Layout));
482  string profile = settings.empty() ? NcbiEmptyString : NStr::Join(settings, ",");
483  SetProfile(profile);
484 }
485 
486 
488  switch (id) {
489  case eIcon_Settings:
491  break;
492  default:
493  // use default handlers
495  }
496 }
497 
498 
500 {
501  m_DS->DeleteAllJobs();
504 }
505 
506 
508 {
509  m_DS->ClearJobID(notify.GetJobID());
510  CRef<CObject> res_obj = notify.GetResult();
511  CSGJobResult* result = dynamic_cast<CSGJobResult*>(&*res_obj);
512  if (!result) {
513  ERR_POST("CGraphTrack::x_OnJobCompleted() notification for job \
514  does not contain results.");
515  return;
516  }
517 
518  SetGroup().Clear();
519  SetMsg("");
520  size_t count = result->m_ObjectList.size();
521  if (count > 0) {
522  TObjects& objs = result->m_ObjectList;
523  vector<string> titles;
525 
526  NON_CONST_ITERATE (CSeqGlyph::TObjects, iter, objs) {
527  CHistogramGlyph* hist =
528  dynamic_cast<CHistogramGlyph*>(iter->GetPointer());
529  hist->SetConfig(*x_GetGlobalConfig());
530  string title = hist->GetTitle();
531  m_YLimits.max = max((double)hist->GetAxisMax(), m_YLimits.max);
532  m_YLimits.min = min((double)hist->GetAxisMin(), m_YLimits.min);
533 
534  //title += ", Max:" + NStr::UIntToString((int)hist->GetAxisMax());
535  //title += " / Min:" + NStr::UIntToString((int)hist->GetAxisMin());
536  titles.push_back(title);
537  }
538  // Save min/max for Y axis
539  if (m_gConfig && m_gConfig->GetCgiMode()
540  && (m_YLimits.min != y_limits.min || m_YLimits.max != y_limits.max)) try {
543  uo->SetType().SetStr("YLimits");
544  uo->AddField("min", m_YLimits.min);
545  uo->AddField("max", m_YLimits.max);
546  string key = s_GetCacheKey(m_AnnotName);
547  unique_ptr<IWriter> writer(icache.GetWriteStream(key, 0, NcbiEmptyString));
548  unique_ptr<CNcbiOstream> strm(new CWStream(writer.release(), 0, 0, CRWStreambuf::fOwnWriter));
549  unique_ptr<CObjectOStream> obj_str(CObjectOStream::Open(eSerial_AsnBinary, *strm));
550  *obj_str << *uo;
551  obj_str->Close();
552  } catch (exception& e) {
553  ERR_POST(Error << e.what());
554  }
555 
556  if (count == 1) {
557  CHistogramGlyph* hg =
558  dynamic_cast<CHistogramGlyph*>(objs.front().GetPointer());
559  _ASSERT(hg);
564  Add(objs.front());
567  }
568  if (m_Title.empty())
569  m_Title = titles[0];
570  else if (NStr::StartsWith(titles[0], "NA")) {
571  hg->SetDesc(m_Title);
572  }
573 
574  SetObjects(objs);
575  } else {
576  string msg = ", " + NStr::SizetToString(count) + " graph";
577  msg += (count != 1 ? "s shown" : " shown");
578  SetMsg(msg);
579  if (m_Title.empty())
582 
584  CHistogramGlyph* hg =
585  dynamic_cast<CHistogramGlyph*>(iter->GetPointer());
586  _ASSERT(hg);
589  Add(*iter);
590  }
593  } else {
594  int i = 0;
596  config->m_LabelColor = CRgbaColor("blue");
597  config->m_ShowConnection = false;
599  {
600  CRef<CLayoutGroup> group(new CLayoutGroup);
601  Add(group);
602  group->SetLayoutPolicy(m_Simple);
604  new CCommentGlyph(titles[i++], *iter));
605  label->SetConfig(config);
606  group->PushBack(label);
607  CHistogramGlyph* hg =
608  dynamic_cast<CHistogramGlyph*>(iter->GetPointer());
609  _ASSERT(hg);
610  if (hg->GetAnnotName().empty())
613 
614  group->PushBack(*iter);
615  }
617  }
618  }
619  }
620 
621  x_UpdateLayout();
622 }
623 
625 {
626  CTrackProxy* track_proxy = 0;
628  {
629  track_proxy = dynamic_cast<CTrackProxy*>(&**iter);
630  if (!track_proxy)
631  continue;
632  if ((*iter)->GetOrder() == order)
633  return track_proxy;
634  }
635  return 0;
636 }
637 
638 
640 {
641  wxMenu menu;
642  UseDefaultMarginWidth(menu);
643  int id_base = 10000;
644  wxMenuItem* item = menu.AppendCheckItem(id_base++, wxT("Fixed scale"));
645  if (m_FixedScale) {
646  item->Check();
647  }
648  vector<CRef<CHistogramGlyph>> graphs;
649  vector<wxMenuItem*> settings_menu;
650  x_CollectAllGraphs(graphs);
651  if (!graphs.empty()) {
652  menu.AppendSeparator();
653  for (auto graph : graphs) {
654  wxString s = ToWxString(graph->GetTitle());
655  static const int kMaxMenuItemLen = 50;
656  if (s.Length() > kMaxMenuItemLen) {
657  s.Truncate(kMaxMenuItemLen - 3);
658  s.Pad(3, '.');
659  }
660  settings_menu.push_back(menu.AppendCheckItem(id_base++, s));
661  }
662  }
663 
664  CTrackContainer* p_track = dynamic_cast<CTrackContainer*>(GetParentTrack());
665  wxMenuItem* move_item = 0;
666  if (p_track && p_track->GetParentTrack() != 0) { // if it's inside a graph container
667  menu.AppendSeparator();
668  move_item = menu.AppendCheckItem(id_base, wxT("Remove from parent container"));
669 // CUICommandRegistry::GetInstance().AppendMenuItem(menu, eCmdRemoveTrackFromOverlay);
670  }
671 
672  m_LTHost->LTH_PopupMenu(&menu);
673 
674  if (m_FixedScale != item->IsChecked()) {
675  m_FixedScale = item->IsChecked();
676  x_UpdateData();
677  }
678  for (size_t i = 0; i < settings_menu.size() && i < graphs.size(); ++i) {
679  if (!settings_menu[i]->IsChecked())
680  continue;
681  graphs[i]->RunSettingsDialog();
682  break;
683  }
684  if (move_item && move_item->IsChecked()) {
685  CTrackContainer* top_container = dynamic_cast<CTrackContainer*>(p_track->GetParentTrack());
686  if (!top_container)
687  return;
688  CRef<CTempTrackProxy> proxy(0);
690  {
691  if ((*iter)->GetOrder() == GetOrder()) {
692  proxy.Reset(*iter);
693  }
694  }
695  if (!proxy)
696  return;
697  CTrackProxy* parent_proxy(s_FindTrackProxy(*top_container, p_track->GetOrder()));
698  _ASSERT(parent_proxy);
699  if (!parent_proxy)
700  return;
701 
702  // Find order for the removed track
703  int new_order = 1;
704  ITERATE(CTrackProxy::TTrackProxies, ch_it, top_container->GetSubtrackProxies()) {
705  if ((*ch_it)->GetOrder() >= new_order) {
706  new_order = (*ch_it)->GetOrder() + 1;
707  }
708  }
709 
711  if ((*it)->GetOrder() == GetOrder()) {
712  VECTOR_ERASE(it, parent_proxy->GetChildren());
713  break;
714  }
715  }
716  p_track->RemoveTrack(GetOrder());
717 
718  CRef<CTrackProxy> n_proxy(new CTrackProxy);
719  n_proxy->CTempTrackProxy::operator=(*proxy);
720  n_proxy->SetKey("graph_track");
721  n_proxy->SetOrder(new_order);
722  n_proxy->SetTrack(proxy->GetTrack());
723  n_proxy->GetTrack()->SetShowTitle(true);
724  CGraphTrack* gt = dynamic_cast<CGraphTrack*>(n_proxy->GetTrack());
725  _ASSERT(gt);
726  if (gt) {
727  CTrackProxy::TAnnots annots;
728  annots.push_back(gt->GetAnnot());
729  n_proxy->SetAnnots(annots);
730  gt->SetLayout(CGraphTrack::eLayout_Layered);
731  }
732  top_container->AddTrackProxy(n_proxy.GetPointer());
733  // Move right after the fromer parent track
734  top_container->MoveTrack(new_order, GetOrder() + 1);
735 
736  if (p_track->GetChildren().empty()) {
737  top_container->RemoveTrack(p_track->GetOrder());
738  }
739  top_container->Update(true);
740  }
741 }
742 
743 
745 {
746  CTrackContainer* p_track = dynamic_cast<CTrackContainer*>(GetParentTrack());
747  if (!p_track)
748  return false;
749  vector<int> tracks2remove; // tracks that will be removed from the main panel
750  const CTrackProxy* current_track_proxy = s_FindTrackProxy(*p_track, GetOrder());
751  if (!current_track_proxy)
752  return false;
753  tracks2remove.push_back(current_track_proxy->GetOrder());
754 
755  CRef<CTempTrackProxy> new_track(new CTrackProxy(current_track_proxy->GetOrder(),
756  "graph overlay", true, "graph_overlay", NcbiEmptyString));
757  if (!current_track_proxy->GetId().empty())
758  new_track->SetSubTracks().push_back(current_track_proxy->GetId());
759  else {
760  copy(current_track_proxy->GetAnnots().begin(), current_track_proxy->GetAnnots().end(),
761  back_inserter(new_track->SetSubTracks()));
762  }
763  int order = 1;
764  CRef<CTempTrackProxy> subtrack_proxy = current_track_proxy->Clone();
765  subtrack_proxy->SetOrder(order++);
766  new_track->GetChildren().push_back(subtrack_proxy);
767 
768  NON_CONST_ITERATE(vector<CRef<CGraphTrack>>, it, tracks) {
769  CGraphTrack* gt = &**it;
770  current_track_proxy = s_FindTrackProxy(*p_track, gt->GetOrder());
771  if (!current_track_proxy)
772  continue;
773  _ASSERT(current_track_proxy->GetKey() == "graph_track");
774  CRef<CTempTrackProxy> subtrack_proxy(current_track_proxy->Clone());
775  subtrack_proxy->SetOrder(order++);
776  new_track->GetChildren().push_back(subtrack_proxy);
777 
778  if (!current_track_proxy->GetId().empty())
779  new_track->SetSubTracks().push_back(current_track_proxy->GetId());
780  else {
781  copy(current_track_proxy->GetAnnots().begin(), current_track_proxy->GetAnnots().end(),
782  back_inserter(new_track->SetSubTracks()));
783  }
784  tracks2remove.push_back(gt->GetOrder());
785  }
786  string track_source = "graphs:";
787  track_source += NStr::Join(new_track->GetSubTracks(), "-");
788 
790  annots.push_back(track_source);
791  new_track->SetAnnots(annots);
792 
794  CRef<CHistParams> overlay_params = conf_mgr->GetHistParams(track_source);
795  CRef<CHistParams> this_params = conf_mgr->GetHistParams(m_AnnotName);
796  *overlay_params = *this_params;
797 
798  ITERATE(vector<int>, it, tracks2remove) {
799  p_track->RemoveTrack(*it);
800  }
801 
802  p_track->AddNewTrack(dynamic_cast<CTrackProxy*>(&*new_track));
803  return true;
804 }
805 
806 
807 ///////////////////////////////////////////////////////////////////////////////
808 /// CGraphTrackFactory methods
809 static const string kSeqTable = "seq-table";
810 static const string kSeqGraph = "seq-graph";
811 
814  ISGDataSourceContext* ds_context,
815  CRenderingContext* r_cntx,
816  const SExtraParams& params,
817  const TAnnotMetaDataList& src_annots) const
818 {
819  // we need to separate tracks stored as seq-graph from seq-table
820  // to initialize then differently.
821  typedef map<string, TAnnotNameTitleMap> TAnnotGroup;
822  TAnnotGroup annot_group;
824  annot_group.insert(TAnnotGroup::value_type(kSeqGraph, TAnnotNameTitleMap()));
825 
826  TKeyValuePairs track_settings;
827  CSGConfigUtils::ParseProfileString(params.m_TrackProfile, track_settings);
828  string graph_cache_key;
829  CTrackUtils::GetKey(track_settings, "graph_cache_key", graph_cache_key);
830  bool is_cached_bigwig = false;
831  if (!graph_cache_key.empty()) {
832  string rmt_type;
833  CTrackUtils::GetKey(track_settings, "rmt_type", rmt_type);
834  is_cached_bigwig = NStr::EqualNocase(rmt_type, "bigWig");
835  }
836 
837 // LOG_POST(Trace << "params.m_Annot.size(): " << params.m_Annots.size() <<
838 // ", params.m_SkipGenuineCheck: " << params.m_SkipGenuineCheck <<
839 // ", params.m_CoverageGraphCheck: " << params.m_CoverageGraphCheck);
840  if (is_cached_bigwig) {
841  // skip all annot discovery for remote tracks
842  annot_group[kSeqGraph].insert(TAnnotNameTitleMap::value_type(params.m_Annots.front(), ""));
843  } else if (params.m_SkipGenuineCheck && !params.m_Annots.empty()) {
844  bool isCoverageCheckFinished{false};
845  if (params.m_CoverageGraphCheck) {
846  try {
847  // filter out the seq-table annots
848  TAnnotNameTitleMap seqtable_annots;
850  sel.ExcludeNamedAnnots("SNP");
851  CIRef<ISGDataSource> ds = ds_context->GetDS(
852  typeid(CSGGraphDSType).name(), object);
853  CSGGraphDS* graph_ds = dynamic_cast<CSGGraphDS*>(ds.GetPointer());
854  graph_ds->SetDepth(params.m_Level);
855  graph_ds->SetAdaptive(params.m_Adaptive);
856  graph_ds->GetAnnotNames(sel, TSeqRange::GetWhole(), seqtable_annots, true);
857 
858  // LOG_POST(Trace << "seqtable_annots.size(): " << seqtable_annots.size());
859  // for(auto i_seqtable_annots: seqtable_annots) {
860  // LOG_POST(Trace << i_seqtable_annots.first << ": " << i_seqtable_annots.second);
861  // }
862 
863  ITERATE (SExtraParams::TAnnots, iter, params.m_Annots) {
864  if (seqtable_annots.count(*iter) > 0) {
865  annot_group[kSeqTable].insert(TAnnotNameTitleMap::value_type(*iter, ""));
866  // LOG_POST(Trace << "adding to annot_group[kSeqTable]: " << *iter);
867  } else {
868  annot_group[kSeqGraph].insert(TAnnotNameTitleMap::value_type(*iter, ""));
869  // LOG_POST(Trace << "adding to annot_group[kSeqGraph]: " << *iter);
870  }
871  }
872  isCoverageCheckFinished = true;
873  } NCBI_CATCH("CGraphTrackFactory::CreateTracks()");
874  }
875  if(!isCoverageCheckFinished) {
876  // For this mode, there is no need to worry about if the given graph track
877  // is from seq-table or seq-graph (those info won't be used at all)
878  ITERATE (SExtraParams::TAnnots, iter, params.m_Annots) {
879  annot_group[kSeqGraph].insert(TAnnotNameTitleMap::value_type(*iter, ""));
880 // LOG_POST(Trace << "adding to annot_group[kSeqGraph]: " << *iter);
881  }
882  }
883  } else {
884  // collect non-NA tracks
885  CIRef<ISGDataSource> ds = ds_context->GetDS(
886  typeid(CSGGraphDSType).name(), object);
887  CSGGraphDS* graph_ds = dynamic_cast<CSGGraphDS*>(ds.GetPointer());
888  graph_ds->SetDepth(params.m_Level);
889  graph_ds->SetAdaptive(params.m_Adaptive);
890 
892  sel.ExcludeNamedAnnots("SNP");
893 // LOG_POST(Trace << "GetAnnotNames() into annot_group[kSeqGraph]");
894  graph_ds->GetAnnotNames(sel, r_cntx->GetVisSeqRange(), annot_group[kSeqGraph]);
895 // LOG_POST(Trace << "got annot_group[kSeqGraph].size() annots: " << annot_group[kSeqGraph].size());
896 
897  // collect NA tracks
898  // For graph track we don't collect NA tracks if it is
899  // not explicitly specified due to potential large number
900  // of NA tracks.
901 // LOG_POST(Trace << "Checking src_annots.size() using GetMatchedAnnots: " << src_annots.size());
902  if ( !src_annots.empty() && !params.m_Annots.empty() ) {
903  GetMatchedAnnots(src_annots, params, annot_group[kSeqGraph]);
904 // LOG_POST(Trace << "got annot_group[kSeqGraph].size() annots: " << annot_group[kSeqGraph].size());
905  }
906 
907  if (params.m_Annots.empty()) {
909  sel.ExcludeNamedAnnots("SNP");
910  graph_ds->GetSeqtableAnnots(sel, r_cntx->GetVisSeqRange(), annot_group[kSeqTable]);
911 
913  sel.ExcludeNamedAnnots("SNP");
914  graph_ds->GetAnnotNames(sel, r_cntx->GetVisSeqRange(), annot_group[kSeqGraph], false);
915 
916  } else {
917 // LOG_POST(Trace << "GetAnnotNames() into annot_group[kSeqTable], true");
919  sel.ExcludeNamedAnnots("SNP");
920  graph_ds->GetAnnotNames(sel, r_cntx->GetVisSeqRange(), annot_group[kSeqTable], true);
921  }
922  }
923 // LOG_POST(Trace << "got annot_group[kSeqGraph].size() annots: " << annot_group[kSeqGraph].size());
924 // LOG_POST(Trace << "got annot_group[kSeqTable].size() annots: " << annot_group[kSeqTable].size());
925 
926  // create feature tracks
927 // LOG_POST(Trace << "Going through annot_group");
928  TTrackMap tracks;
929 
930  ITERATE (TAnnotGroup, g_iter, annot_group) {
931  const TAnnotNameTitleMap& annots = g_iter->second;
932 // LOG_POST(Trace << "Checking " << g_iter->first);
933  ITERATE (TAnnotNameTitleMap, iter, annots) {
934 // LOG_POST(Trace << "Using annot " << iter->first << ": " << iter->second);
936  ds_context->GetDS(typeid(CSGGraphDSType).name(), object);
937  CSGGraphDS* graph_ds = dynamic_cast<CSGGraphDS*>(ds.GetPointer());
938  graph_ds->SetDepth(params.m_Level);
939  graph_ds->SetAdaptive(params.m_Adaptive);
940  graph_ds->SetSeqTable(g_iter->first == kSeqTable);
941 
942 
943  /*
944  if (params.m_CoverageGraphCheck) {
945  graph_ds->SetGraphLevels(iter->first);
946  }
947  */
948 
949  CRef<CGraphTrack> track(new CGraphTrack(graph_ds, r_cntx));
950  track->SetAnnot(iter->first);
951 
952  if ( !iter->second.empty() ) {
953  track->SetTitle(iter->second);
954  }
955  if (!graph_cache_key.empty()) {
956  graph_ds->SetGraphCacheKey(graph_cache_key);
957  }
958 
959  tracks[iter->first] = track.GetPointer();
960  }
961  }
962 // LOG_POST(Trace << "Finished going through annot_group, created tracks: " << tracks.size());
963 
964  return tracks;
965 }
966 
967 
969  const TAnnotMetaDataList& src_annots,
970  const ILayoutTrackFactory::SExtraParams& params,
971  TAnnotNameTitleMap& out_annots) const
972 {
973  ILayoutTrackFactory::GetMatchedAnnots(src_annots, params.m_Annots, "graph", "", out_annots);
974 }
975 
976 
978 {
980 }
981 
982 
984 {
986 }
987 
988 
990 CGraphTrackFactory::GetSettings(const string& /*profile*/,
991  const TKeyValuePairs& settings,
992  const CTempTrackProxy* track_proxy) const
993 {
994  CRef<CTrackConfigSet> config_set(new CTrackConfigSet);
996  config_set->Set().push_back(config);
997  config->SetLegend_text("anchor_12");
998 
1001  CHistParams::EScale stored_scale = track_proxy? CHistParams::ScaleStrToValue(track_proxy->GetStoredScale()) : CHistParams::eLinear;
1002  //bool clip_outliers = false;
1003  string value_range;
1004  bool smooth_curve = false;
1005  string fit_step = "4";
1006  ITERATE (TKeyValuePairs, iter, settings) {
1007  try {
1008  if (NStr::EqualNocase(iter->first, "layout")) {
1009  config->SetHidden_settings().push_back(
1010  CTrackConfigUtils::CreateHiddenSetting("layout", iter->second));
1011  } else if (NStr::EqualNocase(iter->first, "color")) {
1012  config->SetHidden_settings().push_back(
1013  CTrackConfigUtils::CreateHiddenSetting("color", iter->second));
1014  } else if (NStr::EqualNocase(iter->first, "neg_color")) {
1015  config->SetHidden_settings().push_back(
1016  CTrackConfigUtils::CreateHiddenSetting("neg_color", iter->second));
1017  } else if (NStr::EqualNocase(iter->first, "opacity")) {
1018  config->SetHidden_settings().push_back(
1019  CTrackConfigUtils::CreateHiddenSetting("opacity", iter->second));
1020  } else if (NStr::EqualNocase(iter->first, "height")) {
1021  config->SetHidden_settings().push_back(
1022  CTrackConfigUtils::CreateHiddenSetting("height", iter->second));
1023  } else if (NStr::EqualNocase(iter->first, "style")) {
1024  style = CHistParams::TypeStrToValue(iter->second);
1025  } else if (NStr::EqualNocase(iter->first, kScale)) {
1026  scale = CHistParams::ScaleStrToValue(iter->second);
1027  } else if (NStr::EqualNocase(iter->first, kValueRange)) {
1028  value_range = iter->second;
1029  } else if (NStr::EqualNocase(iter->first, kStoredScale) || NStr::EqualNocase(iter->first, "is_scaled")) {
1030  stored_scale = CHistParams::ScaleStrToValue(iter->second);
1031  //} else if (NStr::EqualNocase(iter->first, kClipOutliers)) {
1032  // clip_outliers = NStr::StringToBool(iter->second);
1033  } else if (NStr::EqualNocase(iter->first, kOutlierColor)) {
1034  config->SetHidden_settings().push_back(
1036  } else if (NStr::EqualNocase(iter->first, kNumBins)) {
1037  config->SetHidden_settings().push_back(
1038  CTrackConfigUtils::CreateHiddenSetting("num_bins", iter->second));
1039  } else if (NStr::EqualNocase(iter->first, "smooth_curve")) {
1040  smooth_curve = NStr::StringToBool(iter->second);
1041  } else if (NStr::EqualNocase(iter->first, "fit_step")) {
1042  fit_step = iter->second;
1043  }
1044  } catch (std::exception&) {
1045  // ignore the errors
1046  }
1047  }
1048  if (stored_scale != CHistParams::eLinear && scale == CHistParams::eLinear) {
1049  scale = stored_scale;
1050  }
1051  // Style parameter
1053  "style", "Display Style",
1055  "Display style for graph data");
1056  choice->SetValues().push_back(
1059  "Histogram",
1060  "Shown as a histogram",
1061  "Graph data are shown as a histogram"));
1062  choice->SetValues().push_back(
1065  "Heat Map",
1066  "Shown as a heat map",
1067  "Graph data are shown as a heat map (smear bar)"));
1068  choice->SetValues().push_back(
1071  "Line Graph",
1072  "Shown as a line graph",
1073  "Graph data are shown as a line graph"));
1074  config->SetChoice_list().push_back(choice);
1075 
1076  // Scale parameter
1078  kScale, "Linear/Log Scale",
1080  "Scale for graph data");
1081  choice->SetValues().push_back(
1084  "Linear",
1085  "Shown at linear scale",
1086  "Graph data is shown at linear scale"));
1087  choice->SetValues().push_back(
1090  "Log Base 10",
1091  "Shown at log base 10 scale",
1092  "Graph data is shown at logarithmic (base 10) scale"));
1093  choice->SetValues().push_back(
1096  "Log Base e",
1097  "Shown at natural logarithm (base e) scale",
1098  "Graph data is shown at natural logrithm (base e) scale"));
1099  choice->SetValues().push_back(
1102  "Log Base 2",
1103  "Shown at log base 2 scale",
1104  "Graph data is shown at logarithmic (base 2) scale"));
1105  config->SetChoice_list().push_back(choice);
1106 
1107  // Overlay layout
1108  config->SetCheck_boxes().push_back(
1110  "smooth_curve", "Smooth curve", "Smooth curve", "", smooth_curve));
1111 
1112  bool range_autoscale = true;
1113  string range_min, range_max;
1114  if (!value_range.empty()) {
1115  string r_min, r_max;
1116  CTrackConfigUtils::DecodeValueRange(value_range, r_min, r_max, range_autoscale);
1117  if (!r_min.empty() && r_min != "inf") {
1118  range_min = (errno) ? "" : r_min;
1119  }
1120  if (!r_max.empty() && r_max != "inf") {
1121  range_max = (errno) ? "" : r_max;
1122  }
1123  config->SetHidden_settings().push_back(
1125  //NStr::Replace(value_range, "~", ":")));
1126  }
1127 
1129  "Set Value Range (Data outside range will be clipped)",
1130  "Set Value Range (Data outside range will be clipped)",
1131  range_min,
1132  range_max,
1133  range_autoscale,
1134  true);
1135  {
1136  auto condition = Ref(new objects::CConditional);
1137  condition->SetName(kScale);
1138  condition->SetValue().push_back(CHistParams::ScaleValueToStr(CHistParams::eLog10));
1139  condition->SetValue().push_back(CHistParams::ScaleValueToStr(CHistParams::eLog2));
1140  condition->SetValue().push_back(CHistParams::ScaleValueToStr(CHistParams::eLoge));
1141  condition->SetAction(CConditional::eAction_disable);
1142  range_control->SetConditions().push_back(condition);
1143  }
1144  {
1145  auto condition = Ref(new objects::CConditional);
1146  condition->SetName("style");
1147  condition->SetValue().push_back(CHistParams::TypeValueToStr(CHistParams::eSmearBar));
1148  condition->SetAction(CConditional::eAction_disable);
1149  range_control->SetConditions().push_back(condition);
1150  }
1151 
1152  config->SetRange_controls().push_back(range_control);
1153 
1154  config->SetHelp() = GetThisTypeInfo().GetDescr();
1155 
1156  return config_set;
1157 }
1158 
1159 void CGraphTrack::GetLegend(const CTempTrackProxy* track_proxy, CTrackConfig::TLegend& legend) const
1160 {
1161  CRef<CLegendItem> legend_item(new CLegendItem);
1162  legend_item->SetLabel(track_proxy->GetSource());
1163  legend_item->SetColor("blue");
1164  legend_item->SetId("");
1165 
1166  int opacity = 100;
1167  string color;
1169  if (!track_proxy->GetTrackProfile().empty()) {
1170  TKeyValuePairs settings;
1171  CSGConfigUtils::ParseProfileString(track_proxy->GetTrackProfile(), settings);
1172  ITERATE(TKeyValuePairs, iter, settings) try {
1173  if (NStr::EqualNocase(iter->first, "color")) {
1174  color = iter->second;
1175  } else if (NStr::EqualNocase(iter->first, "opacity")) {
1176  opacity = NStr::StringToInt(iter->second, NStr::fConvErr_NoThrow);
1177  opacity = (opacity <= 0) ? 100 : min(opacity, 100);
1178  } else if (NStr::EqualNocase(iter->first, "style")) {
1179  style = CHistParams::TypeStrToValue(iter->second);
1180  }
1181  } catch (std::exception&) {
1182  LOG_POST(Error << "CGraphTrack::GetLegend: invalid settings " << iter->second);
1183  }
1184  }
1185  bool color_is_set = false;
1186  CRgbaColor c;
1187  if (!color.empty()) {
1188  try {
1189  c.FromString(color);
1190  color_is_set = true;
1191  } catch (exception& e) {
1192  ERR_POST(Error << e.what());
1193  }
1194  }
1195 
1196  if (color_is_set == false) {
1197  _ASSERT(m_gConfig);
1198  if (m_gConfig) {
1200  CRef<CHistParams> hist_conf;
1201  if (conf_mgr->HasSettings(m_AnnotName)) {
1202  // Get the corresponding setting for this data track if exists
1203  hist_conf = conf_mgr->GetHistParams(m_AnnotName);
1204  } else {
1205  CRef<CHistParams> def_conf = conf_mgr->GetDefHistParams();
1206  hist_conf.Reset(new CHistParams(*def_conf));
1207  conf_mgr->AddSettings(m_AnnotName, hist_conf);
1208  }
1209  c = hist_conf->m_fgColor;
1210  }
1211  }
1212  if (opacity < 100 && opacity > 0) {
1213  float alpha = opacity;
1214  alpha /= 100.;
1215  c.SetAlpha(alpha);
1216  }
1217  legend_item->SetColor(c.ToString());
1218  string label = CHistParams::TypeValueToStr(style);
1219  label += ":";
1220  legend_item->SetLabel(label);
1221  legend.push_back(legend_item);
1222 }
1223 
1224 
1226 {
1229  if (GetGroup().GetChildren().size() <= 1)
1230  return;
1231  float axis_min = numeric_limits<float>::max();
1232  float axis_max = numeric_limits<float>::min();
1233 
1235  {
1236  CHistogramGlyph* hg = dynamic_cast<CHistogramGlyph*>(&**hist_it);
1237  if (!hg)
1238  continue;
1239  axis_max = max(hg->GetMax(), axis_max);
1240  axis_min = min(hg->GetMin(), axis_min);
1241  }
1242 
1244  {
1245  CHistogramGlyph* hg = dynamic_cast<CHistogramGlyph*>(&**hist_it);
1246  if (!hg)
1247  continue;
1250  hg->SetAxisMax(axis_max);
1251  hg->SetAxisMin(axis_min);
1252  hg->SetFixedScale(true);
1253  hg->SetAxisRange();
1254  }
1255  if (m_Layout == eLayout_Overlay) {
1256  x_InitGrid();
1258  m_Grid->SetAxisMax(axis_max);
1259  m_Grid->SetAxisMin(axis_min);
1260  m_Grid->SetFixedScale(true);
1261  m_Grid->SetAxisRange();
1262  }
1263  }
1264 }
1265 
1266 
1268 {
1270  if (m_Layout == eLayout_Overlay) {
1271  if (!(m_On && m_Expanded))
1272  return;
1273  TModelRange vis_r = m_Context->IntersectVisible(this);
1274  if (vis_r.Empty())
1275  return;
1276  if (m_Group.GetChildren().empty())
1277  return;
1278  _ASSERT(m_gConfig);
1279  if (!m_gConfig)
1280  return;
1281  // update Grid
1282  x_InitGrid();
1285  {
1286  CHistogramGlyph* hg = dynamic_cast<CHistogramGlyph*>(&**hist_it);
1287  if (!hg)
1288  continue;
1289  m_Grid->SetTop(m_Group.GetTop() + hg->GetTop());
1290  m_Grid->SetLeft(hg->GetLeft());
1291  m_Grid->SetWidth(hg->GetWidth());
1292  m_Grid->SetHeight(hg->GetHeight());
1293  break;
1294  }
1295  }
1296 }
1297 
1299 {
1300  if (GetHeight() == 0 || m_Context->IntersectVisible(this).Empty())
1301  return;
1302  if (m_Layout == eLayout_Overlay && m_Grid) {
1303  m_Grid->DrawGrid(true);
1304  }
1306 }
1307 
1308 
1310 {
1311  if (layout == m_Layout)
1312  return;
1313 
1314  if (layout == eLayout_Layered) {
1315 
1317  bool create_group = GetGroup().GetChildren().size() > 1;
1318 
1320  CHistogramGlyph* hg = dynamic_cast<CHistogramGlyph*>(&**hist_it);
1321  if (!hg)
1322  continue;
1325  hg->Update(true);
1326  if (create_group) {
1328  config->m_LabelColor = CRgbaColor("blue");
1329  config->m_ShowConnection = false;
1331  label->SetConfig(config);
1332  label->SetRenderingContext(m_Context);
1333 
1334  CRef<CLayoutGroup> group(new CLayoutGroup);
1335  group->SetLayoutPolicy(m_Simple);
1337 
1338  group->PushBack(label);
1339  group->PushBack(hg);
1340  glyphs.push_back(CRef<CSeqGlyph>(group.GetPointer()));
1341  } else {
1342  glyphs.push_back(*hist_it);
1343  }
1344  }
1345  if (!glyphs.empty())
1346  SetGroup().SetChildren() = glyphs;
1348 
1349  } else if (layout == eLayout_Overlay || layout == eLayout_Overlayed) {
1350 
1353  CHistogramGlyph* hg = 0;
1354  CLayoutGroup* lg = dynamic_cast<CLayoutGroup*>(&**hist_it);
1355  if (lg && lg->GetChildrenNum() == 2) {
1356  CRef<CSeqGlyph> g = lg->GetChild(1);
1357  hg = dynamic_cast<CHistogramGlyph*>(g.GetPointer());
1358  if (hg) {
1359  hg->SetParent(this);
1360  graphs.push_back(g);
1361  }
1362  } else {
1363  hg = dynamic_cast<CHistogramGlyph*>(&**hist_it);
1364  }
1365  if (hg) {
1367  hg->Update(true);
1368  }
1369  }
1370  if (!graphs.empty()) {
1371  SetGroup().SetChildren() = graphs;
1372  }
1375  }
1376 
1377  m_Layout = layout;
1378  Update(true);
1379 }
1380 
1382 {
1383  if (!m_Grid) {
1384  CHistogramGlyph::TMap empty_map;
1385  m_Grid.Reset(new CHistogramGlyph(empty_map, NcbiEmptyString));
1387  m_Grid->SetShowTitle(false);
1388  }
1389 
1390 }
1391 
1393 {
1394  CGraphTrack* gt = dynamic_cast<CGraphTrack*>(&*track);
1395  return (gt != 0 && gt->GetChildren().size() == 1);
1396 }
1397 
1399 {
1400  vector<CRef<CGraphTrack>> tracks;
1401  CGraphTrack* gt = dynamic_cast<CGraphTrack*>(&*track);
1402  if (gt && gt->GetChildren().size() == 1) {
1403  tracks.push_back(Ref(gt));
1404  return CreateOverlay(tracks);
1405  }
1406  return false;
1407 }
1408 
1409 
1411 {
1412  for (auto child : GetGroup().GetChildren()) {
1413  CHistogramGlyph* hg = 0;
1414  CLayoutGroup* lg = dynamic_cast<CLayoutGroup*>(&*child);
1415  if (lg && lg->GetChildrenNum() == 2) {
1416  CRef<CSeqGlyph> g = lg->GetChild(1);
1417  hg = dynamic_cast<CHistogramGlyph*>(g.GetPointer());
1418  } else {
1419  hg = dynamic_cast<CHistogramGlyph*>(&*child);
1420  }
1421  if (hg) {
1422  graphs.push_back(Ref(hg));
1423  }
1424  }
1425 }
1426 
1427 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Checksum and hash calculation classes.
CAppJobNotification Notification send by CAppJobEventTranslator.
CChecksum – Checksum calculator.
Definition: checksum.hpp:302
CCommentConfig – help config class for holding a set of settings for a comment glyph.
CCommentGlyph – utility class for having comments in graphical glyphs.
CConstRef –.
Definition: ncbiobj.hpp:1266
CDataTrack - a abstract base class for layout tracks which need to deal with background data retrieva...
Definition: data_track.hpp:55
virtual void Update(bool layout_only)
Update content and layout including the bounding box.
Definition: data_track.cpp:52
void x_UpdateLayout()
Definition: data_track.hpp:127
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
virtual void x_RenderContent() const
The content rendering must be implemented in the derived layout tracks.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
void Add(CSeqGlyph *obj)
Append a layout object to the end.
void SetObjects(const CLayoutGroup::TObjectList &objs)
CLayoutGroup & SetGroup()
const CLayoutGroup::TObjectList & GetChildren() const
const CLayoutGroup & GetGroup() const
CLayoutGroup::TObjectList & SetChildren()
CRef< CLayeredLayout > m_Layered
CRef< CSimpleLayout > m_Simple
void SetLayoutPolicy(ILayoutPolicy *policy)
Set policy on how to deploy the layout of its children.
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
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 &params, TAnnotNameTitleMap &out_annots) const
virtual TTrackMap CreateTracks(SConstScopedObject &object, ISGDataSourceContext *ds_context, CRenderingContext *r_cntx, const SExtraParams &params=SExtraParams(), const TAnnotMetaDataList &src_annots=TAnnotMetaDataList()) const
create a layout track based on the input objects and extra parameters.
virtual const CTrackTypeInfo & GetThisTypeInfo() const
CGraphTrack –.
Definition: graph_track.hpp:55
virtual CRef< CSGGenBankDS > GetDataSource()
Method for accessing the data source.
virtual void x_LoadSettings(const string &preset_style, const TKeyValuePairs &settings)
load the track settings.
objects::SAnnotSelector m_Sel
void SetAnnot(const string &annot)
virtual void x_UpdateBoundingBox()
Update the bounding box assuming children's sizes are fixed if any.
string m_AnnotName
bool CreateOverlay(vector< CRef< CGraphTrack >> &tracks)
void x_InitGrid()
virtual bool Drop(CRef< CLayoutTrack > &track)
static const string kOverlayed
Definition: graph_track.hpp:66
static CNetICacheClient & s_GetICacheInstance()
void x_OnSettingsIconClicked()
bool m_FixedScale
Dynamic or fixed graph scale.
static string x_LayoutValueToStr(ELayout layout)
static ELayout x_LayoutStrToValue(const string &layout)
virtual void x_OnJobCompleted(CAppJobNotification &notify)
virtual ~CGraphTrack()
CGraphTrack(CSGGraphDS *ds, CRenderingContext *r_cntx)
static CNetICacheClient s_InitICache()
virtual void x_OnLayoutChanged()
update the layout.
CRef< CHistogramGlyph > m_Grid
ELayout m_Layout
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const
Initialize the HTML active area for a track.
virtual void x_RenderContent() const
The content rendering must be implemented in the derived layout tracks.
void SetLayout(ELayout layout)
CSGGraphDS::TAxisLimits m_YLimits
Graph y limits stored when FixedScale is set.
virtual const CTrackTypeInfo & GetTypeInfo() const
CRef< CSGGraphDS > m_DS
virtual bool CanDrop(CRef< CLayoutTrack > &track)
virtual void x_UpdateData()
update track content.
virtual void GetLegend(const CTempTrackProxy *track_proxy, objects::CTrackConfig::TLegend &legend) const
static CTrackTypeInfo m_TypeInfo
virtual void x_OnIconClicked(TIconID id)
Mouse left-click event handler on an icon.
virtual void GetHTMLActiveAreas(TAreaVector *p_areas) const
Get html active areas.
void x_CollectAllGraphs(vector< CRef< CHistogramGlyph >> &graphs) const
virtual void x_SaveSettings(const string &preset_style)
save part of settings to a profile string.
string m_Descr
description that can be used as label or tooltip
@ fNoNavigation
track title won't show navigation controls
@ fTrack
track title bar
int m_Flags
area flags, will need to replace m_Type
void AddSettings(const string &name, CRef< CHistParams > hist_params)
Add a new settings for a given name.
bool HasSettings(const string &name) const
Check if there is settings for a given name.
CRef< CHistParams > GetDefHistParams() const
CRef< CHistParams > GetHistParams(TFeatSubtype subtype) const
Get histogram settings using feature subtype.
File Description:
CRgbaColor m_fgNegColor
CRgbaColor m_SmearColorMin
static EType TypeStrToValue(const string &type)
EScale m_StoredScale
stored scale of the underlying data (e.g. as reported by TMS)
CRgbaColor m_OutlierColor
static EScale ScaleStrToValue(const string &scale)
static const string & TypeValueToStr(CHistParams::EType type)
static const string & ScaleValueToStr(CHistParams::EScale scale)
EScale m_Scale
requested scale
TModelUnit m_Height
CRgbaColor m_bgColor
CRgbaColor m_fgColor
CRange< float > m_ValueRange
CRgbaColor m_SmearColorMax
const string & GetAnnotName() const
void SetAxisMin(TDataType min)
TDataType GetAxisMin() const
void SetShowTitle(bool f)
TDataType GetMin() const
void SetAnnotName(const string &name)
void SetAxisMax(TDataType max)
void SetFixedScale(bool value)
const string & GetTitle() const
TDataType GetAxisMax() const
Get the axis limits (max/min).
TDataType GetMax() const
Get the actually density max/min values.
void SetRenderingMode(ERenderingMode mode)
void SetDesc(const string &desc)
void DrawGrid(bool include_background) const
void SetConfig(const CSeqGraphicConfig &config)
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.
TObjectList & SetChildren()
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
CConstRef< CSeqGlyph > GetChild(int idx) const
Get the layout object at index 'idx'.
size_t GetChildrenNum() const
Get total number of children.
ILayoutPolicy::TObjectList TObjectList
bool m_Expanded
is this track in expanded state
@ eIcon_Settings
icon id for track settings
ILayoutTrackHost * m_LTHost
Top level host owning the tracks.
string m_Title
track title
bool m_On
is this track shown
CLayoutTrack * GetParentTrack()
void x_OnLayoutChanged()
update the layout.
const string & GetId() const
virtual void x_OnIconClicked(TIconID id)
Mouse left-click event handler on an icon.
int GetOrder() const
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.
void SetProfile(const string &preset_style)
CLayoutTrack inline method implmentation.
CRef< CSeqGraphicConfig > m_gConfig
global configuration.
int TIconID
use int as TIconID instead of EIconID.
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const
Initialize the HTML active area for a track.
void x_RegisterIcon(const SIconInfo &icon)
register track icons.
CLegendItem –.
Definition: LegendItem.hpp:66
static CNcbiApplication * Instance(void)
Singleton method.
Definition: ncbiapp.cpp:264
CNcbiRegistry –.
Definition: ncbireg.hpp:913
Client to NetCache server (implements ICache interface)
COverlayLayout is the layout policy that arranges glyphs over the top of each other.
Note about the "buf_size" parameter for streams in this API.
Definition: rwstream.hpp:122
@ fOwnReader
Own the underlying reader.
Definition: rwstreambuf.hpp:66
@ fOwnWriter
Own the underlying writer.
Definition: rwstreambuf.hpp:67
CRef –.
Definition: ncbiobj.hpp:618
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
const TSeqRange & GetVisSeqRange() const
TModelRange IntersectVisible(const CSeqGlyph *obj) const
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:58
static void ParseProfileString(const string &profile_str, TKeyValuePairs &settings)
virtual bool AllJobsFinished() const
void SetJobListener(CEventHandler *listener)
Set JobDispatcher listener.
virtual void ClearJobID(TJobID job_id)
void SetDepth(int depth)
Set the annotation selector resolving depth.
virtual void DeleteAllJobs()
Remove waiting jobs from queue or cancel the unfinished jobs.
void SetAdaptive(bool flag)
CSGGraphDSType.
void LoadSeqGraphs(const string &annotName, objects::SAnnotSelector &sel, CRenderingContext &ctx, bool fixed_scale, const TAxisLimits &y_limits, CConstRef< CSeqGraphicConfig > config)
void GetSeqtableAnnots(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
void SetSeqTable(bool f)
inline methods
bool IsSeqTable() const
void SetGraphCacheKey(const string &graph_cache_key)
void GetAnnotNames(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names, bool seq_table=false) const
CSGJobResult – the data structure holding the seqgraphic job results.
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 SetHeight(TModelUnit h)
Definition: seq_glyph.hpp:650
void SetParent(CSeqGlyph *p)
Definition: seq_glyph.hpp:670
virtual void SetWidth(TModelUnit w)
Definition: seq_glyph.hpp:646
virtual void SetLeft(TModelUnit l)
Definition: seq_glyph.hpp:654
virtual TModelUnit GetTop() const
Definition: seq_glyph.hpp:599
virtual TModelUnit GetHeight() const
Definition: seq_glyph.hpp:587
virtual void Update(bool)
Update content and layout including the bounding box.
Definition: seq_glyph.cpp:86
virtual void SetTop(TModelUnit b)
Definition: seq_glyph.hpp:658
virtual TModelUnit GetWidth() const
Definition: seq_glyph.hpp:591
virtual TModelUnit GetLeft() const
Definition: seq_glyph.hpp:595
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
CRef< CHistParamsManager > GetHistParamsManager() const
Get histogram config manager.
bool GetCgiMode() const
File Description:
vector< string > TAnnots
list< CRef< CTempTrackProxy > > TTrackProxies
const string & GetKey() const
const TAnnots & GetAnnots() const
const string & GetId() const
const string & GetTrackProfile() const
const TTrackProxies & GetChildren() const
void SetOrder(int order)
CTempTrackProxy class implementation.
TSubTracks & SetSubTracks()
const string & GetStoredScale() const
void SetAnnots(const TAnnots &annots)
const CLayoutTrack * GetTrack() const
const TSubTracks & GetSubTracks() const
const string & GetSource() const
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::CHiddenSetting > CreateHiddenSetting(const string &name, const string &value)
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::CRangeControl > CreateRangeControl(const string &name, const string &disp_name, const string &help, const string &value_min, const string &value_max, bool autoscale=true, bool inverse=false, bool optional=false)
static void DecodeValueRange(const string &value_range, string &range_min, string &range_max, bool &range_auto)
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
CTrackContainer - a track container in the form of layout track.
const TTrackProxies & GetSubtrackProxies() const
CTrackContainer inline methods.
void AddTrackProxy(CTempTrackProxy *proxy, bool upgateMsg=true)
Add a track proxy.
CTrackProxy * AddNewTrack(const string &track_key, const CTrackProxy::TAnnots &annots, const string &disp_name, const string &name="", const string &filter="", const string &sub_key="")
Add a new empty track proxy.
virtual void RemoveTrack(int order, bool immediately=true)
completely remove a track from the hierachical tree.
void MoveTrack(int from, int to)
CTempTrackProxy::TTrackProxies TTrackProxies
CTrackProxy data structure contains information about the position of a track in its parent scope,...
virtual CRef< CTempTrackProxy > Clone() const
CTrackTypeInfo - holds description of a layout track type.
const string & GetDescr() const
const string & GetId() const
bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Verify that a named field exists.
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user object.
Definition: User_object.cpp:71
Writer-based output stream.
Definition: rwstream.hpp:171
map< string, string > TAnnotNameTitleMap
List of annotations with the corresponding titles.
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.
virtual void LTH_PopupMenu(wxMenu *menu)=0
show track-specific context menu.
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.
iterator_bool insert(const value_type &val)
Definition: map.hpp:165
bool empty() const
Definition: map.hpp:149
struct config config
static const string kSeqGraph
USING_SCOPE(objects)
static const string kScale
Definition: graph_track.cpp:73
static const string kNumBins
Definition: graph_track.cpp:79
static const string kSDeviationThreshold
Definition: graph_track.cpp:77
CTrackProxy * s_FindTrackProxy(CTrackContainer &p_track, int order)
static const string kOutlierColor
Definition: graph_track.cpp:76
static const string kClipOutliers
Definition: graph_track.cpp:75
static string s_GetCacheKey(const string &annot_name)
Definition: graph_track.cpp:92
static const CGraphTrack::ELayout kDefaultLayout
Definition: graph_track.cpp:88
static const string kSeqTable
CGraphTrackFactory methods.
static const string kTrackTitle
CGraphTrack.
Definition: graph_track.cpp:72
static const bool kDefaultFixedScale
Definition: graph_track.cpp:89
static const string kNegColor
Definition: graph_track.cpp:81
static const string kValueRange
Definition: graph_track.cpp:78
static const string kStoredScale
Definition: graph_track.cpp:74
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define ERASE_ITERATE(Type, Var, Cont)
Non-constant version with ability to erase current element, if container permits.
Definition: ncbimisc.hpp:843
#define VECTOR_ERASE(Var, Cont)
Use this macro inside body of ERASE_ITERATE cycle to erase from vector-like container.
Definition: ncbimisc.hpp:852
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
string GetHexSum(void) const
Return string with checksum in hexadecimal form.
Definition: checksum.hpp:353
void AddLine(const char *line, size_t len)
Definition: checksum.hpp:609
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
Definition: ncbidiag.hpp:186
#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_CATCH(message)
Catch CExceptions as well This macro is deprecated - use *_X or *_XX variant instead of it.
Definition: ncbiexpt.hpp:580
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
Definition: utils.cpp:167
static TAnnotNameType NameTypeStrToValue(const string &type)
Definition: utils.cpp:140
static bool isRmtAnnotName(const string &sAnnotname)
check if a given annotation was created by a remote file pipeline
Definition: utils.cpp:813
@ eAnnot_Unnamed
unnamed annotation
Definition: utils.hpp:133
GLdouble TModelUnit
Definition: gltypes.hpp:48
int TVPUnit
Definition: gltypes.hpp:47
string ToString(bool printAlpha=true, bool uchars=true) const
Return a string representation of the current color.
Definition: rgba_color.cpp:309
CRef< CObject > GetResult() const
returns non-null pointer only if Completed or Running and has temporary results available
static bool GetKey(const TTrackSettings &TrackSettings, const string &key, string &value)
returns a specified key; if it does not exist, returns false
Definition: track_info.cpp:277
void SetAlpha(float r)
Definition: rgba_color.cpp:287
void FromString(const string &str)
Assign color values encoded in a string.
Definition: rgba_color.cpp:363
void Lighten(float scale)
Definition: rgba_color.cpp:463
@ eSerial_AsnBinary
ASN.1 binary.
Definition: serialdef.hpp:74
IReader * GetReadStream(const string &key, int version, const string &subkey, size_t *blob_size_ptr, const CNamedParameterList *optional=NULL)
Read a lengthy blob via the IReader interface.
virtual bool HasBlobs(const string &key, const string &subkey)
Check if any BLOB exists (any version)
virtual IWriter * GetWriteStream(const string &key, int version, const string &subkey, unsigned int time_to_live=0, const string &owner=kEmptyStr)
Return sequential stream interface to write BLOB data.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
Definition: objostr.cpp:126
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
Definition: objistr.cpp:195
SAnnotSelector & ExcludeNamedAnnots(const CAnnotName &name)
Add named annot to set of annots names to exclude.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
static position_type GetEmptyFrom(void)
Definition: range.hpp:290
TThisType & Set(position_type from, position_type to)
Definition: range.hpp:188
static position_type GetEmptyTo(void)
Definition: range.hpp:298
bool Empty(void) const
Definition: range.hpp:148
static TThisType GetWhole(void)
Definition: range.hpp:272
virtual string GetString(const string &section, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
Definition: ncbireg.cpp:321
#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
static int StringToNonNegativeInt(const CTempString str, TStringToNumFlags flags=0)
Convert string to non-negative integer value.
Definition: ncbistr.cpp:457
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
Definition: ncbistr.cpp:630
static const string BoolToString(bool value)
Convert bool to string.
Definition: ncbistr.cpp:2815
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
Definition: ncbistr.hpp:2697
#define NcbiEmptyString
Definition: ncbistr.hpp:122
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
@ fConvErr_NoThrow
Do not throw an exception on error.
Definition: ncbistr.hpp:285
static const char label[]
void SetFrom(TFrom value)
Assign a value to From data member.
Definition: Range_.hpp:231
TTo GetTo(void) const
Get the To member data.
Definition: Range_.hpp:269
TFrom GetFrom(void) const
Get the From member data.
Definition: Range_.hpp:222
void SetTo(TTo value)
Assign a value to To data member.
Definition: Range_.hpp:278
const TData & GetData(void) const
Get the Data member data.
TReal GetReal(void) const
Get the variant data.
void SetType(TType &value)
Assign a value to Type data member.
list< CRef< CLegendItem > > TLegend
Tdata & Set(void)
Assign a value to data member.
n background color
sat & gt
int i
#define wxT(x)
Definition: muParser.cpp:41
constexpr bool empty(list< Ts... >) noexcept
double value_type
The numeric datatype used by the parser.
Definition: muParserDef.h:228
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
NetCache ICache client specs.
T max(T x_, T y_)
T bound(T x_, T xlo_, T xhi_)
T min(T x_, T y_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
Reader-writer based streams.
A help struct for storing information about a icon.
extra parameter for initializing a track.
bool m_Adaptive
Adaptive/Exact selector.
TAnnots m_Annots
particular annotations the track will be looking at.
int m_Level
layout level that limits feature retrieving used by annotation selector.
string m_TrackProfile
Track setting profile for additionial parameters.
bool m_SkipGenuineCheck
Flag indicating if track verification is required.
bool m_CoverageGraphCheck
Flag indicating if checking coverage graph is necessary.
SAnnotSelector –.
#define _ASSERT
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
Definition: thrddgri.c:44
else result
Definition: token2.c:20
void UseDefaultMarginWidth(wxMenu &menu)
Using default menu item margin width.
Definition: wx_utils.cpp:693
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
Modified on Mon May 20 05:05:33 2024 by modify_doxy.py rev. 669887