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

Go to the SVN repository for this file.

1 /* $Id: prosplign_params.cpp 39666 2017-10-25 16:01:13Z katargir $
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: Andrea Asztalos
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
34 
37 
39 
41 {
42  Init();
43 }
44 
46 {
47  m_WithIntrons = true; // by default, ProSplign looks for introns
48  m_Strand = 2; // check both strands
49  m_GeneticCode = 0; // the one corresponding to the nucleotide sequence
50 
54 
55  m_RefineAlignment = true;
58 
62 
66 
67 }
68 
70 {
75  return scoring;
76 }
77 
79 {
80  if (!m_RefineAlignment) {
82  }
83 
85  options->SetFillHoles(m_RemoveFlanks);
86  options->SetCutNs(m_RemoveNs);
87 
90 
92 
96  return options;
97 }
98 
99 void CProSplignParams::SetRegistryPath(const string& reg_path)
100 {
101  m_RegPath = reg_path;
102 }
103 
104 static const char
105 *kWithIntronsTag = "With introns",
106 *kNuclStrandTag = "Nucleotide strand",
107 *kGeneticCodeTag = "Genetic code ",
108 *kFrameshiftCostTag = "Frameshift penalty",
109 *kGapOpenCostTag = "Gap opening penalty",
110 *kGapExtendCostTag = "Gap extension penalty",
111 *kRefineAlignTag = "Refine alignment",
112 *kRemoveFlanksTag = "Remove flank regions",
113 *kRemoveNsTag = "Remove Ns from good regions",
114 *kTotalPosTag = "Total positives",
115 *kFlankPosTag = "Flank positives",
116 *kMinGoodLenTag = "Min good length",
117 *kMinExonIdTag = "Min exon identity",
118 *kMinExonPosTag = "Min exon positives",
119 *kMinFlankExonLenTag = "Min flanking exon length";
120 
122 {
123  if (!m_RegPath.empty()) {
125  CRegistryWriteView view = gui_reg.GetWriteView(m_RegPath);
126 
128  view.Set(kNuclStrandTag, m_Strand);
135  view.Set(kRemoveNsTag, m_RemoveNs);
142  }
143 }
144 
146 {
147  if (!m_RegPath.empty()) {
149  CRegistryReadView view = gui_reg.GetReadView(m_RegPath);
150 
166  }
167 }
168 
169 
171 {
172  ddc.SetFrame("CProSplignParams");
173 
189 }
190 
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
Output filtering parameters.
Definition: prosplign.hpp:156
CProSplignOutputOptions & SetMinExonPos(int)
minimum exon positives percentage
Definition: prosplign.cpp:658
CProSplignOutputOptions & SetMinGoodLen(int)
good piece should not be shorter than that
Definition: prosplign.cpp:719
CProSplignOutputOptions & SetMinFlankingExonLen(int)
minimum number of bases in the first and last exon
Definition: prosplign.cpp:709
static const int default_total_positives
Definition: prosplign.hpp:257
static const bool default_fill_holes
Definition: prosplign.hpp:252
static const int default_flank_positives
Definition: prosplign.hpp:256
CProSplignOutputOptions & SetCutNs(bool)
cut trailing Ns at the ends of good pieces.
Definition: prosplign.cpp:638
static const int default_min_good_len
Definition: prosplign.hpp:266
CProSplignOutputOptions & SetTotalPositives(int)
good piece total percentage threshold
Definition: prosplign.cpp:678
CProSplignOutputOptions & SetMinExonId(int)
minimum exon identity
Definition: prosplign.cpp:648
static const int default_min_flanking_exon_len
Definition: prosplign.hpp:265
CProSplignOutputOptions & SetFlankPositives(int)
any length flank of a good piece should not be worse than this percentage threshold
Definition: prosplign.cpp:668
@ ePassThrough
all zeroes - no filtering
Definition: prosplign.hpp:162
CProSplignOutputOptions & SetFillHoles(bool)
fill back holes between good pieces.
Definition: prosplign.cpp:618
static const bool default_cut_ns
Definition: prosplign.hpp:254
static const int default_min_exon_pos
Definition: prosplign.hpp:263
static const int default_min_exon_id
Definition: prosplign.hpp:262
CRef< CProSplignScoring > GetScoringParams() const
virtual void DebugDump(CDebugDumpContext ddc, unsigned int depth) const
CRef< CProSplignOutputOptions > GetOutputOptions() const
virtual void LoadSettings()
virtual void SaveSettings() const
virtual void SetRegistryPath(const string &reg_path)
CProSplignScoring & SetFrameshiftOpeningCost(int)
Definition: prosplign.cpp:495
CProSplignScoring & SetGapOpeningCost(int)
in addition to ScoreMatrix prosplign uses following costs (negate to get a score)
Definition: prosplign.cpp:475
static const int default_gap_extension
Definition: prosplign.hpp:128
static const int default_frameshift_opening
Definition: prosplign.hpp:129
static const int default_gap_opening
Definition: prosplign.hpp:127
CProSplignScoring & SetGapExtensionCost(int)
Gap Extension Cost for one aminoacid (three bases)
Definition: prosplign.cpp:485
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
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
static unsigned char depth[2 *(256+1+29)+1]
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
#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 * kGapOpenCostTag
static const char * kGapExtendCostTag
static const char * kFrameshiftCostTag
static const char * kRemoveFlanksTag
static const char * kNuclStrandTag
static const char * kMinGoodLenTag
static const char * kMinExonPosTag
static const char * kRefineAlignTag
static const char * kWithIntronsTag
static const char * kMinFlankExonLenTag
static const char * kGeneticCodeTag
static const char * kMinExonIdTag
static const char * kFlankPosTag
static const char * kTotalPosTag
static const char * kRemoveNsTag
Modified on Fri May 24 14:52:30 2024 by modify_doxy.py rev. 669887