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

Go to the SVN repository for this file.

1 #ifndef ALGO_ALIGN_DEMO_SPLIGN_APP_HPP
2 #define ALGO_ALIGN_DEMO_SPLIGN_APP_HPP
3 
4 /* $Id: splign_app.hpp 54134 2012-05-03 21:13:45Z grichenk $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Yuri Kapustin
30 *
31 * File Description: Splign application class declarations
32 *
33 * ===========================================================================
34 */
35 
36 #include <corelib/ncbiapp.hpp>
37 #include <corelib/ncbienv.hpp>
38 #include <corelib/ncbiargs.hpp>
39 
43 
46 
48 
50 #include <objmgr/scope.hpp>
51 
54 
55 
57 
59 {
60 public:
61 
62  CSplignApp(void);
63 
64  virtual void Init();
65  virtual int Run();
66 
67 protected:
68 
72 
73 
74  void x_RunSplign(bool raw_hits, THitRefs* phitrefs,
75  THit::TCoord smin, THit::TCoord smax,
76  CSplign::TResults * psplign_results);
77 
78  void x_ProcessPair(THitRefs& hitrefs, const CArgs& args,
79  THit::TCoord smin = 0,
80  THit::TCoord smax = 0);
81 
86 
88 
89  void x_GetBl2SeqHits(CRef<objects::CSeq_id> seqid_query,
90  CRef<objects::CSeq_id> seqid_subj,
92  THitRefs* phitrefs);
93 
94  static THitRef s_ReadBlastHit(const string& m8);
95 
98 
100  void x_LogCompartmentStatus(const THit::TId & query,
101  const THit::TId & subj,
102  const CSplign::SAlignedCompartment & ac);
103 
104  bool x_GetNextPair(istream& ifs, THitRefs* hitrefs);
105  bool x_GetNextPair(const THitRefs& hitrefs, THitRefs* hitrefs_pair);
106 
107  bool x_GetNextComp(istream& ifs, THitRefs* hitrefs,
108  THit::TCoord* psubj_min,
109  THit::TCoord* psubj_max);
110 
111 
114 
117 
118  string m_AppName;
119 
120  string m_firstline;
122 
123  size_t m_CurHitRef;
124 
126 };
127 
129 
130 #endif
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
Definition: blast_types.hpp:56
CArgValue –.
Definition: ncbiargs.hpp:184
CArgs –.
Definition: ncbiargs.hpp:379
TParent::TCoord TCoord
CRef –.
Definition: ncbiobj.hpp:618
CRef< blast::CBlastOptionsHandle > x_SetupBlastOptions(bool cross)
Definition: splign_app.cpp:518
THitRefs m_PendingHits
Definition: splign_app.hpp:121
CSplign::THitRefs THitRefs
Definition: splign_app.hpp:71
static THitRef s_ReadBlastHit(const string &m8)
Definition: splign_app.cpp:216
CNcbiOstream * m_AlnOut
Definition: splign_app.hpp:97
bool x_GetNextComp(istream &ifs, THitRefs *hitrefs, THit::TCoord *psubj_min, THit::TCoord *psubj_max)
Definition: splign_app.cpp:379
bool x_GetNextPair(istream &ifs, THitRefs *hitrefs)
Definition: splign_app.cpp:281
CRef< CSplign > m_Splign
Definition: splign_app.hpp:84
string m_firstline
Definition: splign_app.hpp:120
CRef< objects::CSeq_id > x_ReadFastaSetId(const CArgValue &argval, CRef< objects::CScope >)
Definition: splign_app.cpp:573
void x_RunSplign(bool raw_hits, THitRefs *phitrefs, THit::TCoord smin, THit::TCoord smax, CSplign::TResults *psplign_results)
Definition: splign_app.cpp:889
CNcbiOstream * m_logstream
Definition: splign_app.hpp:99
blast::EProgram m_BlastProgram
Definition: splign_app.hpp:82
virtual void Init()
Initialize the application.
Definition: splign_app.cpp:95
CRef< blast::CBlastOptionsHandle > m_BlastOptionsHandle
Definition: splign_app.hpp:83
CSplignApp(void)
Definition: splign_app.cpp:87
CRef< CSplignFormatter > m_Formatter
Definition: splign_app.hpp:85
string m_AppName
Definition: splign_app.hpp:118
CSplign::THitRef THitRef
Definition: splign_app.hpp:70
virtual int Run()
Run the application.
Definition: splign_app.cpp:597
CSplign::THit THit
Definition: splign_app.hpp:69
void x_LogCompartmentStatus(const THit::TId &query, const THit::TId &subj, const CSplign::SAlignedCompartment &ac)
Definition: splign_app.cpp:471
size_t m_CurHitRef
Definition: splign_app.hpp:123
map< int, CRef< CSeq_id > > TOidToSeqId
Definition: splign_app.hpp:115
void x_GetBl2SeqHits(CRef< objects::CSeq_id > seqid_query, CRef< objects::CSeq_id > seqid_subj, CRef< objects::CScope > scope, THitRefs *phitrefs)
Definition: splign_app.cpp:848
void x_ProcessPair(THitRefs &hitrefs, const CArgs &args, THit::TCoord smin=0, THit::TCoord smax=0)
Definition: splign_app.cpp:993
CNcbiOstream * m_AsnOut
Definition: splign_app.hpp:96
TOidToSeqId m_Oid2SeqId
Definition: splign_app.hpp:116
CRef< objects::CObjectManager > m_ObjMgr
Definition: splign_app.hpp:125
vector< SAlignedCompartment > TResults
Definition: splign.hpp:299
vector< THitRef > THitRefs
Definition: splign.hpp:295
Definition: map.hpp:338
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
The Object manager core.
Defines BLAST database access classes.
Definition of SSeqLoc structure.
static string query
Modified on Sat May 18 11:35:36 2024 by modify_doxy.py rev. 669887