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

Go to the SVN repository for this file.

1 /* $Id: write_util.hpp 95055 2021-10-01 16:39:33Z ludwigf $
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: Frank Ludwig
27  *
28  * File Description: Common writer functions
29  *
30  */
31 
32 #ifndef OBJTOOLS_READERS___WRITE_UTIL__HPP
33 #define OBJTOOLS_READERS___WRITE_UTIL__HPP
34 
35 #include <corelib/ncbistd.hpp>
37 #include <objmgr/scope.hpp>
38 #include <objmgr/util/feature.hpp>
39 
46 
48 BEGIN_objects_SCOPE
49 
50 // ============================================================================
52 // ============================================================================
53 {
54 public:
55  static CRef<CUser_object> GetDescriptor(
56  const CSeq_annot& annot,
57  const string& );
58 
59  static bool GetGenomeString(
60  const CBioSource&,
61  string& );
62 
63  static bool GetOrgModSubType(
64  const COrgMod&,
65  string&,
66  string& );
67 
68  static bool GetSubSourceSubType(
69  const CSubSource&,
70  string&,
71  string& );
72 
73  static bool GetBiomol(
75  string& );
76 
77  static bool GetIdType(
79  string& );
80 
81  static bool GetIdType(
82  const CSeq_id&,
83  string& );
84 
85  static bool GetAaName(
86  const CCode_break&,
87  string& );
88 
89  static bool GetCodeBreak(
90  const CCode_break&,
91  string& );
92 
93  static bool GetTrnaProductName(
94  const CTrna_ext&,
95  string& );
96 
97  static bool GetBestId(
99  CScope&,
100  string&);
101 
102  static bool GetBestId(
103  const CMappedFeat&,
104  string&);
105 
106  static bool GetTrnaCodons(
107  const CTrna_ext&,
108  string& );
109 
110  static bool GetTrnaAntiCodon(
111  const CTrna_ext&,
112  string& );
113 
114  static bool GetDbTag(
115  const CDbtag&,
116  string& );
117 
118  static bool IsLocationOrdered(
119  const CSeq_loc& );
120 
121  static bool IsSequenceCircular(
122  CBioseq_Handle );
123 
124  static bool NeedsQuoting(
125  const string& );
126 
127  static void ChangeToPackedInt(
128  CSeq_loc& loc);
129 
130  static CConstRef<CUser_object> GetUserObjectByType(
131  const CUser_object& uo,
132  const string& strType);
133 
134  static CConstRef<CUser_object> GetUserObjectByType(
135  const list<CRef<CUser_object > >& uos,
136  const string& strType);
137 
138  static CConstRef<CUser_object> GetModelEvidence(
139  CMappedFeat);
140 
141  static bool GetStringForModelEvidence(
142  CMappedFeat mf,
143  string& mestr);
144 
145  static bool GetStringForGoMarkup(
146  const vector<CRef<CUser_field > >& fields,
147  string& goMarkup,
148  bool relaxed = false);
149 
150  static bool GetStringsForGoMarkup(
151  const vector<CRef<CUser_field > >& fields,
152  vector<string>& goMarkup,
153  bool relaxed = false);
154 
155  static bool GetListOfGoIds(
156  const vector<CRef<CUser_field > >& fields,
157  list<std::string>& goIds,
158  bool relaxed = false);
159 
160  static bool IsThreeFeatFormat(
161  const CSeq_annot&);
162 
163  static bool GetThreeFeatType(
164  const CSeq_feat&,
165  string&);
166 
167  static bool GetThreeFeatScore(
168  const CSeq_feat&,
169  int&);
170 
171  static bool GetThreeFeatRgb(
172  const CSeq_feat&,
173  string&);
174 
175  static bool CompareFeatures(
176  const CMappedFeat& lhs,
177  const CMappedFeat& rhs);
178 
179  static string GetStringId(
180  const CSeq_loc& loc);
181 
182  static bool IsNucleotideSequence(
184 
185  static bool IsProteinSequence(
187 
188  static bool IsTransspliced(
189  const CSeq_feat& feature);
190 
191  static bool IsTransspliced(
192  const CMappedFeat& mf);
193 
194  static bool GetTranssplicedEndpoints(
195  const CSeq_loc& loc,
196  unsigned int& inPoint,
197  unsigned int& outPoint);
198 
199  static ENa_strand GetEffectiveStrand(
200  const CSeq_interval&);
201 };
202 
203 END_objects_SCOPE
205 
206 #endif // OBJTOOLS_WRITERS___WRITE_UTIL__HPP
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CBioseq_Handle –.
CCode_break –.
Definition: Code_break.hpp:66
Definition: Dbtag.hpp:53
CMappedFeat –.
Definition: mapped_feat.hpp:59
@OrgMod.hpp User-defined methods of the data storage class.
Definition: OrgMod.hpp:54
CScope –.
Definition: scope.hpp:92
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
Include a standard set of the NCBI C++ Toolkit most basic headers.
#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
The Object manager core.
CConstRef< CSeq_id > GetBestId(const CBioseq &bioseq)
Modified on Fri Mar 01 10:07:55 2024 by modify_doxy.py rev. 669887