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

Go to the SVN repository for this file.

1 /* $Id: feature_track.cpp 47783 2024-08-23 19:29:57Z asztalos $
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 
49 #include <gui/utils/rgba_color.hpp>
50 #include <gui/objutils/utils.hpp>
51 #include <gui/objutils/label.hpp>
52 
53 #include <objmgr/util/feature.hpp>
54 #include <objmgr/util/sequence.hpp>
55 #include <objmgr/annot_ci.hpp>
56 
60 
61 #include <wx/menu.h>
62 
65 
66 
67 static const string kBaseKey = "GBPlugins.SeqGraphicFeatureTrack";
68 
69 
70 ///////////////////////////////////////////////////////////////////////////////
71 /// CFeatureTrack
72 ///////////////////////////////////////////////////////////////////////////////
74 static const TLayoutStr s_LayoutStrs[] = {
76  { "Adaptive - inline", CFeatureTrack::eLayout_AdaptiveInline },
78  { "Expanded by position", CFeatureTrack::eLayout_ExpandedByPos },
79  { "Expanded by size", CFeatureTrack::eLayout_ExpandedBySize },
81  { "OneLine", CFeatureTrack::eLayout_OneLine },
82  { "Packed", CFeatureTrack::eLayout_Packed },
83 };
84 
87 
89 {
90  TLayoutMap::const_iterator iter = sm_LayoutMap.find(layout);
91  if (iter != sm_LayoutMap.end()) {
92  return iter->second;
93  }
94  NCBI_THROW(CException, eInvalid, "Invalid layout string: " + layout);
95 }
96 
97 
99 {
101  for (iter = sm_LayoutMap.begin(); iter != sm_LayoutMap.end(); ++iter) {
102  if (iter->second == layout) {
103  return iter->first;
104  }
105  }
106  return kEmptyStr;
107 }
108 
109 
112  { "Default", ELinkedFeatDisplay::eLFD_Default },
113  { "Expandable", ELinkedFeatDisplay::eLFD_Expandable },
114  { "Hidden", ELinkedFeatDisplay::eLFD_Hidden },
116  { "Packed", ELinkedFeatDisplay::eLFD_Packed },
117  { "ParentHidden", ELinkedFeatDisplay::eLFD_ParentHidden },
118 };
119 
122 
124 {
125  TLinkedFeatMap::const_iterator iter = sm_LinkedFeatMap.find(linked_feat);
126  if (iter != sm_LinkedFeatMap.end()) {
127  return iter->second;
128  }
129  NCBI_THROW(CException, eInvalid, "Invalid feature linking mode string: " + linked_feat);
130 }
131 
132 
134 {
136  for (iter = sm_LinkedFeatMap.begin(); iter != sm_LinkedFeatMap.end(); ++iter) {
137  if (iter->second == linked_feat) {
138  return iter->first;
139  }
140  }
141  return kEmptyStr;
142 }
143 
144 
146  "Feature track");
147 
148 
150  : CDataTrack(r_cntx)
151  , m_DS(ds)
152  , m_Subtype(CSeqFeatData::eSubtype_bad)
153  , m_FeatLimits(-1)
154  , m_CompactThreshold(200)
155  , m_MaxRow(200)
156  , m_Layout(eLayout_Default)
157  , m_LinkedFeat(ELinkedFeatDisplay::eLFD_Default)
158  , m_HistThreshold(0)
159  , m_Column(new CColumnLayout)
160  , m_GroupSimple(new CSimpleLayout)
161  , m_GroupLayered(new CLayeredLayout)
162  , m_LinkedGroup(new CLayeredLayout)
163  , m_Compact(new CCompactLayout)
164  , m_HasLinkedFeats(false)
165 {
166  m_DS->SetJobListener(this);
168 
169  // initialize annotation selector
172  eIcon_Layout, "Layout style", true, "track_layout"));
173 }
174 
175 
177 {
178  if ( !m_DS->AllJobsFinished() ) {
179  m_DS->DeleteAllJobs();
180  }
181 }
182 
183 
185 {
186  return m_TypeInfo;
187 }
188 
189 
191 {
192  string title = GetTitle();
193  if (title.empty()) {
195  title = "Other annotations";
196  } else {
197  title = m_AnnotName;
198  }
199  }
200 
201  return title;
202 }
203 
204 
205 void CFeatureTrack::SetAnnot(const string& annot)
206 {
207  m_Annot = annot;
208  m_AnnotName = annot;
209  m_FeatSel.ResetAnnotsNames();
212  m_FeatSel.AddUnnamedAnnots();
213  } else {
214  m_FeatSel.AddNamedAnnots(m_AnnotName);
215  if (NStr::StartsWith(m_AnnotName, "NA0")) {
216  if (m_AnnotName.find(".") == string::npos) {
217  m_AnnotName += ".1";
218  }
220  m_FeatSel.IncludeNamedAnnotAccession(m_AnnotName);
221  }
222  }
223 }
224 
225 
226 void CFeatureTrack::ExcludeAnnotName(const string& annot)
227 {
228  m_FeatSel.ExcludedAnnotName(annot);
229 }
230 
231 
233 {
234  m_Subtype = subtype;
236  CSeqFeatData::E_Choice feat_type =
238  const CFeatList& feats(*CSeqFeatData::GetFeatList());
239  m_Subtitle = feats.GetDescription((int)feat_type, subtype);
240 
241  m_FeatSel.SetFeatSubtype(feat_st);
242 }
243 
244 
246 {
248  TSeqPos(m_Context->ScreenToSeq(20.0))));
250  TSeqPos(m_Context->ScreenToSeq(3.0))));
251 
253  max(TSeqPos(1), TSeqPos(m_Context->ScreenToSeq(3.0))));
255  max(TSeqPos(1), TSeqPos(m_Context->ScreenToSeq(3.0))));
256 
257  m_DS->DeleteAllJobs();
260  if (range.Empty()) {
262  }
263 
264  int feat_limit = m_FeatLimits;
266  // if the layout is not packed, and we are in sequence level,
267  // show the features always.
268  feat_limit = -1;
269  }
270  x_LoadFeatures(range, feat_limit);
271 }
272 
273 void CFeatureTrack::GenerateAsn1(objects::CSeq_entry& seq_entry, TSeqRange range)
274 {
278  Handle.GetRangeSeq_loc(range.GetFrom(), range.GetTo()) );
279 
280 // cerr << "using loc " << endl <<
281 // MSerial_AsnText << *loc << endl;
282  CFeat_CI feature_iter(Handle.GetScope(), *loc, m_FeatSel);
283 // cerr << "got features: " << feature_iter.GetSize() << endl;
284  CRef<CSeq_annot> pAnnot(new CSeq_annot);
285  CSeq_annot::TData::TFtable& ftable(pAnnot->SetData().SetFtable());
286 
287  // filtering features
288  CFeatureFilter filter;
289  filter.Init(m_DS->GetFilter());
290  for ( ; feature_iter; ++feature_iter) {
291  const CMappedFeat& feat = *feature_iter;
292 // cerr << "Got feature" << endl <<
293 // MSerial_AsnText << feat.GetMappedFeature() << endl;
294  if(!filter.NeedFiltering() || filter.Pass(&feat)) {
295  CRef<CSeq_feat> pFeat(new CSeq_feat);
296  pFeat->Assign(feat.GetMappedFeature());
297  ftable.push_back(pFeat);
298  }
299  }
300  seq_entry.SetAnnot().push_back(pAnnot);
301 }
302 
303 
305 {
306  m_DS->ClearJobID(notify.GetJobID());
307  CRef<CObject> res_obj = notify.GetResult();
308  CSGJobResult* result = dynamic_cast<CSGJobResult*>(&*res_obj);
309  if (!result) {
310  LOG_POST(Error << "CFeatureTrack::x_OnJobCompleted() notification for job \
311  does not contain results.");
312  return;
313  }
314 
316 }
317 
318 void CFeatureTrack::x_LoadFeatures(const TSeqRange& range, int feat_limit)
319 {
321 }
322 
323 
324 void CFeatureTrack::x_LoadSettings(const string& /*preset_style*/,
325  const TKeyValuePairs& settings)
326 {
328  CRegistryReadView view;
329  view = registry.GetReadView(kBaseKey + "." + m_gConfig->GetCurrTheme());
330  m_CompactThreshold = view.GetInt("CompactThreshold", 200);
331  m_MaxRow = view.GetInt("MaxRow", 200);
332  m_MaxAdaptiveHeight = view.GetInt("MaxAdaptiveHeight", 400);
333 
341 
342  x_ParseSettings(settings);
344 }
345 
346 
348 {
349  // feature track doesn't use profile
350  ITERATE (TKeyValuePairs, iter, settings) {
351  try {
352  if (NStr::EqualNocase(iter->first, "Layout")) {
353  m_Layout = LayoutStrToValue(iter->second);
354  } else if (NStr::EqualNocase(iter->first, "LinkedFeat")) {
356  } else if (NStr::EqualNocase(iter->first, "HistThreshold")) {
357  int val = NStr::StringToInt(iter->second);
358  if (val > 0) m_HistThreshold = (size_t)val;
359  else m_HistThreshold = 0;
360  } else if (NStr::EqualNocase(iter->first, "Rendering")) {
361  if (NStr::EqualNocase(iter->second, "Histogram")) {
363  } else if (NStr::EqualNocase(iter->second, "SingleLine")) {
365  } else {
368  }
369  }
370  } catch (CException& e) {
371  LOG_POST(Warning << "CFeatureTrack::x_LoadSettings() "
372  << e.GetMsg());
373  }
374  }
375 
376  // we would rather assume there are linked features when we
377  // hide the child features since we don't really know if
378  // there are children or not
380  m_HasLinkedFeats = true;
381  }
382 }
383 
384 
385 
386 void CFeatureTrack::x_SaveSettings(const string& /*preset_style*/)
387 {
388  TKeyValuePairs settings;
389  settings["Layout"] = LayoutValueToStr(m_Layout);
390  settings["LinkedFeat"] = LinkedFeatDisplayValueToStr(m_LinkedFeat);
392 }
393 
394 
396 {
397  switch (id) {
398  case eIcon_Content:
400  break;
401  case eIcon_Layout:
403  break;
404  default:
405  // use default handlers
407  }
408 }
409 
410 
411 static const string kWeightKey = "Weight";
412 static const string kDispSettings = "DisplaySettings";
413 
414 bool s_IsSetWeight(const CSeq_feat& feat)
415 {
416  if (feat.IsSetExts()) {
417  const CSeq_feat::TExts& exts = feat.GetExts();
418  ITERATE (CSeq_feat::TExts, iter, exts) {
419  if ((*iter)->GetType().IsStr() &&
420  (*iter)->GetType().GetStr() == kDispSettings &&
421  (*iter)->GetFieldRef(kWeightKey)) {
422  return true;
423  }
424  }
425  }
426  return false;
427 }
428 
429 int s_GetWeight(const CSeq_feat& feat)
430 {
431  if (feat.IsSetExts()) {
432  const CSeq_feat::TExts& exts = feat.GetExts();
433  ITERATE (CSeq_feat::TExts, iter, exts) {
434  if ((*iter)->GetType().IsStr() &&
435  (*iter)->GetType().GetStr() == kDispSettings &&
436  (*iter)->GetFieldRef(kWeightKey)) {
437  return (*iter)->GetFieldRef(kWeightKey)->GetData().GetInt();
438  }
439  }
440  }
441  return -1;
442 }
443 
445 {
446  if (!hist) {
447  ERR_POST(Error << "Empty histogramm");
448  return;
449  }
450  if (layout == -1)
451  layout = m_Layout;
452  hist->SetLevel(0);
453  hist->SetDialogHost(dynamic_cast<IGlyphDialogHost*>(m_LTHost));
455  hist->SetSubtype(subtype);
457  if (ELayout(layout) == eLayout_OneLine) {
459  SetMsg("");
461  CRef<CHistParams> src_config = hist_mgr->GetHistParams(m_Subtype);
462  *config = *src_config;
463  config->m_Type = CHistParams::eSmearBar;
464  config->m_Height = 10.0;
465  config->m_Colors["0"] =
468  m_gConfig->GetCustomFeatColors()->GetColorCode();
469  for (size_t i = 1; i < colors.size(); ++i) {
470  config->m_Colors[NStr::SizetToString(i)] = colors[i];
471  }
472  hist_mgr->AddTempSettings(hist->GetAnnotName(), config);
474  if (subtype != objects::CSeqFeatData::eSubtype_any && subtype != objects::CSeqFeatData::eSubtype_bad) {
476  if (!descr.empty()) {
477  descr[0] = toupper(descr[0]);
478  } else {
479  descr = "Feature";
480  }
481  descr += ", heatmap";
482  hist->SetDesc(descr);
483  }
484  }
485  } else {
486  CRef<CHistParams> hist_conf;
487  if (subtype != objects::CSeqFeatData::eSubtype_any && subtype != objects::CSeqFeatData::eSubtype_bad) {
488  hist_conf = hist_mgr->GetHistParams(subtype);
489  } else if (!hist_mgr->HasSettings(hist->GetAnnotName())) {
490  CRef<CHistParams> def_conf = hist_mgr->GetDefHistParams();
491  hist_conf = Ref(new CHistParams(*def_conf));
492  hist_mgr->AddSettings(hist->GetAnnotName(), hist_conf);
493  } else {
494  hist_conf = hist_mgr->GetHistParams(hist->GetAnnotName());
495  }
496  hist->SetDesc(GetTitle());
497 
498  SetMsg(", Distribution histogram");
499  }
500  hist->SetConfig(*m_gConfig);
502  Add(hist);
503 }
504 
506 {
507  const CNamedGroup* first_group =
508  dynamic_cast<const CNamedGroup*>(GetChildren().front().GetPointer());
509 
510  // preprocessing to check if we need to show the features in
511  // a more compact form.
512  int feat_size = 0;
513  if (first_group) {
515  const CNamedGroup* group = dynamic_cast<const CNamedGroup*>(iter->GetPointer());
516  _ASSERT(group);
518  }
519  } else {
521  }
522 
523  if ( !m_HasLinkedFeats ) {
524  // we need to do something differently for features with
525  // special display settings. Currently, this is mainly
526  // done for primer features created by cPrimer BLAST.
527  const CSeqGlyph* glyph = GetChildren().front();
528  if (first_group) {
529  glyph = first_group->GetChildren().front();
530  }
531  bool set_weight = false;
532  if (const CClonePlacementGlyph* cp_glyph =
533  dynamic_cast<const CClonePlacementGlyph*>(glyph)) {
534  set_weight = s_IsSetWeight(cp_glyph->GetFeature());
535  } else if (const CFeatGlyph* feat_glyph = dynamic_cast<const CFeatGlyph*>(glyph)) {
536  set_weight = s_IsSetWeight(feat_glyph->GetFeature());
537  }
538 
539  if (set_weight) {
541  m_Layered->SetSorted(true);
542  }
543  }
544 
546  bool compact_mode = feat_size > m_CompactThreshold;
547 
548  int vert_space = m_gConfig->GetObjectSpace();
549  if (compact_mode) {
550  vert_space = 1;
552  } else {
553  m_Layered->SetMaxRow(-1); // no limitation
554  }
555 
556  m_Layered->SetVertSpace(vert_space);
557  m_Column->SetVertSpace(vert_space);
558  m_Compact->SetVertSpace(vert_space);
559  m_GroupSimple->SetVertSpace(vert_space);
560  m_GroupLayered->SetVertSpace(vert_space);
561  m_LinkedGroup->SetVertSpace(vert_space);
562 
563  if (compact_mode && m_HasLinkedFeats) {
565  }
566 
567  if (first_group) {
569  CNamedGroup* curr_group = dynamic_cast<CNamedGroup*>(grp_iter->GetPointer());
570  _ASSERT(curr_group);
571  x_RegroupFeats(curr_group->SetChildren(), link_mode);
572  x_InitGlyphs_Recursive(curr_group->SetChildren(), 0, compact_mode);
573 
574  // initialize named group
575  curr_group->SetTitleColor(m_gConfig->GetFGCommentColor());
578  curr_group->SetIndent(GetIndent() + 2);
580  curr_group->SetRepeatTitle(m_gConfig->GetRepeatComment());
581  curr_group->SetShowTitle(m_gConfig->GetShowComments());
582  x_InitLayoutPolicy(*curr_group, link_mode);
583  }
585  } else {
586  x_RegroupFeats(SetChildren(), link_mode);
587  x_InitGlyphs_Recursive(SetChildren(), 0, compact_mode);
588  x_InitLayoutPolicy(SetGroup(), link_mode);
589  }
590  SetGroup().SetLinkedFeat(link_mode);
591 }
592 
594 {
595  SetGroup().Clear();
596  SetMsg("");
597  const CSeqGlyph::TObjects& objs = result.m_ObjectList;
598 
599  // no features or histogram
600  if (objs.empty() && !result.m_ExtraObj) {
601  m_Attrs |= fNavigable;
602  x_UpdateLayout();
603  return;
604  }
605 
606  m_AnnotName = result.m_Desc;
607 
608  if (!objs.empty()) { // show individual features
609  SetObjects(result.m_ObjectList);
611  // auto feat_size = GetGroup().GetChildren().size();
612  // always pack if there are too many of them
613  bool pack = false; // feat_size > kMaxShownFeats;
614  // don't pack on sequence level
615  bool sequence_level = m_Context->GetScale() <= 1. / 8.;
616  if (!sequence_level && m_FeatLimits > 0) { // m_FeatLimits here is a derivative of layout mode
617  // update to build layout and get the group's height
618  Update(true);
620  }
621  if (pack && result.m_ExtraObj) {
622  CRef<CSeqGlyph> glyph = result.m_ExtraObj;
623  CHistogramGlyph* hist = dynamic_cast<CHistogramGlyph*>(glyph.GetPointer());
624  if (hist) {
625  SetGroup().Clear();
626  x_AddHistogram(hist, m_DS->IsBigBed() ? eLayout_OneLine : -1);
627  }
628 
629  } else {
630 
631  if (x_HasLinkedFeats())
632  x_RegisterIcon(SIconInfo(eIcon_Content, "Child features", true, "track_content"));
633 
634  string msg = ", total ";
635  const size_t obj_size = objs.size();
637  if (obj_size > 1) {
638  msg += m_HasLinkedFeats ? " linked feature groups" : " features";
639  } else {
640  msg += m_HasLinkedFeats ? " linked feature group" : " feature";
641  }
642  msg += " shown";
643  SetMsg(msg);
644  m_Attrs |= fNavigable;
645  }
646 
647  } else { // show as a histogram
648  CRef<CSeqGlyph> hist_glyph = result.m_ExtraObj;
649  CHistogramGlyph* hist = dynamic_cast<CHistogramGlyph*>(hist_glyph.GetPointer());
650  x_AddHistogram(hist, m_DS->IsBigBed() ? eLayout_OneLine : -1);
651  }
652 
653  x_UpdateLayout();
654 }
655 
656 
658 {
659  if (GetHighlights().empty()) return false;
660 
661  ITERATE (CSeqGlyph::TObjects, iter, objs) {
662  const CLayoutGroup* group = dynamic_cast<const CLayoutGroup*>(iter->GetPointer());
663  if (group && x_NeedHighlight(group->GetChildren())) {
664  return true;
665  } else {
666  const CFeatGlyph* feat =
667  dynamic_cast<const CFeatGlyph*>(iter->GetPointer());
668  if (x_NeedHighlight(feat)) {
669  return true;
670  }
671  }
672  }
673  return false;
674 }
675 
676 
678 {
679  string label;
680  const CFeatGlyph* feat = dynamic_cast<const CFeatGlyph*>(glyph);
681  if (feat) {
683  } else {
684  const CClonePlacementGlyph* clone =
685  dynamic_cast<const CClonePlacementGlyph*>(glyph);
686  if (clone) {
687  label = clone->GetLabel();
688  }
689  }
690 
692  if (GetHighlights().count(label) > 0) {
693  return true;
694  }
695 
696  return false;
697 }
698 
699 
701  ELinkedFeatDisplay link_mode)
702 {
703  if (link_mode == ELinkedFeatDisplay::eLFD_Packed) {
704  // put all the linked child features into one CLinkedFeatsGroup
705  NON_CONST_ITERATE (CSeqGlyph::TObjects, iter, objs) {
706  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(iter->GetPointer());
707  if (group && group->GetChildrenNum() > 1) {
708  CRef<CLinkedFeatsGroup> feat_group;
709 
710  CLayoutGroup::TObjectList& child_objs = group->SetChildren();
711  size_t num_child = child_objs.size();
712  CLayoutGroup::TObjectList::iterator c_iter = child_objs.begin();
713  ++c_iter;
714  while (c_iter != child_objs.end()) {
715  CRef<CSeqGlyph> child = *c_iter;
716  CLayoutGroup* c_group = dynamic_cast<CLayoutGroup*>(child.GetPointer());
717  if ( !c_group && num_child == 2) {
718  break;
719  }
720  if (!feat_group) {
721  feat_group.Reset(new CLinkedFeatsGroup);
722  CRef<CSeqGlyph> child0 = group->GetChild(0);
723  const CFeatGlyph* p_feat =
724  dynamic_cast<const CFeatGlyph*>(child0.GetPointer());
725  _ASSERT(p_feat);
726  feat_group->SetParentFeat(p_feat);
727  feat_group->SetLabelType(CLinkedFeatsGroup::fLabel_FeatNum);
728  }
729  if (c_group) {
730  x_ExtracGlyphs_Recursive(c_group->SetChildren(), feat_group);
731  } else {
732  feat_group->PushBack(child);
733  }
734  c_iter = child_objs.erase(c_iter);
735  }
736  if (feat_group) {
737  group->PushBack(feat_group.GetPointer());
738  }
739  }
740  }
741  } else if (link_mode == ELinkedFeatDisplay::eLFD_PackedWithParent) {
742  // put all the linked child features and the parent feature
743  // into one CLinkedFeatsGroup
744  NON_CONST_ITERATE (CSeqGlyph::TObjects, iter, objs) {
745  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(iter->GetPointer());
746  if (group) {
748  x_ExtracGlyphs_Recursive(group->SetChildren(), feat_group);
749  feat_group->SetParent(&m_Group);
750  feat_group->SetLabelType(CLinkedFeatsGroup::fLabel_Both);
751  feat_group->SetFirstIsParent();
752  iter->Reset(feat_group.GetPointer());
753  }
754  }
755  } else if (link_mode == ELinkedFeatDisplay::eLFD_Hidden) {
756  // remove all chidren features
757  CSeqGlyph::TObjects::iterator iter = objs.begin();
758  while (iter != objs.end()) {
759  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(iter->GetPointer());
760  if (group) {
761  if (x_NeedHighlight(group->GetChildren())) {
763  CRef<CSeqGlyph> child1 = group->GetChild(1);
764  CLayoutGroup* c_group =
765  dynamic_cast<CLayoutGroup*>(child1.GetPointer());
766  if (c_group) {
768  CRef<CSeqGlyph> child0 = group->GetChild(0);
769  const CFeatGlyph* p_feat =
770  dynamic_cast<const CFeatGlyph*>(child0.GetPointer());
771  _ASSERT(p_feat);
772  feat_group->SetParentFeat(p_feat);
773  feat_group->SetLabelType(CLinkedFeatsGroup::fLabel_FeatNum);
774  x_ExtracGlyphs_Recursive(c_group->SetChildren(), feat_group);
775  group->Remove(c_group);
776  group->PushBack(feat_group.GetPointer());
777  }
778 
781  x_ExtracGlyphs_Recursive(group->SetChildren(), feat_group);
782  feat_group->SetParent(&m_Group);
783  feat_group->SetLabelType(CLinkedFeatsGroup::fLabel_Both);
784  feat_group->SetFirstIsParent();
785  iter->Reset(feat_group.GetPointer());
786  }
787  } else if (group->GetChildrenNum() > 0) {
788  CRef<CSeqGlyph> p_feat = group->SetChildren().front();
789  p_feat->SetParent(group->SetParent());
790  iter->Reset(p_feat.GetPointer());
791  }
792  }
793  ++iter;
794  }
795  }
796 }
797 
798 
800  int curr_level,
801  bool compact_mode)
802 {
803  bool need_highlight = false;
806  conf = m_gConfig->GetFeatParams("dbvar");
807  } else {
809  }
810 
811  NON_CONST_ITERATE (CSeqGlyph::TObjects, iter, objs) {
812  CSeqGlyph* glyph = *iter;
813  glyph->SetHideLabel(compact_mode);
815  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(glyph);
816  if (group) {
817  if ( !m_GroupConfig ) {
818  m_GroupConfig.Reset(new CBoundaryParams(true, false,
819  CRgbaColor(0.6f, 0.6f, 0.6f, 0.6f), CRgbaColor("white"), 1.0));
820  }
821  if (curr_level % 2 == 0 && m_LinkedFeat != ELinkedFeatDisplay::eLFD_ParentHidden) {
823  group->SetConfig(m_GroupConfig);
824  } else {
826  }
827  if (x_InitGlyphs_Recursive(group->SetChildren(), curr_level + 1, compact_mode)) {
828  need_highlight = true;
829  group->SetHighlighted(true);
830  if (m_HighlightsColor.get())
831  group->SetHighlightsColor(*m_HighlightsColor.get());
832  }
833  } else if (CLinkedFeatsGroup* feat_group =
834  dynamic_cast<CLinkedFeatsGroup*>(glyph)) {
835  feat_group->SetLayoutPolicy(m_LinkedGroup);
836  feat_group->SetConfig(m_gConfig->GetFeatParams("LinkedFeats"));
837  feat_group->SetGroup().SetRenderingContext(m_Context);
838 
839  if (x_InitGlyphs_Recursive(feat_group->SetChildren(), curr_level + 1, compact_mode)) {
840  need_highlight = true;
841  feat_group->SetHighlighted(true);
842  if (m_HighlightsColor.get())
843  feat_group->SetHighlightsColor(*m_HighlightsColor.get());
844  }
845  } else {
846  if (!GetHighlights().empty() && x_NeedHighlight(glyph)) {
847  glyph->SetHighlighted(true);
848  need_highlight = true;
849  glyph->SetHideLabel(false);
850  if (m_HighlightsColor.get())
851  glyph->SetHighlightsColor(*m_HighlightsColor.get());
852  }
853 
854  CFeatGlyph* feat = dynamic_cast<CFeatGlyph*>(glyph);
855  if (feat) {
857  feat->SetConfig(conf);
858  }
859  else {
860  CConstRef<CFeatureParams> feat_conf = m_gConfig->GetFeatParams(feat->GetFeature().GetData().GetSubtype());
861  feat->SetConfig(feat_conf);
862  }
863  }
864  else {
865  CClonePlacementGlyph* cp = dynamic_cast<CClonePlacementGlyph*>(glyph);
866  if (cp) {
868  }
869  }
870  }
871  }
872  return need_highlight;
873 }
874 
875 
877  CLinkedFeatsGroup* feat_group)
878 {
880  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(iter->GetPointer());
881  if (group) {
882  x_ExtracGlyphs_Recursive(group->SetChildren(), feat_group);
883  }
884  else {
885  feat_group->PushBack(*iter);
886  }
887  }
888 }
889 
890 
892  int& count,
893  bool is_overview)
894 {
895  ITERATE(CSeqGlyph::TObjects, iter, objs) {
896  // If it is in zoomed-in view (not overview), and features are linked,
897  // we won't show them in a compact mode, hence no need to count feature
898  // number.
899  if (!is_overview && m_HasLinkedFeats) {
900  break;
901  }
902  const CLayoutGroup* group =
903  dynamic_cast<const CLayoutGroup*>(iter->GetPointer());
904  if (group) {
905  if (!m_HasLinkedFeats) {
906  m_HasLinkedFeats = true;
907  }
908  x_CountFeats_recursive(group->GetChildren(), count, is_overview);
909  }
910  else {
911  ++count;
912  }
913  }
914 }
915 
916 
918 {
919  wxMenu menu;
920  UseDefaultMarginWidth(menu);
921  int id_base = 10000;
922  ITERATE(TLinkedFeatMap, iter, sm_LinkedFeatMap) {
923  string label;
924  switch (iter->second) {
926  label = "Show all";
927  break;
929  label = "Show parent, not children";
930  break;
932  label = "Show parent, expand children upon a click";
933  break;
935  label = "Show parent, merge children";
936  break;
938  label = "Merge parent and children";
939  break;
941  label = "Show children, not parent";
942  default:
943  break;
944  }
945 
946  if (!label.empty()) {
947  wxMenuItem* item = menu.AppendRadioItem(id_base + iter->second, ToWxString(label));
948  if (m_LinkedFeat == iter->second) {
949  item->Check();
950  }
951  }
952  }
953 
954  m_LTHost->LTH_PopupMenu(&menu);
955  wxMenuItemList& item_list = menu.GetMenuItems();
956  ITERATE(wxMenuItemList, iter, item_list) {
957  ELinkedFeatDisplay id = (ELinkedFeatDisplay)((*iter)->GetId() - id_base);
958  if ((*iter)->IsChecked() && id != m_LinkedFeat) {
959  m_LinkedFeat = id;
960  x_SaveSettings("");
961  x_UpdateData();
962  }
963  }
964 }
965 
966 
968 {
969  wxMenu menu;
970  UseDefaultMarginWidth(menu);
971  int id_base = 10000;
972  ITERATE (TLayoutMap, iter, sm_LayoutMap) {
973  bool l_default = iter->second == eLayout_Default;
974  wxMenuItem* item = menu.AppendRadioItem(id_base + iter->second,
975  ToWxString(iter->first + (l_default ? " (Default)" : "")));
976 
977  if (m_Layout == iter->second) {
978  item->Check();
979  }
980  }
981 
982  m_LTHost->LTH_PopupMenu(&menu);
983  wxMenuItemList& item_list = menu.GetMenuItems();
984  ITERATE (wxMenuItemList, iter, item_list) {
985  ELayout id = (ELayout)((*iter)->GetId() - id_base);
986  if ((*iter)->IsChecked() && id != m_Layout) {
987  m_Layout = id;
988  x_SaveSettings("");
990  x_UpdateData();
991  }
992  }
993 }
994 
995 
997  ELinkedFeatDisplay link_mode)
998 {
999  switch (m_Layout) {
1000  case eLayout_ExpandedByPos:
1002  group.SetLayoutPolicy(m_Simple);
1003  break;
1005  group.SetLayoutPolicy(m_Inline);
1006  break;
1008  group.SetLayoutPolicy(m_Column);
1009  break;
1010  default:
1011  if (link_mode == ELinkedFeatDisplay::eLFD_Expanded ||
1012  link_mode == ELinkedFeatDisplay::eLFD_Packed ||
1015  link_mode == ELinkedFeatDisplay::eLFD_Expandable) {
1016  // apply more compact layout, but more expensive
1017  group.SetLayoutPolicy(m_Compact);
1018  } else {
1019  group.SetLayoutPolicy(m_Layered);
1020  }
1021  break;
1022  }
1023 }
1024 
1025 
1027 {
1028  switch (m_Layout) {
1029  case eLayout_Packed:
1030  m_FeatLimits = 0;
1032  break;
1033  case eLayout_OneLine:
1034  m_FeatLimits = -2;
1036  break;
1038  if (m_HistThreshold > 0) {
1039  m_FeatLimits = static_cast<int>(m_HistThreshold);
1040  } else {
1042  }
1044  break;
1046  if (m_HistThreshold > 0) {
1047  m_FeatLimits = static_cast<int>(m_HistThreshold);
1048  } else {
1050  }
1052  break;
1054  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1055  break;
1057  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1058  break;
1059  case eLayout_ExpandedByPos:
1060  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1062  break;
1064  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1066  break;
1067  default:
1068  _ASSERT(false);
1069  break;
1070  }
1071 }
1072 
1073 
1074 static bool s_FeatByWeight(const CRef<CSeqGlyph>& g1,
1075  const CRef<CSeqGlyph>& g2)
1076 {
1077  int w1 = -1, w2 = -1;
1078  if (const CClonePlacementGlyph* cp_glyph =
1079  dynamic_cast<const CClonePlacementGlyph*>(&*g1)) {
1080  w1 = s_GetWeight(cp_glyph->GetFeature());
1081  } else if (const CFeatGlyph* feat_glyph =
1082  dynamic_cast<const CFeatGlyph*>(&*g1)) {
1083  w1 = s_GetWeight(feat_glyph->GetFeature());
1084  }
1085 
1086  if (const CClonePlacementGlyph* cp_glyph =
1087  dynamic_cast<const CClonePlacementGlyph*>(&*g2)) {
1088  w2 = s_GetWeight(cp_glyph->GetFeature());
1089  } else if (const CFeatGlyph* feat_glyph =
1090  dynamic_cast<const CFeatGlyph*>(&*g2)) {
1091  w2 = s_GetWeight(feat_glyph->GetFeature());
1092  }
1093 
1094  return w2 < w1;
1095 }
1096 
1097 
1099 {
1100  // sort feature by weight from large to small
1101  objs.sort(s_FeatByWeight);
1102 }
1103 
1104 
1105 ///////////////////////////////////////////////////////////////////////////////
1106 /// CFeatureTrackFactory
1107 ///////////////////////////////////////////////////////////////////////////////
1110  ISGDataSourceContext* ds_context,
1111  CRenderingContext* r_cntx,
1112  const SExtraParams& params,
1113  const TAnnotMetaDataList& src_annots) const
1114 {
1115  TAnnotNameTitleMap annots;
1116  TTrackMap tracks;
1117 
1118  TKeyValuePairs track_settings;
1119  CSGConfigUtils::ParseProfileString(params.m_TrackProfile, track_settings);
1120 
1121  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1122  CFeatListItem item;
1123  if ( !feats.GetItemByKey(params.m_Subkey, item) && (params.m_Subkey != "auto") ) {
1124  return tracks;
1125  }
1126 
1127  if (params.m_SkipGenuineCheck && !params.m_Annots.empty()) {
1128  ITERATE (SExtraParams::TAnnots, iter, params.m_Annots) {
1129  annots.insert(TAnnotNameTitleMap::value_type(*iter, ""));
1130  }
1131  } else {
1132 
1133  // collect non-NA tracks
1134  TSeqRange range = params.m_Range;
1135  if (range.Empty()) {
1136  range = r_cntx->GetVisSeqRange();
1137  }
1138 
1139  CIRef<ISGDataSource> pre_ds = ds_context->GetDS(
1140  typeid(CSGFeatureDSType).name(), object);
1141  CSGFeatureDS* seq_ds = dynamic_cast<CSGFeatureDS*>(pre_ds.GetPointer());
1142  seq_ds->SetDepth(params.m_Level);
1143  seq_ds->SetAdaptive(params.m_Adaptive);
1144 
1145  // we only create track for feature subtypes that data are available
1148  seq_ds->GetAnnotNames(sel, range, annots);
1149 
1150  // collect NA tracks
1151  if ( !src_annots.empty() ) {
1152  GetMatchedAnnots(src_annots, params, annots);
1153  }
1154  }
1155 
1156  // create feature tracks
1157  ITERATE (TAnnotNameTitleMap, iter, annots) {
1158  CIRef<ISGDataSource> ds = ds_context->GetDS(
1159  typeid(CSGFeatureDSType).name(), object);
1160  CSGFeatureDS* seq_ds = dynamic_cast<CSGFeatureDS*>(ds.GetPointer());
1161  seq_ds->SetDepth(params.m_Level);
1162  seq_ds->SetAdaptive(params.m_Adaptive);
1163  if (track_settings.count("graph_cache_key") > 0) {
1164  seq_ds->SetGraphCacheKey(track_settings["graph_cache_key"]);
1165  }
1166  if (track_settings.count("rmt_type") > 0) {
1167  seq_ds->SetRemoteDataType(track_settings["rmt_type"]);
1168  }
1169  // check the total levels of coverage graphs
1170  // seq_ds->SetGraphLevels(iter->first);
1171 
1172  CRef<CFeatureTrack> feat_track;
1173  if (item.GetSubtype() == CSeqFeatData::eSubtype_intron) {
1174  feat_track.Reset(new CIntronTrack(seq_ds, r_cntx));
1175  } else {
1176  feat_track.Reset(new CFeatureTrack(seq_ds, r_cntx));
1177  }
1178  string annot(iter->first);
1179  feat_track->SetAnnot(annot);
1180  feat_track->SetFeatSubtype(item.GetSubtype());
1181  if ( !iter->second.empty() ) {
1182  feat_track->SetTitle(iter->second);
1183  }
1184  seq_ds->SetFilter(params.m_Filter);
1185  seq_ds->SetSortBy(params.m_SortBy);
1186  tracks[annot] = feat_track.GetPointer();
1187  }
1188 
1189  return tracks;
1190 }
1191 
1193  const TAnnotMetaDataList& src_annots,
1194  const ILayoutTrackFactory::SExtraParams& params,
1195  TAnnotNameTitleMap& out_annots) const
1196 {
1197  ILayoutTrackFactory::GetMatchedAnnots(src_annots, params.m_Annots, "ftable", params.m_Subkey, out_annots);
1198 }
1199 
1201  CTempTrackProxy* track_proxy) const
1202 {
1203  const CFeatureTrack* f_track = dynamic_cast<const CFeatureTrack*>(track);
1204  CTrackProxy* tp = dynamic_cast<CTrackProxy*>(track_proxy);
1205  if (f_track && tp) {
1207  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1208  tp->SetSubkey(feats.GetStoragekey(f_track->GetFeatSubtype()));
1209  }
1210 }
1211 
1212 
1214 {
1216 }
1217 
1218 
1220 {
1222 }
1223 
1224 
1226 CFeatureTrackFactory::GetSettings(const string& /*profile*/,
1227  const TKeyValuePairs& settings,
1228  const CTempTrackProxy* track_proxy) const
1229 {
1230  CRef<CTrackConfigSet> config_set(new CTrackConfigSet);
1231  if (track_proxy) {
1232  bool is_intron_track = false;
1233  const string& subkey = track_proxy->GetSubkey();
1234  if (!subkey.empty()) {
1235  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1236  CFeatListItem item;
1237  is_intron_track = feats.GetItemByKey(subkey, item) && (item.GetSubtype() == CSeqFeatData::eSubtype_intron);
1238  }
1239  config_set->Set().push_back(x_GetSettings(settings, track_proxy, is_intron_track));
1240  } else {
1241  config_set->Set().push_back(x_GetSettings(settings, nullptr, false));
1242  config_set->Set().push_back(x_GetSettings(settings, nullptr, true));
1243  }
1244  return config_set;
1245 }
1246 
1247 
1249 CFeatureTrackFactory::x_GetSettings(const TKeyValuePairs& settings, const CTempTrackProxy* track_proxy, bool is_intron_track) const
1250 {
1251 
1253  if (!config->CanGetHelp()) // Don't overwrite the help, provided in the registry
1254  config->SetHelp() = GetThisTypeInfo().GetDescr();
1255  config->SetLegend_text("anchor_1");
1256 
1257  // we only expose one set of settings, either layout settings or
1258  // rendering options. By default, we use layout settings, but
1259  // whenever rendering options appear, we use rendering options.
1260  bool use_layout_settings = true;
1261 
1262  // JIRA SV-1794. We decided to expose feature linking option
1263  // for all feature tracks regarless of having linked features
1264  // or not. After moving track discovery from seqconfig.cgi
1265  // to SVDL module, seqconfig.cgi has no information if a user
1266  // data track has linked feature or not.
1267  bool has_linked_feats = true;
1268 
1270 
1271  // remote tracks need a different default
1272  const CTrackProxy* proxy = dynamic_cast<const CTrackProxy*>(track_proxy);
1273  if (proxy && CSeqUtils::isRmtPipelineFileType(proxy->GetDB())) {
1275  }
1278 /*
1279  bool is_intron_track = false;
1280 
1281  if (track_proxy) {
1282 
1283  const string& subkey = track_proxy->GetSubkey();
1284  if (!subkey.empty()) {
1285  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1286  CFeatListItem item;
1287  is_intron_track = feats.GetItemByKey(subkey, item) && (item.GetSubtype() == CSeqFeatData::eSubtype_intron);
1288  }
1289  }
1290 */
1291  bool sort_reads = false;
1292  bool sort_strands = false;
1293  string read_range;
1294 
1295  ITERATE (TKeyValuePairs, iter, settings) {
1296  try {
1297  if (NStr::EqualNocase(iter->first, "Layout")) {
1298  layout = CFeatureTrack::LayoutStrToValue(iter->second);
1299  } else if (NStr::EqualNocase(iter->first, "Rendering")) {
1300  rendering_str = iter->second;
1301  use_layout_settings = false;
1302  } else if (NStr::EqualNocase(iter->first, "LinkedFeat")) {
1303  link_style = CFeatureTrack::LinkedFeatDisplayStrToValue(iter->second);
1304  has_linked_feats = true;
1305  } else if (NStr::EqualNocase(iter->first, "sort_reads")) {
1306  sort_reads = NStr::StringToBool(iter->second);
1307  } else if (NStr::EqualNocase(iter->first, "sort_strands")) {
1308  sort_strands = NStr::StringToBool(iter->second);
1309  } else if (NStr::EqualNocase(iter->first, "read_range")) {
1310  read_range = iter->second;
1311  }
1312 
1313  } catch (CException& e) {
1314  LOG_POST(Warning << "CFeatureTrack::x_LoadSettings() "
1315  << e.GetMsg());
1316  }
1317  }
1318  if (is_intron_track) {
1319  has_linked_feats = false;
1320  config->SetSubkey("intron");
1321  }
1322  // add layout dropdown list
1323  if (use_layout_settings) {
1325  "Layout", "Rendering options",
1327  "Rendering style on how to layout features.");
1328 
1329  choice->SetValues().push_back(
1332  "All features on a single line",
1333  "Track is displayed, with all features collapsed on a single line.",
1334  "All the features are packed and shown as a Distribution histogram."));
1335  choice->SetValues().push_back(
1338  "Pack features if necessary",
1339  "",
1340  ""));
1341  choice->SetValues().push_back(
1344  "All features are expanded",
1345  "Track is displayed with features expanded, and on separate lines if needed.",
1346  "Always show the individual features and layer the features in a compact form"));
1347  config->SetChoice_list().push_back(choice);
1348  if (has_linked_feats) {
1350  "LinkedFeat", "Feature Linking",
1352  "Rendering style on how to render linked features.");
1353  choice->SetValues().push_back(
1356  "Show all",
1357  "All features, both parent and all child fetaures",
1358  "The black bar on top represents the parent feature. Each bar blow represents "
1359  "a child feature."));
1360  choice->SetValues().push_back(
1363  "Show parent, Merge children",
1364  "Show parent on one line and all children merged below it.",
1365  "The black bar on top represents the parent feature. Each bar blow represents "
1366  "a child feature."));
1367 
1368  choice->SetValues().push_back(
1371  "Show children, not parent",
1372  "Show only the chidlren, not parent",
1373  "The bar represent children features"));
1374 
1375  choice->SetValues().push_back(
1378  "Show parent, not children ",
1379  "Show the parent features, not the children",
1380  "The black bar represents parent feature."));
1381 
1382  choice->SetValues().push_back(
1385  "Superimpose children on parent",
1386  "Render all child features on the parent feature",
1387  "The underneath black bar represents parent feature and all the red bars on top represent the children."));
1388 
1389  config->SetChoice_list().push_back(choice);
1390  }
1391 
1392  } else {
1394  "Rendering", "Rendering options",
1395  rendering_str,
1396  "Rendering options for linked features.");
1397 
1398  choice->SetValues().push_back(
1401  "Show all",
1402  "All features, both parent and all child fetaures",
1403  "The black bar on top represents the variant region. Each bar blow represents \
1404 the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
1405 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1406  choice->SetValues().push_back(
1409  "Show parent, Merge children",
1410  "Show parent on one line and all children merged below it.",
1411  "The black bar on top represents the variant region. The bar blow represents \
1412 all of the sample level variants merged onto a single line.<br>Red: A Deletion or Loss<br> \
1413 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1414 
1415  choice->SetValues().push_back(
1418  "Show children, not parent",
1419  "Show only the supporting variants (chidlren) not the variant region (parent)",
1420  "The bar represent supporting variants in this study.<br>Red: A Deletion or Loss<br>\
1421 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1422 
1423  choice->SetValues().push_back(
1426  "Show parent, not children ",
1427  "Show the variant region (parent) not the supporting variants (children)",
1428  "The black bar represents the variant region."));
1429 
1430 // choice->SetValues().push_back(
1431 // CTrackConfigUtils::CreateChoiceItem(
1432 // CFeatureTrack::LinkedFeatDisplayValueToStr(ELinkedFeatDisplay::eLFD_PackedWithParent),
1433 // "Show on single line",
1434 // "Render all child features on the parent feature",
1435 // "The underneath black bar represents the variant region and all the red bars on top represent the supporting variants."));
1436  choice->SetValues().push_back(
1438  "SingleLine",
1439  "Display on a single line",
1440  "Track is displayed, with all features collapsed on a single line.",
1441  "All the features are packed into one line."));
1442  choice->SetValues().push_back(
1444  "Histogram",
1445  "Histogram",
1446  "Track is displayed, with all features displayed as a histogram.",
1447  "All the features are packed and shown as a Distribution histogram."));
1448 
1449  config->SetChoice_list().push_back(choice);
1450  }
1451 
1452  if (track_proxy && !track_proxy->GetSortBy().empty()) {
1453  string sort_by = track_proxy->GetSortBy();
1454 
1456  "sort_by", "Sort features by",
1457  sort_by,
1458  "Sort features according to a selected criterion.");
1459 
1460  sortby_choice->SetValues().push_back(
1462  "", "No sorting", "Don't sort features", ""));
1463 
1465  if (descr.m_Name == sort_by) {
1466  // must be a clone feature track, use different legend help
1467  config->SetLegend_text("anchor_3");
1468  } else { // otherwise, it is GRC issues
1470  }
1471 
1472  sortby_choice->SetValues().push_back(
1474  descr.m_Name, descr.m_DisplayName, descr.m_Descr, ""));
1475  config->SetChoice_list().push_back(sortby_choice);
1476  }
1477 
1478  if (is_intron_track) {
1479  config->SetCheck_boxes().push_back(
1481  "sort_reads",
1482  "Sort features by number of spliced reads (most reads first)",
1483  "Sort features by number of spliced reads (most reads first)",
1484  "", sort_reads));
1485  config->SetCheck_boxes().push_back(
1487  "sort_strands",
1488  "Sort features by strand",
1489  "Sort features by strand",
1490  "", sort_strands));
1491 
1492  string reads_min, reads_max;
1493  bool no_range = true;
1494  if (!read_range.empty()) {
1495  string r_min, r_max;
1496  CTrackConfigUtils::DecodeValueRange(read_range, r_min, r_max, no_range);
1497  if (!r_min.empty() && r_min != "inf") {
1498  reads_min = r_min;
1499  }
1500  if (!r_max.empty() && r_max != "inf") {
1501  reads_max = r_max;
1502  }
1503  config->SetHidden_settings().push_back(CTrackConfigUtils::CreateHiddenSetting("read_range", read_range));
1504  }
1505 
1506  auto range_control = CTrackConfigUtils::CreateRangeControl("read_range",
1507  "Filter by number of spliced reads (data outside the range will be hidden)",
1508  "Filter by number of spliced reads (data outside the range will be hidden)",
1509  reads_min,
1510  reads_max,
1511  no_range,
1512  false);
1513  config->SetRange_controls().push_back(range_control);
1514 
1515  }
1516  return config;
1517 }
1518 
1519 
static const map< string, CAlignmentTrack::ELayout > sm_LayoutMap
CAppJobNotification Notification send by CAppJobEventTranslator.
CBioseq_Handle –.
IBoundaryParams.
static SSorterDescriptor GetSorterDescr()
CClonePlacementGlyph is similar to CFeatureGlyph, but with different rendering style and settings.
void SetConfig(CConstRef< CClonePlacementParams > conf)
CColumnLayout is for creating layout by sorting glyphs into 'columns'.
void SetVertSpace(int d)
void SetMinDist(TSeqPos dist)
CCompactLayout is amed to generate more compact 2D layout policy than layered layout for glyphs with ...
void SetMinDist(TSeqPos dist)
vector< CRgbaColor > TColorCode
CDataTrack - a abstract base class for layout tracks which need to deal with background data retrieva...
Definition: data_track.hpp:55
const TSeqRange & x_GetVisRange() const
Definition: data_track.hpp:121
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
void SetConfig(CConstRef< CFeatureParams > conf)
const objects::CSeq_feat & GetFeature(void) const
Access the original feature.
void GetLabel(string &label, CLabel::ELabelType type) const
retrieve feature label for a given type
CFeatListItem - basic configuration data for one "feature" type.
int GetSubtype() const
CConfigurableItems - a static list of items that can be configured.
string GetStoragekey(int type, int subtype) const
Get the key used to store this type of feature.
bool GetItemByKey(const string &key, CFeatListItem &config_item) const
string GetDescription(int type, int subtype) const
Get the displayable description of this type of feature.
CFeat_CI –.
Definition: feat_ci.hpp:64
class CFeatureFilter
bool NeedFiltering() const
bool Pass(const objects::CMappedFeat *feat)
void Init(const string &filter)
CRgbaColor m_fgColor
CRef< objects::CTrackConfig > x_GetSettings(const TKeyValuePairs &settings, const CTempTrackProxy *track_proxy, bool is_intron_track) const
virtual void CloneTrack(const CLayoutTrack *track, CTempTrackProxy *track_proxy) const
duplicate any track setting from a given track instance to a proxy.
virtual CRef< objects::CTrackConfigSet > GetSettings(const string &profile, const TKeyValuePairs &settings, const CTempTrackProxy *track_proxy) const
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
CFeatureTrack::ELayout m_DefaultLayout
ELinkedFeatDisplay m_DefaultLinkedFeat
virtual const CTrackTypeInfo & GetThisTypeInfo() 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 void GetMatchedAnnots(const TAnnotMetaDataList &src_annots, const ILayoutTrackFactory::SExtraParams &params, TAnnotNameTitleMap &out_annots) const
CFeatureTrack –.
static const string & LinkedFeatDisplayValueToStr(ELinkedFeatDisplay linked_feat)
virtual void x_SaveSettings(const string &)
save part of settings to a profile string.
int m_FeatLimits
maximal number of features shown in on track.
int GetFeatSubtype() const
virtual void x_LoadFeatures(const TSeqRange &range, int feat_limit)
virtual void x_OnIconClicked(TIconID id)
Mouse left-click event handler on an icon.
void x_CountFeats_recursive(const CSeqGlyph::TObjects &objs, int &count, bool is_overview)
virtual void x_OnLayoutPolicyChanged()
CRef< CLayeredLayout > m_GroupLayered
void GenerateAsn1(objects::CSeq_entry &seq_entry, TSeqRange range)
CRef< CColumnLayout > m_Column
CSeqGraphicConfig::TFeatSubtype m_Subtype
static ELayout LayoutStrToValue(const string &layout)
int m_MaxAdaptiveHeight
Maximal feature group pixel height in adaptive mode.
CRef< CSGFeatureDS > m_DS
objects::SAnnotSelector m_FeatSel
bool x_NeedHighlight(const CSeqGlyph::TObjects &objs) const
virtual void x_OnJobCompleted(CAppJobNotification &notify)
void x_RegroupFeats(CSeqGlyph::TObjects &objs, ELinkedFeatDisplay link_mode)
rearrange the child features if necessary.
static const string & LayoutValueToStr(ELayout layout)
virtual string GetFullTitle() const
get a more meaningful title.
void x_SortFeaturesByWeight(CSeqGlyph::TObjects &objs) const
virtual void x_ParseSettings(const TKeyValuePairs &settings)
CRef< CLayeredLayout > m_LinkedGroup
CRef< CCompactLayout > m_Compact
void x_AddFeaturesLayout(const CSGJobResult &result)
bool x_HasLinkedFeats() const
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings)
load the track settings.
CRef< CSimpleLayout > m_GroupSimple
void SetAnnot(const string &annot)
int m_MaxRow
Maximal number of feature rows in one feature track.
void x_AddHistogram(CHistogramGlyph *hist, int layout=-1)
size_t m_HistThreshold
An independent histogram threshold used by SViewer.
void x_AdjustFeatureLayout()
void x_ExtracGlyphs_Recursive(CSeqGlyph::TObjects &objs, CLinkedFeatsGroup *feat_group)
CFeatureTrack(CSGFeatureDS *ds, CRenderingContext *r_cntx)
virtual ~CFeatureTrack()
CRef< CBoundaryParams > m_GroupConfig
virtual void x_UpdateData()
update track content.
static CTrackTypeInfo m_TypeInfo
void SetFeatSubtype(int subtype)
@ eLayout_ExpandedColumn
show all features with column layout
@ eLayout_AdaptiveInline
adaptively switch between packed and inline
@ eLayout_Packed
pack all feature into a histogram
@ eLayout_ExpandedLayered
show all features with layered layout
@ eLayout_OneLine
pack all feature into one line
@ eLayout_AdaptiveLayered
adaptively switch between packed and layered
@ eLayout_ExpandedByPos
show all features, one per row sorted by pos
@ eLayout_ExpandedBySize
one feature per row sorted by size
bool x_InitGlyphs_Recursive(CSeqGlyph::TObjects &objs, int curr_level, bool compact_mode)
initialize all children.
ELinkedFeatDisplay m_LinkedFeat
void x_OnContentIconClicked()
static ELinkedFeatDisplay LinkedFeatDisplayStrToValue(const string &linked_feat)
virtual const CTrackTypeInfo & GetTypeInfo() const
void ExcludeAnnotName(const string &annot)
void x_OnLayoutIconClicked()
int m_CompactThreshold
Feature number threshold between compact mode and non-compact mode.
void x_InitLayoutPolicy(CLayoutGroup &group, ELinkedFeatDisplay link_mode)
static SSorterDescriptor GetSorterDescr()
void Add(CSeqGlyph *obj)
Append a layout object to the end.
void SetObjects(const CLayoutGroup::TObjectList &objs)
const THighlights & GetHighlights() const
CLayoutGroup & SetGroup()
CRef< CInlineLayout > m_Inline
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.
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
void AddSettings(const string &name, CRef< CHistParams > hist_params)
Add a new settings for a given name.
void AddTempSettings(const string &name, CRef< CHistParams > hist_params)
Add a temporary 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:
const string & GetAnnotName() const
void SetDialogHost(IGlyphDialogHost *host)
void SetSubtype(objects::CSeqFeatData::ESubtype subtype)
void SetDesc(const string &desc)
void SetConfig(const CSeqGraphicConfig &config)
CIntronTrack.
CLayeredLayout is a standard 2D layout policy.
void SetMinDist(TSeqPos dist)
void SetLimitRowPerGroup(bool f)
void SetSorted(bool flag)
CLayoutGroup is a container of CSeqGlyphs (layout objects).
void SetLayoutPolicy(ILayoutPolicy *policy)
Set policy on how to deploy the layout of its children.
void SetConfig(const CBoundaryParams *conf)
Set composition boundary parameters.
void PushBack(CSeqGlyph *obj)
Append a layout object to the end.
void SetLinkedFeat(ELinkedFeatDisplay LinkedFeat)
TObjectList & SetChildren()
const TObjectList & GetChildren() const
CLayoutGroup inline methods.
bool Remove(CSeqGlyph *obj)
Remove a layout object.
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
File Description:
@ eIcon_Content
icon id for setting content
@ eIcon_Layout
icon id for setting layout style
ILayoutTrackHost * m_LTHost
Top level host owning the tracks.
string GetTitle() const
get the track title.
int GetIndent() const
TTrackAttrFlags m_Attrs
various track attributes
virtual void x_OnIconClicked(TIconID id)
Mouse left-click event handler on an icon.
@ fNavigable
Track has navigation controls.
void SetMsg(const string &msg)
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.
void x_RegisterIcon(const SIconInfo &icon)
register track icons.
CLinkedFeatsGroup is a container class contains related features.
void PushBack(CSeqGlyph *obj)
CMappedFeat –.
Definition: mapped_feat.hpp:59
CTitleGroup is a layout group with a title.
Definition: named_group.hpp:45
void SetTitleFont(CGlTextureFont *font)
void SetBackgroundColor(const CRgbaColor &color)
void SetRepeatDist(int dist)
void SetRepeatTitle(bool f)
void SetTitleColor(const CRgbaColor &color)
void SetIndent(int indent)
void SetShowTitle(bool f)
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
const TSeqRange & GetVisSeqRange() const
const TModelUnit & GetScale() const
TModelUnit ScreenToSeq(const TModelUnit &size) const
convert from screen pixels to sequence positions
bool IsOverviewMode() const
bool WillSeqLetterFit() const
is it enougth space to sequence letters.
class CRgbaColor provides a simple abstraction for managing colors.
Definition: rgba_color.hpp:58
static string ComposeProfileString(const TKeyValuePairs &settings)
static void ParseProfileString(const string &profile_str, TKeyValuePairs &settings)
CSGFeatureDSType.
Definition: feature_ds.hpp:156
CSGFeatureDS.
Definition: feature_ds.hpp:49
void SetRemoteDataType(const string &data_type)
Definition: feature_ds.hpp:198
void GetAnnotNames(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
Definition: feature_ds.cpp:519
void SetGraphCacheKey(const string &graph_cache_key)
Definition: feature_ds.hpp:192
void SetSortBy(const string &sortby)
Definition: feature_ds.hpp:184
bool IsBigBed() const
Definition: feature_ds.hpp:204
void SetFilter(const string &filter)
CSGFeatureDS inline method.
Definition: feature_ds.hpp:176
virtual void LoadFeatures(objects::SAnnotSelector &sel, const TSeqRange &range, TModelUnit window, TJobToken token=-1, int max_feat=-1, ELinkedFeatDisplay LinkedFeatDisplay=ELinkedFeatDisplay::eLFD_Default, const string &extra_filter="")
const string & GetFilter() const
Definition: feature_ds.hpp:180
virtual bool AllJobsFinished() const
void SetJobListener(CEventHandler *listener)
Set JobDispatcher listener.
objects::CBioseq_Handle & GetBioseqHandle(void)
Get the underlying bioseq handle.
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)
CSGJobResult – the data structure holding the seqgraphic job results.
static E_Choice GetTypeFromSubtype(ESubtype subtype)
static const CFeatList * GetFeatList()
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
class CSeqGlyph defines an interface that wraps a rectilinear abstract object.
Definition: seq_glyph.hpp:82
void SetHighlightsColor(const CRgbaColor &hl_color)
Definition: seq_glyph.hpp:640
CRenderingContext * m_Context
the rendering context
Definition: seq_glyph.hpp:346
virtual void SetHideLabel(bool)
Force to hide label.
Definition: seq_glyph.hpp:179
void SetParent(CSeqGlyph *p)
Definition: seq_glyph.hpp:670
virtual TModelUnit GetHeight() const
Definition: seq_glyph.hpp:587
unique_ptr< CRgbaColor > m_HighlightsColor
Highlight color.
Definition: seq_glyph.hpp:347
void SetLevel(int Level)
Definition: seq_glyph.hpp:287
void SetHighlighted(bool flag)
Definition: seq_glyph.hpp:634
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.
const string & GetCurrTheme() const
CRef< CGlTextureFont > GetCommentFont() const
bool GetRepeatComment() const
CConstRef< CCustomFeatureColor > GetCustomFeatColors() const
CConstRef< CFeatureParams > GetFeatParams(TFeatSubtype subtype) const
Get feature settings using a feature subtype.
int GetHistogramCutoff() const
int GetObjectSpace() const
const CRgbaColor & GetFGCommentColor() const
const CRgbaColor & GetBGCommentColor() const
CConstRef< CClonePlacementParams > GetClonePlacementParams() const
bool GetShowComments() const
int GetCommentRepeatDist() const
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
CSimpleLayout is the simpliest layout policy that simply stack a set of glyphs one on top of the othe...
@ eSort_BySeqPos
seq start position
@ eSort_BySeqSize
sequence length
void SetSortingType(TSortingMethod meth)
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 & GetSubkey() const
const string & GetSortBy() const
void SetKey(const string &key)
void SetSubkey(const string &sub_key)
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
CTrackProxy data structure contains information about the position of a track in its parent scope,...
const string & GetDB() const
CTrackTypeInfo - holds description of a layout track type.
const string & GetDescr() const
const string & GetId() const
IGlyphDialogHost An interface used for handling issues related to any dialog pops up that requires so...
Definition: seq_glyph.hpp:399
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
bool empty() const
Definition: set.hpp:133
static const Colors colors
Definition: cn3d_colors.cpp:50
static CMemoryRegistry registry
Definition: cn3d_tools.cpp:81
struct config config
ELinkedFeatDisplay
@ eLFD_Default
@ eLFD_Expandable
@ eLFD_Expanded
@ eLFD_ParentHidden
@ eLFD_Hidden
@ eLFD_PackedWithParent
@ eLFD_Packed
@ eLFD_Invalid
static const TLayoutStr s_LayoutStrs[]
USING_SCOPE(objects)
bool s_IsSetWeight(const CSeq_feat &feat)
SStaticPair< const char *, ELinkedFeatDisplay > TLinkedFeatStr
SStaticPair< const char *, CFeatureTrack::ELayout > TLayoutStr
CFeatureTrack.
static bool s_FeatByWeight(const CRef< CSeqGlyph > &g1, const CRef< CSeqGlyph > &g2)
CStaticArrayMap< string, ELinkedFeatDisplay > TLinkedFeatMap
DEFINE_STATIC_ARRAY_MAP(TLayoutMap, sm_LayoutMap, s_LayoutStrs)
static const string kDispSettings
CStaticArrayMap< string, CFeatureTrack::ELayout > TLayoutMap
static const string kWeightKey
static const TLinkedFeatStr s_LinkedFeatStrs[]
static const string kBaseKey
int s_GetWeight(const CSeq_feat &feat)
#define false
Definition: bool.h:36
static const char * pack(const char *fmt,...)
Definition: genparams.c:254
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#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
#define Handle
Definition: ncbistd.hpp:119
#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_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
static bool isRmtPipelineFileType(const string &sFileType)
check if a file type is one of remote file types
Definition: utils.cpp:819
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
Definition: utils.cpp:168
static bool IsUnnamed(const string &annot)
check if a given annotation is a unnamed annotation.
Definition: utils.hpp:528
static TAnnotNameType NameTypeStrToValue(const string &type)
Definition: utils.cpp:141
static bool isRmtAnnotName(const string &sAnnotname)
check if a given annotation was created by a remote file pipeline
Definition: utils.cpp:814
static void SetResolveDepth(objects::SAnnotSelector &sel, bool adaptive, int depth=-1)
help function for setting selector resolve depth.
Definition: utils.cpp:406
@ eAnnot_Unnamed
unnamed annotation
Definition: utils.hpp:133
CRef< CObject > GetResult() const
returns non-null pointer only if Completed or Running and has temporary results available
@ eContent
Definition: label.hpp:62
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
const CSeq_feat & GetMappedFeature(void) const
Feature mapped to the master sequence.
SAnnotSelector & SetFeatSubtype(TFeatSubtype subtype)
Set feature subtype (also set annotation and feat type)
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
#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:2812
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
Definition: ncbistr.cpp:2742
#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:5406
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:5347
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
@ fWithCommas
Use commas as thousands separator.
Definition: ncbistr.hpp:254
static const char label[]
Tdata & Set(void)
Assign a value to data member.
const TExts & GetExts(void) const
Get the Exts member data.
Definition: Seq_feat_.hpp:1477
list< CRef< CUser_object > > TExts
Definition: Seq_feat_.hpp:127
E_Choice
Choice variants.
bool IsSetExts(void) const
set of extensions; will replace 'ext' field Check if a value has been assigned to Exts data member.
Definition: Seq_feat_.hpp:1465
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_annot_.cpp:244
list< CRef< CSeq_feat > > TFtable
Definition: Seq_annot_.hpp:193
int i
range(_Ty, _Ty) -> range< _Ty >
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SUBKEY subkey
int toupper(Uchar c)
Definition: ncbictype.hpp:73
T max(T x_, T y_)
#define count
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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.
string m_Filter
potential track-specific filter.
string m_SortBy
potential track-specific sort_by.
int m_Level
layout level that limits feature retrieving used by annotation selector.
TSeqRange m_Range
The requested range we want to look at.
string m_TrackProfile
Track setting profile for additionial parameters.
string m_Subkey
A subkey for creating feature-specific layout track for a generic layout track type.
bool m_SkipGenuineCheck
Flag indicating if track verification is required.
SAnnotSelector –.
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
Definition: static_set.hpp:60
#define _ASSERT
else result
Definition: token2.c:20
#define ftable
Definition: utilfeat.h:37
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 Fri Sep 20 14:58:14 2024 by modify_doxy.py rev. 669887