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

Go to the SVN repository for this file.

1 /* $Id: splign_params.cpp 47464 2023-04-20 00:19:10Z evgeniev $
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: Roman Katargin
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
35 
37 
39 
41 {
42  Init();
43 }
45 {
46  Init();
47  Copy(data);
48 }
50 {
51 }
53 {
54  Copy(data);
55 }
57 {
58 ////@begin CSplignParams equality operator
59  if (!(m_CompPenalty == data.m_CompPenalty)) return false;
60  if (!(m_DiscType == data.m_DiscType)) return false;
61  if (!(m_EndGapDetect == data.m_EndGapDetect)) return false;
62  if (!(m_MaxGenomicExtent == data.m_MaxGenomicExtent)) return false;
63  if (!(m_MaxIntron == data.m_MaxIntron)) return false;
64  if (!(m_MinCompIdentity == data.m_MinCompIdentity)) return false;
65  if (!(m_MinExonIdentity == data.m_MinExonIdentity)) return false;
66  if (!(m_PolyADetect == data.m_PolyADetect)) return false;
67  if (!(m_cDNA_strand == data.m_cDNA_strand)) return false;
68 ////@end CSplignParams equality operator
69  return true;
70 }
72 {
73 ////@begin CSplignParams copy function
74  m_CompPenalty = data.m_CompPenalty;
75  m_DiscType = data.m_DiscType;
76  m_EndGapDetect = data.m_EndGapDetect;
77  m_MaxGenomicExtent = data.m_MaxGenomicExtent;
78  m_MaxIntron = data.m_MaxIntron;
79  m_MinCompIdentity = data.m_MinCompIdentity;
80  m_MinExonIdentity = data.m_MinExonIdentity;
81  m_PolyADetect = data.m_PolyADetect;
82  m_cDNA_strand = data.m_cDNA_strand;
83 ////@end CSplignParams copy function
84 }
86 {
87 ////@begin CSplignParams member initialisation
88  m_CompPenalty = 0.55;
89  m_DiscType = 0;
90  m_EndGapDetect = true;
91  m_MaxGenomicExtent = 35000;
92  m_MaxIntron = 1200000;
93  m_MinCompIdentity = 0.5;
94  m_MinExonIdentity = 0.75;
95  m_PolyADetect = true;
96  m_cDNA_strand = 0;
97 ////@end CSplignParams member initialisation
98 }
99 
100 static const char
101 *kcDNA_strandTag = "cDNA strand",
102 *kEndGapDetectTag = "EndGap Detection",
103 *kMinCompIdentityTag = "Min compartment identity",
104 *kMinExonIdentityTag = "Min exon identity",
105 *kMaxGenomicExtentTag = "Maximum Genomic Extent",
106 *kCompPenaltyTag = "Compartment penalty",
107 *kPolyADetectTag = "PolyA Detection",
108 *kMaxIntron = "MaxIntron",
109 *kDiscType = "DiskType";
110 
111 
113 {
114  if (!m_RegPath.empty()) {
116  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
117 
125  view.Set(kMaxIntron, (int)m_MaxIntron);
126  view.Set(kDiscType, m_DiscType);
127  }
128 }
129 
131 {
132  if (!m_RegPath.empty()) {
134  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
135 
143  m_MaxIntron = view.GetInt(kMaxIntron, static_cast<int>(m_MaxIntron));
145  }
146 }
147 
148 void CSplignParams::DebugDump( CDebugDumpContext ddc, unsigned int /*depth*/) const
149 {
150  ddc.SetFrame("CSplignParams");
151 
152  ddc.Log( "cDNA strand", m_cDNA_strand );
153  ddc.Log( "End Gap Detect", m_EndGapDetect );
154  ddc.Log( "PolyA Detect", m_PolyADetect );
155  ddc.Log( "Min Comp Identity", m_MinCompIdentity );
156  ddc.Log( "Min Exon Identity", m_MinExonIdentity );
157  ddc.Log( "Max Genomic Extent", m_MaxGenomicExtent );
158  ddc.Log( "Comp Penalty", m_CompPenalty );
159  ddc.Log( "Max Intron", m_MaxIntron );
160  ddc.Log( "Disc Type", m_DiscType );
161 
162  //ddc.Log( "",
163  //SConstScopedObject m_GenomicSeq;
164  //TConstScopedObjects m_cDNASeqs;
165 }
166 
167 
void SetFrame(const string &frame)
Definition: ddumpable.cpp:137
void Log(const string &name, const char *value, CDebugDumpFormatter::EValueType type=CDebugDumpFormatter::eValue, const string &comment=kEmptyStr)
Definition: ddumpable.cpp:151
CRegistryWriteView GetWriteView(const string &section)
get a read-write view at a particular level.
Definition: registry.cpp:462
static CGuiRegistry & GetInstance()
access the application-wide singleton
Definition: registry.cpp:400
CRegistryReadView GetReadView(const string &section) const
get a read-only view at a particular level.
Definition: registry.cpp:428
class CRegistryReadView provides a nested hierarchical view at a particular key.
Definition: reg_view.hpp:58
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
Definition: reg_view.cpp:230
double GetReal(const string &key, double default_val=0) const
Definition: reg_view.cpp:235
bool GetBool(const string &key, bool default_val=false) const
Definition: reg_view.cpp:241
void Set(const string &key, int val)
access a named key at this level, with no recursion
Definition: reg_view.cpp:533
char data[12]
Definition: iconv.c:80
void Copy(const CSplignParams &data)
bool operator==(const CSplignParams &data) const
void operator=(const CSplignParams &data)
virtual void LoadSettings()
virtual void DebugDump(CDebugDumpContext ddc, unsigned int depth) const
double m_MinCompIdentity
double m_MinExonIdentity
virtual void SaveSettings() const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char * kDiscType
static const char * kPolyADetectTag
static const char * kMaxIntron
static const char * kCompPenaltyTag
static const char * kMinExonIdentityTag
static const char * kMaxGenomicExtentTag
static const char * kMinCompIdentityTag
static const char * kEndGapDetectTag
static const char * kcDNA_strandTag
Modified on Fri Sep 20 14:57:03 2024 by modify_doxy.py rev. 669887