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

Go to the SVN repository for this file.

1 /* $Id: gff_feature_record.hpp 93574 2021-04-30 16:19:19Z stakhovv $
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  * Author: Frank Ludwig
27  *
28  * File Description:
29  * GFF3 transient data structures
30  *
31  */
32 
33 #ifndef OBJTOOLS_WRITERS___GFF_FEATURE_RECORD__HPP
34 #define OBJTOOLS_WRITERS___GFF_FEATURE_RECORD__HPP
35 
36 #include <objmgr/mapped_feat.hpp>
38 
40 BEGIN_objects_SCOPE // namespace ncbi::objects::
41 
42 // ============================================================================
44 // ============================================================================
45  : public CGffBaseRecord
46 {
47 public:
49  const string& id="");
51  const CGffFeatureRecord& other);
52  virtual ~CGffFeatureRecord();
53 
54  void InitLocation(
55  const CSeq_loc&);
56  void SetLocation(
57  const CSeq_interval&,
58  unsigned int,
59  unsigned int =0);
60  void SetEndpoints(
61  unsigned int start,
62  unsigned int stop,
63  ENa_strand strand);
64  const CSeq_loc& Location() const {
65  return *m_pLoc;
66  };
67  void SetGbKeyFrom(
68  CMappedFeat);
69 
70 protected:
71 };
72 
73 // ============================================================================
75 // ============================================================================
76  : public CGffBaseRecord
77 {
78 public:
80  const string& id=""): CGffBaseRecord(id) {};
81 };
82 
83 // ============================================================================
85 // ============================================================================
86  : public CGffBaseRecord
87 {
88 public:
90  const string& id="");
91 
92  void
93  AddInsertion(
94  unsigned int);
95  void
96  AddForwardShift(
97  unsigned int);
98  void
99  AddReverseShift(
100  unsigned int);
101  void
102  AddDeletion(
103  unsigned int);
104  void
105  AddMatch(
106  unsigned int);
107 
108  void
109  FinalizeMatches();
110 
111  string StrId() const { return mRecordId; };
112  string StrTarget() const;
113  string StrGap() const;
114  string StrAttributes() const;
115 
116 protected:
117  string mRecordId;
118  string mAttrGap;
120  unsigned int mAccumulatedMatches;
121 };
122 
123 END_objects_SCOPE
125 
126 #endif // OBJTOOLS_WRITERS___GFF_FEATURE_RECORD__HPP
string StrId() const
unsigned int mAccumulatedMatches
string StrTarget() const
virtual string StrAttributes() const
CRef< CSeq_loc > m_pLoc
void SetLocation(unsigned int, unsigned int, ENa_strand=objects::eNa_strand_unknown)
const CSeq_loc & Location() const
CGffSourceRecord(const string &id="")
CMappedFeat –.
Definition: mapped_feat.hpp:59
#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_XOBJWRITE_EXPORT
Definition: ncbi_export.h:1347
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
Modified on Thu Nov 30 04:52:53 2023 by modify_doxy.py rev. 669887