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

Go to the SVN repository for this file.

1 /* $Id: gene_cache.hpp 101299 2023-11-28 18:18:38Z 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: Colleen Bollin
27  *
28  * File Description:
29  * Gene cache for validating features
30  * .......
31  *
32  */
33 
34 #ifndef VALIDATOR___GENE_CACHE__HPP
35 #define VALIDATOR___GENE_CACHE__HPP
36 
37 #include <corelib/ncbistd.hpp>
39 
40 #include <objmgr/scope.hpp>
41 #include <objmgr/feat_ci.hpp> // for CMappedFeat
44 #include <objects/seq/GIBB_mol.hpp>
45 #include <util/strsearch.hpp>
55 
60 
62 
64 
65 #include <objmgr/util/feature.hpp>
66 
69 
70 class CSeq_feat;
71 class CSeq_loc;
72 class CGene_ref;
73 class CBioseq_Handle;
74 
75 BEGIN_SCOPE(validator)
76 
77 
79 {
80 public:
83 
84  CConstRef<CSeq_feat> GetGeneFromCache(const CSeq_feat* feat, CScope& scope);
86  CRef<feature::CFeatTree> GetFeatTreeFromCache(const CSeq_loc& loc, CScope& scope);
87  CRef<feature::CFeatTree> GetFeatTreeFromCache(const CSeq_feat& feat, CScope& scope);
88  CRef<feature::CFeatTree> GetFeatTreeFromCache(CBioseq_Handle bh);
89  void Clear() { m_FeatGeneMap.clear(); m_SeqTreeMap.clear(); }
90  static bool IsPseudo(const CSeq_feat& feat);
91 
92 private:
95 
98 
99  static bool x_IsPseudo(const CGene_ref& gref);
100  static bool x_HasNamedQual(const CSeq_feat& feat, const string& qual);
101 };
102 
103 
104 END_SCOPE(validator)
107 
108 #endif /* VALIDATOR___GENE_CACHE__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.
User-defined methods of the data storage class.
CBioseq_Handle –.
CConstRef< CSeq_feat > GetmRNAFromCache(const CSeq_feat *feat, CScope &scope)
map< CBioseq_Handle, CRef< feature::CFeatTree > > TSeqTreeMap
Definition: gene_cache.hpp:96
map< const CSeq_feat *, CConstRef< CSeq_feat > > TFeatGeneMap
Definition: gene_cache.hpp:93
void Clear()
Definition: gene_cache.hpp:89
TSeqTreeMap m_SeqTreeMap
Definition: gene_cache.hpp:97
TFeatGeneMap m_FeatGeneMap
Definition: gene_cache.hpp:94
CScope –.
Definition: scope.hpp:92
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
Definition: map.hpp:338
Include a standard set of the NCBI C++ Toolkit most basic headers.
API (CDeflineGenerator) for computing sequences' titles ("definitions").
bool IsPseudo(const CSeq_feat &feat, CScope &scope)
Determines whether given feature is pseudo, using gene associated with feature if necessary Checks to...
Definition: sequence.cpp:1428
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
String search utilities.
bool x_IsPseudo(const CGene_ref &ref)
bool x_HasNamedQual(const CSeq_feat &feat, const string &qual)
Modified on Wed Jun 19 17:08:01 2024 by modify_doxy.py rev. 669887