1 /*  $Id: deltablast_args.hpp 483573 2015-11-02 17:48:31Z boratyng $
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: Greg Boratyn
27  *
28  */
29 
30 /** @file deltablast_args.hpp
31  * Main argument class for DELTA-BLAST application
32  */
33 
34 #ifndef ALGO_BLAST_BLASTINPUT___DELTABLAST_ARGS__HPP
35 #define ALGO_BLAST_BLASTINPUT___DELTABLAST_ARGS__HPP
36 
37 #include <algo/blast/blastinput/blast_args.hpp>
38 #include <algo/blast/blastinput/psiblast_args.hpp>
39 
40 BEGIN_NCBI_SCOPE
41 BEGIN_SCOPE(blast)
42 
43 /// Handle command line arguments for deltablast binary
44 class NCBI_BLASTINPUT_EXPORT CDeltaBlastAppArgs : public CBlastAppArgs
45 {
46 public:
47 
48     /// Constructor
49     CDeltaBlastAppArgs();
50 
51     /// Get conserved domain database
GetDomainDatabase(void)52     CRef<CSearchDatabase> GetDomainDatabase(void)
53     {return m_DeltaBlastArgs->GetDomainDatabase();}
54 
55     /// Was printing domain hits requested
GetShowDomainHits(void) const56     bool GetShowDomainHits(void) const
57     {return m_DeltaBlastArgs->GetShowDomainHits();}
58 
59     /// Was saving Pssm requested
SaveCheckpoint(void) const60     bool SaveCheckpoint(void) const
61     {return m_PsiBlastArgs->RequiresCheckPointOutput();}
62 
63     /// Get stream for saving Pssm
GetCheckpointStream(void)64     CNcbiOstream* GetCheckpointStream(void)
65     {return m_PsiBlastArgs->GetCheckPointOutputStream();}
66 
67     /// Was saving ascii Pssm requested
SaveAsciiPssm(void) const68     bool SaveAsciiPssm(void) const
69     {return m_PsiBlastArgs->RequiresAsciiPssmOutput();}
70 
71     /// Get stream for saving ascii Pssm
GetAsciiPssmStream(void)72     CNcbiOstream* GetAsciiPssmStream(void)
73     {return m_PsiBlastArgs->GetAsciiMatrixOutputStream();}
74 
75     /// Get number of PSI-BLAST iterations
GetNumberOfPsiBlastIterations(void) const76     size_t GetNumberOfPsiBlastIterations(void) const
77     {return m_PsiBlastArgs->GetNumberOfIterations();}
78 
79     /// Get query batch size
80     virtual int GetQueryBatchSize(void) const;
81 
82     /// Should PSSM after last database search be saved
83     bool GetSaveLastPssm(void) const;
84 
85 protected:
86     /// Create the options handle based on the command line arguments
87     /// @param locality whether the search will be executed locally or remotely
88     /// [in]
89     /// @param args command line arguments [in]
90     virtual CRef<CBlastOptionsHandle>
91     x_CreateOptionsHandle(CBlastOptions::EAPILocality locality,
92                           const CArgs& args);
93 
94     /// Delta-Blast specific argument class
95     CRef<CDeltaBlastArgs> m_DeltaBlastArgs;
96 
97     /// Pssm search and Psi-Blast sepcific arguments
98     CRef<CPsiBlastArgs> m_PsiBlastArgs;
99 };
100 
101 END_SCOPE(blast)
102 END_NCBI_SCOPE
103 
104 #endif  /* ALGO_BLAST_BLASTINPUT___DELTABLAST_ARGS__HPP */
105