1 #ifndef _POST_PROCESS_HPP_
2 #define _POST_PROCESS_HPP_
3 
4 #include <corelib/ncbiexpt.hpp>
5 #include <corelib/ncbiobj.hpp>
6 #include <objects/seq/Seq_literal.hpp>
7 #include <objects/seqloc/Seq_loc.hpp>
8 #include <objmgr/scope.hpp>
9 #include <objects/seqfeat/Variation_ref.hpp>
10 #include <objects/seqfeat/Variation_inst.hpp>
11 #include <objects/valerr/ValidErrItem.hpp>
12 
13 BEGIN_NCBI_SCOPE
14 BEGIN_SCOPE(objects)
15 
16 class CPostProcessUtils
17 {
18 public:
19     CRef<CSeq_literal> GetLiteralAtLoc(const CSeq_loc& loc, CScope& scope) const;
20 
21     bool HasIntronOffset(const CVariation_inst& var_inst) const;
22 };
23 
24 
25 class CNormalizeVariant
26 {
27 public:
CNormalizeVariant(CScope & scope)28     CNormalizeVariant(CScope& scope) : m_Scope(scope) {}
29     CRef<CSeq_feat> GetNormalizedIdentity(const CSeq_feat& seaq_feat) const;
30     void NormalizeIdentityInstance(CVariation_inst& identity_inst, const CSeq_loc& location) const;
31 
32 private:
33     CScope& m_Scope;
34     CPostProcessUtils utils;
35 };
36 
37 
38 CRef<CSeq_feat> g_NormalizeVariationSeqfeat(const CSeq_feat& feat,
39                                             CScope* scope);
40 
41 
42 class CValidateVariant
43 {
44 public:
CValidateVariant(CScope & scope)45     CValidateVariant(CScope& scope) : m_Scope(scope) {}
46 
47     void ValidateIdentityInst(const CVariation_inst& identity_inst,
48                               const CSeq_loc& location,
49                               bool IsCDS=false);
50 
51     void ValidateMicrosatelliteInst(const CVariation_inst& identity_inst,
52                               const CSeq_loc& location,
53                               bool IsCDS=false);
54 
55 private:
56     CScope& m_Scope;
57     CPostProcessUtils utils;
58 };
59 
60 
61 void g_ValidateVariationSeqfeat(const CSeq_feat& feat,
62                                 CScope* scope,
63                                 bool IsCDS=false);
64 
65 END_SCOPE(objects)
66 END_NCBI_SCOPE
67 
68 #endif // _POST_PROCESS_HPP_
69