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 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
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();
636  msg += NStr::SizetToString(obj_size, NStr::fWithCommas);
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 {
866  dynamic_cast<CClonePlacementGlyph*>(glyph);
867  if (cp) {
869  }
870  }
871  }
872  }
873  return need_highlight;
874 }
875 
876 
878  CLinkedFeatsGroup* feat_group)
879 {
881  CLayoutGroup* group = dynamic_cast<CLayoutGroup*>(iter->GetPointer());
882  if (group) {
883  x_ExtracGlyphs_Recursive(group->SetChildren(), feat_group);
884  }
885  else {
886  feat_group->PushBack(*iter);
887  }
888  }
889 }
890 
891 
893  int& count,
894  bool is_overview)
895 {
896  ITERATE(CSeqGlyph::TObjects, iter, objs) {
897  // If it is in zoomed-in view (not overview), and features are linked,
898  // we won't show them in a compact mode, hence no need to count feature
899  // number.
900  if (!is_overview && m_HasLinkedFeats) {
901  break;
902  }
903  const CLayoutGroup* group =
904  dynamic_cast<const CLayoutGroup*>(iter->GetPointer());
905  if (group) {
906  if (!m_HasLinkedFeats) {
907  m_HasLinkedFeats = true;
908  }
909  x_CountFeats_recursive(group->GetChildren(), count, is_overview);
910  }
911  else {
912  ++count;
913  }
914  }
915 }
916 
917 
919 {
920  wxMenu menu;
921  UseDefaultMarginWidth(menu);
922  int id_base = 10000;
923  ITERATE(TLinkedFeatMap, iter, sm_LinkedFeatMap) {
924  string label;
925  switch (iter->second) {
927  label = "Show all";
928  break;
930  label = "Show parent, not children";
931  break;
933  label = "Show parent, expand children upon a click";
934  break;
936  label = "Show parent, merge children";
937  break;
939  label = "Merge parent and children";
940  break;
942  label = "Show children, not parent";
943  default:
944  break;
945  }
946 
947  if (!label.empty()) {
948  wxMenuItem* item = menu.AppendRadioItem(id_base + iter->second, ToWxString(label));
949  if (m_LinkedFeat == iter->second) {
950  item->Check();
951  }
952  }
953  }
954 
955  m_LTHost->LTH_PopupMenu(&menu);
956  wxMenuItemList& item_list = menu.GetMenuItems();
957  ITERATE(wxMenuItemList, iter, item_list) {
958  ELinkedFeatDisplay id = (ELinkedFeatDisplay)((*iter)->GetId() - id_base);
959  if ((*iter)->IsChecked() && id != m_LinkedFeat) {
960  m_LinkedFeat = id;
961  x_SaveSettings("");
962  x_UpdateData();
963  }
964  }
965 }
966 
967 
969 {
970  wxMenu menu;
971  UseDefaultMarginWidth(menu);
972  int id_base = 10000;
973  ITERATE (TLayoutMap, iter, sm_LayoutMap) {
974  bool l_default = iter->second == eLayout_Default;
975  wxMenuItem* item = menu.AppendRadioItem(id_base + iter->second,
976  ToWxString(iter->first + (l_default ? " (Default)" : "")));
977 
978  if (m_Layout == iter->second) {
979  item->Check();
980  }
981  }
982 
983  m_LTHost->LTH_PopupMenu(&menu);
984  wxMenuItemList& item_list = menu.GetMenuItems();
985  ITERATE (wxMenuItemList, iter, item_list) {
986  ELayout id = (ELayout)((*iter)->GetId() - id_base);
987  if ((*iter)->IsChecked() && id != m_Layout) {
988  m_Layout = id;
989  x_SaveSettings("");
991  x_UpdateData();
992  }
993  }
994 }
995 
996 
998  ELinkedFeatDisplay link_mode)
999 {
1000  switch (m_Layout) {
1001  case eLayout_ExpandedByPos:
1003  group.SetLayoutPolicy(m_Simple);
1004  break;
1006  group.SetLayoutPolicy(m_Inline);
1007  break;
1009  group.SetLayoutPolicy(m_Column);
1010  break;
1011  default:
1012  if (link_mode == ELinkedFeatDisplay::eLFD_Expanded ||
1013  link_mode == ELinkedFeatDisplay::eLFD_Packed ||
1016  link_mode == ELinkedFeatDisplay::eLFD_Expandable) {
1017  // apply more compact layout, but more expensive
1018  group.SetLayoutPolicy(m_Compact);
1019  } else {
1020  group.SetLayoutPolicy(m_Layered);
1021  }
1022  break;
1023  }
1024 }
1025 
1026 
1028 {
1029  switch (m_Layout) {
1030  case eLayout_Packed:
1031  m_FeatLimits = 0;
1033  break;
1034  case eLayout_OneLine:
1035  m_FeatLimits = -2;
1037  break;
1039  if (m_HistThreshold > 0) {
1040  m_FeatLimits = static_cast<int>(m_HistThreshold);
1041  } else {
1043  }
1045  break;
1047  if (m_HistThreshold > 0) {
1048  m_FeatLimits = static_cast<int>(m_HistThreshold);
1049  } else {
1051  }
1053  break;
1055  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1056  break;
1058  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1059  break;
1060  case eLayout_ExpandedByPos:
1061  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1063  break;
1065  m_FeatLimits = m_HistThreshold > 0 ? static_cast<int>(m_HistThreshold) : -1;
1067  break;
1068  default:
1069  _ASSERT(false);
1070  break;
1071  }
1072 }
1073 
1074 
1075 static bool s_FeatByWeight(const CRef<CSeqGlyph>& g1,
1076  const CRef<CSeqGlyph>& g2)
1077 {
1078  int w1 = -1, w2 = -1;
1079  if (const CClonePlacementGlyph* cp_glyph =
1080  dynamic_cast<const CClonePlacementGlyph*>(&*g1)) {
1081  w1 = s_GetWeight(cp_glyph->GetFeature());
1082  } else if (const CFeatGlyph* feat_glyph =
1083  dynamic_cast<const CFeatGlyph*>(&*g1)) {
1084  w1 = s_GetWeight(feat_glyph->GetFeature());
1085  }
1086 
1087  if (const CClonePlacementGlyph* cp_glyph =
1088  dynamic_cast<const CClonePlacementGlyph*>(&*g2)) {
1089  w2 = s_GetWeight(cp_glyph->GetFeature());
1090  } else if (const CFeatGlyph* feat_glyph =
1091  dynamic_cast<const CFeatGlyph*>(&*g2)) {
1092  w2 = s_GetWeight(feat_glyph->GetFeature());
1093  }
1094 
1095  return w2 < w1;
1096 }
1097 
1098 
1100 {
1101  // sort feature by weight from large to small
1102  objs.sort(s_FeatByWeight);
1103 }
1104 
1105 
1106 ///////////////////////////////////////////////////////////////////////////////
1107 /// CFeatureTrackFactory
1108 ///////////////////////////////////////////////////////////////////////////////
1111  ISGDataSourceContext* ds_context,
1112  CRenderingContext* r_cntx,
1113  const SExtraParams& params,
1114  const TAnnotMetaDataList& src_annots) const
1115 {
1116  TAnnotNameTitleMap annots;
1117  TTrackMap tracks;
1118 
1119  TKeyValuePairs track_settings;
1120  CSGConfigUtils::ParseProfileString(params.m_TrackProfile, track_settings);
1121 
1122  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1123  CFeatListItem item;
1124  if ( !feats.GetItemByKey(params.m_Subkey, item) && (params.m_Subkey != "auto") ) {
1125  return tracks;
1126  }
1127 
1128  if (params.m_SkipGenuineCheck && !params.m_Annots.empty()) {
1129  ITERATE (SExtraParams::TAnnots, iter, params.m_Annots) {
1130  annots.insert(TAnnotNameTitleMap::value_type(*iter, ""));
1131  }
1132  } else {
1133 
1134  // collect non-NA tracks
1135  TSeqRange range = params.m_Range;
1136  if (range.Empty()) {
1137  range = r_cntx->GetVisSeqRange();
1138  }
1139 
1140  CIRef<ISGDataSource> pre_ds = ds_context->GetDS(
1141  typeid(CSGFeatureDSType).name(), object);
1142  CSGFeatureDS* seq_ds = dynamic_cast<CSGFeatureDS*>(pre_ds.GetPointer());
1143  seq_ds->SetDepth(params.m_Level);
1144  seq_ds->SetAdaptive(params.m_Adaptive);
1145 
1146  // we only create track for feature subtypes that data are available
1149  seq_ds->GetAnnotNames(sel, range, annots);
1150 
1151  // collect NA tracks
1152  if ( !src_annots.empty() ) {
1153  GetMatchedAnnots(src_annots, params, annots);
1154  }
1155  }
1156 
1157  // create feature tracks
1158  ITERATE (TAnnotNameTitleMap, iter, annots) {
1159  CIRef<ISGDataSource> ds = ds_context->GetDS(
1160  typeid(CSGFeatureDSType).name(), object);
1161  CSGFeatureDS* seq_ds = dynamic_cast<CSGFeatureDS*>(ds.GetPointer());
1162  seq_ds->SetDepth(params.m_Level);
1163  seq_ds->SetAdaptive(params.m_Adaptive);
1164  if (track_settings.count("graph_cache_key") > 0) {
1165  seq_ds->SetGraphCacheKey(track_settings["graph_cache_key"]);
1166  }
1167  if (track_settings.count("rmt_type") > 0) {
1168  seq_ds->SetRemoteDataType(track_settings["rmt_type"]);
1169  }
1170  // check the total levels of coverage graphs
1171  // seq_ds->SetGraphLevels(iter->first);
1172 
1173  CRef<CFeatureTrack> feat_track;
1174  if (item.GetSubtype() == CSeqFeatData::eSubtype_intron) {
1175  feat_track.Reset(new CIntronTrack(seq_ds, r_cntx));
1176  } else {
1177  feat_track.Reset(new CFeatureTrack(seq_ds, r_cntx));
1178  }
1179  string annot(iter->first);
1180  feat_track->SetAnnot(annot);
1181  feat_track->SetFeatSubtype(item.GetSubtype());
1182  if ( !iter->second.empty() ) {
1183  feat_track->SetTitle(iter->second);
1184  }
1185  seq_ds->SetFilter(params.m_Filter);
1186  seq_ds->SetSortBy(params.m_SortBy);
1187  tracks[annot] = feat_track.GetPointer();
1188  }
1189 
1190  return tracks;
1191 }
1192 
1194  const TAnnotMetaDataList& src_annots,
1195  const ILayoutTrackFactory::SExtraParams& params,
1196  TAnnotNameTitleMap& out_annots) const
1197 {
1198  ILayoutTrackFactory::GetMatchedAnnots(src_annots, params.m_Annots, "ftable", params.m_Subkey, out_annots);
1199 }
1200 
1202  CTempTrackProxy* track_proxy) const
1203 {
1204  const CFeatureTrack* f_track = dynamic_cast<const CFeatureTrack*>(track);
1205  CTrackProxy* tp = dynamic_cast<CTrackProxy*>(track_proxy);
1206  if (f_track && tp) {
1208  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1209  tp->SetSubkey(feats.GetStoragekey(f_track->GetFeatSubtype()));
1210  }
1211 }
1212 
1213 
1215 {
1217 }
1218 
1219 
1221 {
1223 }
1224 
1225 
1227 CFeatureTrackFactory::GetSettings(const string& /*profile*/,
1228  const TKeyValuePairs& settings,
1229  const CTempTrackProxy* track_proxy) const
1230 {
1231  CRef<CTrackConfigSet> config_set(new CTrackConfigSet);
1232  if (track_proxy) {
1233  bool is_intron_track = false;
1234  const string& subkey = track_proxy->GetSubkey();
1235  if (!subkey.empty()) {
1236  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1237  CFeatListItem item;
1238  is_intron_track = feats.GetItemByKey(subkey, item) && (item.GetSubtype() == CSeqFeatData::eSubtype_intron);
1239  }
1240  config_set->Set().push_back(x_GetSettings(settings, track_proxy, is_intron_track));
1241  } else {
1242  config_set->Set().push_back(x_GetSettings(settings, nullptr, false));
1243  config_set->Set().push_back(x_GetSettings(settings, nullptr, true));
1244  }
1245  return config_set;
1246 }
1247 
1248 
1250 CFeatureTrackFactory::x_GetSettings(const TKeyValuePairs& settings, const CTempTrackProxy* track_proxy, bool is_intron_track) const
1251 {
1252 
1254  if (!config->CanGetHelp()) // Don't overwrite the help, provided in the registry
1255  config->SetHelp() = GetThisTypeInfo().GetDescr();
1256  config->SetLegend_text("anchor_1");
1257 
1258  // we only expose one set of settings, either layout settings or
1259  // rendering options. By default, we use layout settings, but
1260  // whenever rendering options appear, we use rendering options.
1261  bool use_layout_settings = true;
1262 
1263  // JIRA SV-1794. We decided to expose feature linking option
1264  // for all feature tracks regarless of having linked features
1265  // or not. After moving track discovery from seqconfig.cgi
1266  // to SVDL module, seqconfig.cgi has no information if a user
1267  // data track has linked feature or not.
1268  bool has_linked_feats = true;
1269 
1271 
1272  // remote tracks need a different default
1273  const CTrackProxy* proxy = dynamic_cast<const CTrackProxy*>(track_proxy);
1274  if (proxy && CSeqUtils::isRmtPipelineFileType(proxy->GetDB())) {
1276  }
1279 /*
1280  bool is_intron_track = false;
1281 
1282  if (track_proxy) {
1283 
1284  const string& subkey = track_proxy->GetSubkey();
1285  if (!subkey.empty()) {
1286  const CFeatList& feats(*CSeqFeatData::GetFeatList());
1287  CFeatListItem item;
1288  is_intron_track = feats.GetItemByKey(subkey, item) && (item.GetSubtype() == CSeqFeatData::eSubtype_intron);
1289  }
1290  }
1291 */
1292  bool sort_reads = false;
1293  bool sort_strands = false;
1294  string read_range;
1295 
1296  ITERATE (TKeyValuePairs, iter, settings) {
1297  try {
1298  if (NStr::EqualNocase(iter->first, "Layout")) {
1299  layout = CFeatureTrack::LayoutStrToValue(iter->second);
1300  } else if (NStr::EqualNocase(iter->first, "Rendering")) {
1301  rendering_str = iter->second;
1302  use_layout_settings = false;
1303  } else if (NStr::EqualNocase(iter->first, "LinkedFeat")) {
1304  link_style = CFeatureTrack::LinkedFeatDisplayStrToValue(iter->second);
1305  has_linked_feats = true;
1306  } else if (NStr::EqualNocase(iter->first, "sort_reads")) {
1307  sort_reads = NStr::StringToBool(iter->second);
1308  } else if (NStr::EqualNocase(iter->first, "sort_strands")) {
1309  sort_strands = NStr::StringToBool(iter->second);
1310  } else if (NStr::EqualNocase(iter->first, "read_range")) {
1311  read_range = iter->second;
1312  }
1313 
1314  } catch (CException& e) {
1315  LOG_POST(Warning << "CFeatureTrack::x_LoadSettings() "
1316  << e.GetMsg());
1317  }
1318  }
1319  if (is_intron_track) {
1320  has_linked_feats = false;
1321  config->SetSubkey("intron");
1322  }
1323  // add layout dropdown list
1324  if (use_layout_settings) {
1326  "Layout", "Rendering options",
1328  "Rendering style on how to layout features.");
1329 
1330  choice->SetValues().push_back(
1333  "All features on a single line",
1334  "Track is displayed, with all features collapsed on a single line.",
1335  "All the features are packed and shown as a Distribution histogram."));
1336  choice->SetValues().push_back(
1339  "Pack features if necessary",
1340  "",
1341  ""));
1342  choice->SetValues().push_back(
1345  "All features are expanded",
1346  "Track is displayed with features expanded, and on separate lines if needed.",
1347  "Always show the individual features and layer the features in a compact form"));
1348  config->SetChoice_list().push_back(choice);
1349  if (has_linked_feats) {
1351  "LinkedFeat", "Feature Linking",
1353  "Rendering style on how to render linked features.");
1354  choice->SetValues().push_back(
1357  "Show all",
1358  "All features, both parent and all child fetaures",
1359  "The black bar on top represents the parent feature. Each bar blow represents "
1360  "a child feature."));
1361  choice->SetValues().push_back(
1364  "Show parent, Merge children",
1365  "Show parent on one line and all children merged below it.",
1366  "The black bar on top represents the parent feature. Each bar blow represents "
1367  "a child feature."));
1368 
1369  choice->SetValues().push_back(
1372  "Show children, not parent",
1373  "Show only the chidlren, not parent",
1374  "The bar represent children features"));
1375 
1376  choice->SetValues().push_back(
1379  "Show parent, not children ",
1380  "Show the parent features, not the children",
1381  "The black bar represents parent feature."));
1382 
1383  choice->SetValues().push_back(
1386  "Superimpose children on parent",
1387  "Render all child features on the parent feature",
1388  "The underneath black bar represents parent feature and all the red bars on top represent the children."));
1389 
1390  config->SetChoice_list().push_back(choice);
1391  }
1392 
1393  } else {
1395  "Rendering", "Rendering options",
1396  rendering_str,
1397  "Rendering options for linked features.");
1398 
1399  choice->SetValues().push_back(
1402  "Show all",
1403  "All features, both parent and all child fetaures",
1404  "The black bar on top represents the variant region. Each bar blow represents \
1405 the supporting level variants used to define this region.<br>Red: A Deletion or Loss<br> \
1406 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1407  choice->SetValues().push_back(
1410  "Show parent, Merge children",
1411  "Show parent on one line and all children merged below it.",
1412  "The black bar on top represents the variant region. The bar blow represents \
1413 all of the sample level variants merged onto a single line.<br>Red: A Deletion or Loss<br> \
1414 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1415 
1416  choice->SetValues().push_back(
1419  "Show children, not parent",
1420  "Show only the supporting variants (chidlren) not the variant region (parent)",
1421  "The bar represent supporting variants in this study.<br>Red: A Deletion or Loss<br>\
1422 Green: A Gain or Insertion<br>Light Gray: An Inversion"));
1423 
1424  choice->SetValues().push_back(
1427  "Show parent, not children ",
1428  "Show the variant region (parent) not the supporting variants (children)",
1429  "The black bar represents the variant region."));
1430 
1431 // choice->SetValues().push_back(
1432 // CTrackConfigUtils::CreateChoiceItem(
1433 // CFeatureTrack::LinkedFeatDisplayValueToStr(ELinkedFeatDisplay::eLFD_PackedWithParent),
1434 // "Show on single line",
1435 // "Render all child features on the parent feature",
1436 // "The underneath black bar represents the variant region and all the red bars on top represent the supporting variants."));
1437  choice->SetValues().push_back(
1439  "SingleLine",
1440  "Display on a single line",
1441  "Track is displayed, with all features collapsed on a single line.",
1442  "All the features are packed into one line."));
1443  choice->SetValues().push_back(
1445  "Histogram",
1446  "Histogram",
1447  "Track is displayed, with all features displayed as a histogram.",
1448  "All the features are packed and shown as a Distribution histogram."));
1449 
1450  config->SetChoice_list().push_back(choice);
1451  }
1452 
1453  if (track_proxy && !track_proxy->GetSortBy().empty()) {
1454  string sort_by = track_proxy->GetSortBy();
1455 
1457  "sort_by", "Sort features by",
1458  sort_by,
1459  "Sort features according to a selected criterion.");
1460 
1461  sortby_choice->SetValues().push_back(
1463  "", "No sorting", "Don't sort features", ""));
1464 
1466  if (descr.m_Name == sort_by) {
1467  // must be a clone feature track, use different legend help
1468  config->SetLegend_text("anchor_3");
1469  } else { // otherwise, it is GRC issues
1471  }
1472 
1473  sortby_choice->SetValues().push_back(
1475  descr.m_Name, descr.m_DisplayName, descr.m_Descr, ""));
1476  config->SetChoice_list().push_back(sortby_choice);
1477  }
1478 
1479  if (is_intron_track) {
1480  config->SetCheck_boxes().push_back(
1482  "sort_reads",
1483  "Sort features by number of spliced reads (most reads first)",
1484  "Sort features by number of spliced reads (most reads first)",
1485  "", sort_reads));
1486  config->SetCheck_boxes().push_back(
1488  "sort_strands",
1489  "Sort features by strand",
1490  "Sort features by strand",
1491  "", sort_strands));
1492 
1493  string reads_min, reads_max;
1494  bool no_range = true;
1495  if (!read_range.empty()) {
1496  string r_min, r_max;
1497  CTrackConfigUtils::DecodeValueRange(read_range, r_min, r_max, no_range);
1498  if (!r_min.empty() && r_min != "inf") {
1499  reads_min = r_min;
1500  }
1501  if (!r_max.empty() && r_max != "inf") {
1502  reads_max = r_max;
1503  }
1504  config->SetHidden_settings().push_back(CTrackConfigUtils::CreateHiddenSetting("read_range", read_range));
1505  }
1506 
1507  auto range_control = CTrackConfigUtils::CreateRangeControl("read_range",
1508  "Filter by number of spliced reads (data outside the range will be hidden)",
1509  "Filter by number of spliced reads (data outside the range will be hidden)",
1510  reads_min,
1511  reads_max,
1512  no_range,
1513  false);
1514  config->SetRange_controls().push_back(range_control);
1515 
1516  }
1517  return config;
1518 }
1519 
1520 
static const map< string, CAlignmentTrack::ELayout > sm_LayoutMap
#define false
Definition: bool.h:36
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:513
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)
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:818
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
Definition: utils.cpp:167
static bool IsUnnamed(const string &annot)
check if a given annotation is a unnamed annotation.
Definition: utils.hpp:525
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
static void SetResolveDepth(objects::SAnnotSelector &sel, bool adaptive, int depth=-1)
help function for setting selector resolve depth.
Definition: utils.cpp:405
@ 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:2819
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
Definition: ncbistr.cpp:2751
#define kEmptyStr
Definition: ncbistr.hpp:123
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
Definition: ncbistr.cpp:630
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
static 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_)
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 Wed Mar 27 11:25:41 2024 by modify_doxy.py rev. 669887