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

Go to the SVN repository for this file.

1 /* $Id: validerror_graph.hpp 102428 2024-05-03 18:29:16Z kans $
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: Jonathan Kans, Clifford Clausen, Aaron Ucko......
27  *
28  * File Description:
29  * Privae classes and definition for the validator
30  * .......
31  *
32  */
33 
34 #ifndef VALIDATOR___VALIDERROR_GRAPH__HPP
35 #define VALIDATOR___VALIDERROR_GRAPH__HPP
36 
37 #include <corelib/ncbistd.hpp>
39 
40 #include <objmgr/scope.hpp>
44 
47 
48 class CSeq_graph;
49 class CBioseq_Handle;
50 class CBioseq;
51 class CBioseq_set;
52 
53 BEGIN_SCOPE(validator)
54 
55 // ============================ Validate SeqGraph ============================
56 
57 
59 {
60 public:
62  ~CValidError_graph() override;
63 
64  void ValidateSeqGraph(const CSeq_graph& graph);
65 
66  void ValidateSeqGraphContext(const CSeq_graph& graph, const CBioseq_set& set);
67  void ValidateSeqGraphContext(const CSeq_graph& graph, const CBioseq& seq);
68  void ValidateGraphsOnBioseq(const CBioseq& seq);
69 
70  static bool IsSupportedGraphType(const CSeq_graph& graph);
71 
72 private:
73  void x_ValidateMinValues(const CByte_graph& bg, const CSeq_graph& graph);
74  void x_ValidateMaxValues(const CByte_graph& bg, const CSeq_graph& graph);
75  bool x_ValidateGraphLocation (const CSeq_graph& graph);
76  void x_ValidateGraphOrderOnBioseq (const CBioseq& seq, vector <CRef <CSeq_graph> > graph_list);
77  void x_ValidateGraphValues(const CSeq_graph& graph, const CBioseq& seq,
78  int& first_N, int& first_ACGT, size_t& num_bases, size_t& Ns_with_score, size_t& gaps_with_score,
79  size_t& ACGTs_without_score, size_t& vals_below_min, size_t& vals_above_max);
80  void x_ValidateGraphOnDeltaBioseq(const CBioseq& seq);
81 
82  size_t GetUngappedSeqLen(const CBioseq& seq);
83 
84  bool x_GetLitLength(const CDelta_seq& delta, TSeqPos& len);
85 
86 };
87 
88 
89 END_SCOPE(validator)
92 
93 #endif /* VALIDATOR___VALIDERROR_GRAPH__HPP */
CBioseq_Handle –.
CByte_graph –.
Definition: Byte_graph.hpp:66
CDelta_seq –.
Definition: Delta_seq.hpp:66
Definition: set.hpp:45
Include a standard set of the NCBI C++ Toolkit most basic headers.
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#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
int len
Int4 delta(size_t dimension_, const Int4 *score_)
Modified on Wed Sep 04 15:00:33 2024 by modify_doxy.py rev. 669887