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

Go to the SVN repository for this file.

1 /* $Id: validerror_graph.cpp 63391 2014-06-24 18:21:42Z kornbluh $
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  * validation of seq_graph
30  * .......
31  *
32  */
33 #include <ncbi_pch.hpp>
34 #include <corelib/ncbistd.hpp>
35 #include <objects/seq/Bioseq.hpp>
38 #include <objmgr/graph_ci.hpp>
41 
42 
46 
47 
49  CValidError_base(imp)
50 {
51 }
52 
53 
55 {
56 }
57 
58 
60 {
61  if (seh.IsSeq()) {
63  } else if (seh.IsSet()) {
65  }
66 }
67 
68 
70 {
71  FOR_EACH_ANNOT_ON_BIOSEQ (it, seq) {
72  if ((*it)->IsGraph()) {
73  FOR_EACH_GRAPH_ON_ANNOT (graph, **it) {
74  if (!(*graph)->IsSetLoc()) {
76  } else {
77  CBioseq_Handle bsh =
79  m_Scope, (*graph)->GetLoc(),
81  if (m_Scope->GetBioseqHandle(seq) != bsh) {
83  }
84  }
85  ValidateSeqGraph (**graph);
86  }
87  }
88  }
89 }
90 
91 
93 {
94  FOR_EACH_ANNOT_ON_SEQSET (it, set) {
95  if ((*it)->IsGraph()) {
96  FOR_EACH_GRAPH_ON_ANNOT (graph, **it) {
98  ValidateSeqGraph (**graph);
99  }
100  }
101  }
102  FOR_EACH_SEQENTRY_ON_SEQSET (seq_it, set) {
103  if ((*seq_it)->IsSeq()) {
104  ValidateSeqGraph ((*seq_it)->GetSeq());
105  } else if ((*seq_it)->IsSet()) {
106  ValidateSeqGraph ((*seq_it)->GetSet());
107  }
108  }
109 }
110 
111 
113 {
114 }
115 
116 
118 {
120 }
121 
122 
124 {
125  if (!graph.IsSetLoc()) {
127  } else {
129  m_Scope,
130  graph.GetLoc(), m_Imp.GetTSE_Handle());
131  if (m_Scope->GetBioseqHandle(seq) != bsh) {
133  }
134  }
135 }
136 
137 
CBioseq_Handle –.
#define FOR_EACH_ANNOT_ON_BIOSEQ
Definition: seq_macros.hpp:286
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:73
bool IsSetLoc(void) const
region this applies to Check if a value has been assigned to Loc data member.
Definition: Seq_graph_.hpp:823
CCacheImpl & GetCache(void)
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
void IncrementMisplacedGraphCount(void)
Definition: validatorp.hpp:590
CBioseq_Handle GetBioseqHandleFromLocation(CScope *scope, const CSeq_loc &loc, const CTSE_Handle &tse)
void ValidateSeqGraph(const CSeq_graph &graph)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
const TSeq & GetSeq(void) const
Get the variant data.
Definition: Seq_entry_.cpp:102
void ValidateSeqGraphContext(const CSeq_graph &graph, const CBioseq_set &set)
virtual ~CValidError_graph(void)
CValidError_imp & m_Imp
Definition: validatorp.hpp:911
CSeq_entry_Handle –.
const TLoc & GetLoc(void) const
Get the Loc member data.
Definition: Seq_graph_.hpp:835
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define FOR_EACH_ANNOT_ON_SEQSET
const TSet & GetSet(void) const
Get the variant data.
Definition: Seq_entry_.cpp:124
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
bool IsSeq(void) const
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:70
User-defined methods of the data storage class.
#define FOR_EACH_GRAPH_ON_ANNOT
Definition: seq_macros.hpp:523
const CTSE_Handle & GetTSE_Handle(void)
Definition: validatorp.hpp:622
bool IsSet(void) const
Definition: set.hpp:44
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
Modified on Wed May 24 16:22:40 2017 by modify_doxy.py rev. 533848