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

Go to the SVN repository for this file.

1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___VCF_TRACK__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___VCF_TRACK__HPP
3 
4 /* $Id: vcf_track.hpp 47374 2023-02-23 00:42:16Z evgeniev $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Liangshou Wu
30  *
31  * File Description:
32  *
33  */
34 
37 
38 
40 
41 ///////////////////////////////////////////////////////////////////////////////
42 /// CVcfTrack --
43 ///
44 
46  public CFeatureTrack
47 {
48  friend class CVcfTrackFactory;
49 
50 public:
52  virtual ~CVcfTrack();
53 
54  /// @name CLayoutTrack public methods.
55  /// @{
56  virtual const CTrackTypeInfo& GetTypeInfo() const override;
57  virtual CHTMLActiveArea* InitHTMLActiveArea(TAreaVector* p_areas) const override;
58  /// @}
59 
60  /// @name IFeatureTrackBase reimplemented methods.
61  /// @{
62  virtual bool IsVarTrack() const override { return true; }
63  /// @}
64 
65  /// @name IAsn1Generator reimplemented methods.
66  /// @{
67  // if true, this track should be handled by stage 2
68  virtual bool BypassStage1() override { return true; }
69  virtual EDataType GetDataType() const override { return eDataType_Vcf; }
70  // estimate number of features in the specified range
71  // returns true if range is acceptable for downloads
72  // if false, sMsg will contain a message that can be shown to the user
73  virtual bool CheckRange(TSeqRange range, string& sMsg, size_t& nFeats) override;
74  /// @}
75 
76 protected:
77  /// @name CFeatureTrack method override
78  /// @{
79  virtual void x_UpdateData() override;
80  virtual void x_LoadSettings(const string&, const TKeyValuePairs &settings) override;
81 
82  virtual void x_ParseSettings(const TKeyValuePairs& settings) override;
83 
84  virtual void x_OnJobCompleted(CAppJobNotification& notify) override;
85  /// @}
86 
87 private:
88  /// @name prohibited copy constructor and assignment operator.
89  /// @{
92  /// @}
93 
94 private:
96  bool m_ZoomToSee = false;
97  bool m_ShowOnlyPathogenic = false;
98 };
99 
100 ///////////////////////////////////////////////////////////////////////////////
101 /// CVcfTrackFactory
102 ///
104  public CFeatureTrackFactory
105 {
106 public:
108 
109  /// @name ILayoutTrackFactory interface implementation
110  /// @{
111  /// create a layout track based on the input objects and extra parameters.
112  virtual TTrackMap CreateTracks(
113  SConstScopedObject& object,
114  ISGDataSourceContext* ds_context,
115  CRenderingContext* r_cntx,
116  const SExtraParams& params = SExtraParams(),
117  const TAnnotMetaDataList& src_annots = TAnnotMetaDataList()) const override;
118 
119  virtual void GetMatchedAnnots(
120  const TAnnotMetaDataList& src_annots,
121  const ILayoutTrackFactory::SExtraParams& params,
122  TAnnotNameTitleMap& out_annots) const override;
123 
124  void GetMatchedAnnots(
125  ISGDataSourceContext* ds_context,
126  const TAnnotMetaDataList& src_annots,
127  const ILayoutTrackFactory::SExtraParams& params,
128  TAnnotNameTitleMap& out_annots) const;
129 
130  virtual const CTrackTypeInfo& GetThisTypeInfo() const override
131  {
132  return GetTypeInfo();
133  }
134  /// @}
135 
136  static const CTrackTypeInfo& GetTypeInfo()
137  {
138  return CVcfTrack::m_TypeInfo;
139  }
140 
141  /// @name ITrackConfigurable interface implementation
142  /// @{
144  GetSettings(const string& profile,
145  const TKeyValuePairs& settings,
146  const CTempTrackProxy* track_proxy) const override;
147  /// @}
148 
149  /// @name IExtension interface implementation
150  /// @{
151  virtual string GetExtensionIdentifier() const override;
152  virtual string GetExtensionLabel() const override;
153  /// @}
154 };
155 
156 
157 ///////////////////////////////////////////////////////////////////////////////
158 /// CVcfTrack inline methods
159 ///
160 
161 
163 
164 #endif // GUI_WIDGETS_SEQ_GRAPHIC___VCF_TRACK__HPP
CAppJobNotification Notification send by CAppJobEventTranslator.
CFeatureTrackFactory.
CFeatureTrack –.
virtual void x_OnJobCompleted(CAppJobNotification &notify)
virtual bool CheckRange(TSeqRange range, string &, size_t &)
virtual void x_ParseSettings(const TKeyValuePairs &settings)
virtual void x_LoadSettings(const string &, const TKeyValuePairs &settings)
load the track settings.
virtual void x_UpdateData()
update track content.
virtual const CTrackTypeInfo & GetTypeInfo() const
virtual CHTMLActiveArea * InitHTMLActiveArea(TAreaVector *p_areas) const
Initialize the HTML active area for a track.
CRef –.
Definition: ncbiobj.hpp:618
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
CSGFeatureDS.
Definition: feature_ds.hpp:49
vector< CHTMLActiveArea > TAreaVector
Definition: seq_glyph.hpp:84
File Description:
CTrackTypeInfo - holds description of a layout track type.
CVcfTrackFactory.
Definition: vcf_track.hpp:105
static const CTrackTypeInfo & GetTypeInfo()
Definition: vcf_track.hpp:136
virtual const CTrackTypeInfo & GetThisTypeInfo() const override
Definition: vcf_track.hpp:130
CVcfTrack –.
Definition: vcf_track.hpp:47
virtual EDataType GetDataType() const override
Definition: vcf_track.hpp:69
virtual bool IsVarTrack() const override
Definition: vcf_track.hpp:62
virtual bool BypassStage1() override
Definition: vcf_track.hpp:68
CVcfTrack & operator=(const CVcfTrack &)
CVcfTrack(const CVcfTrack &)
static CTrackTypeInfo m_TypeInfo
Definition: vcf_track.hpp:95
ISGDSManager is seqgraphic data source manage that serves as an data source context.
map< string, string > TKeyValuePairs
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
Definition: gui_export.h:536
range(_Ty, _Ty) -> range< _Ty >
extra parameter for initializing a track.
Modified on Tue Apr 16 20:10:02 2024 by modify_doxy.py rev. 669887