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

Go to the SVN repository for this file.

1 /* $Id: psiblast_args.hpp 69558 2015-10-30 14:04:13Z 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: Christiam Camacho
27  *
28  */
29 
30 /** @file psiblast_args.hpp
31  * Main argument class for PSI-BLAST application
32  */
33 
34 #ifndef ALGO_BLAST_BLASTINPUT___PSIBLAST_ARGS__HPP
35 #define ALGO_BLAST_BLASTINPUT___PSIBLAST_ARGS__HPP
36 
38 
40 BEGIN_SCOPE(blast)
41 
42 /// Handle command line arguments for psiblast binary
43 /// Programs supported: psiblast, phi-blastn, phi-blastp
45 {
46 public:
47  /// PSI-BLAST can only run one query at a time
48  static const int kMaxNumQueries = 1;
49 
50  /// Constructor
52 
53  /// Get the number of iterations to perform
54  size_t GetNumberOfIterations() const;
55 
56  /// Get the PSSM specified as input from the command line
57  CRef<objects::CPssmWithParameters> GetInputPssm() const;
58 
59  /// Set the PSSM from the saved search strategy
60  void SetInputPssm(CRef<objects::CPssmWithParameters> pssm);
61 
62  /// Set number of iterations from the saved search strategy
63  void SetNumberOfIterations(unsigned int num_iters);
64 
65  /// Get the query batch size
66  virtual int GetQueryBatchSize() const;
67 
68  /// Should a PSSM be saved in a checkpoint file?
69  bool SaveCheckpoint() const;
70  /// Retrieve the stream to write the checkpoint file
71  CNcbiOstream* GetCheckpointStream();
72 
73  /// Should a PSSM be saved as ASCII in a file?
74  bool SaveAsciiPssm() const;
75  /// Retrieve the stream to write the ASCII PSSM
76  CNcbiOstream* GetAsciiPssmStream();
77 
78  /// Should the PSSM after the last database search be saved
79  bool GetSaveLastPssm() const;
80 
81 protected:
82  /// Create the options handle based on the command line arguments
83  /// @param locality whether the search will be executed locally or remotely
84  /// [in]
85  /// @param args command line arguments [in]
87  x_CreateOptionsHandle(CBlastOptions::EAPILocality locality,
88  const CArgs& args);
89 
90  /// PSI-BLAST specific argument class
92 };
93 
94 END_SCOPE(blast)
96 
97 #endif /* ALGO_BLAST_BLASTINPUT___PSIBLAST_ARGS__HPP */
Interface for converting blast-related command line arguments into blast options.
int GetQueryBatchSize(EProgram program, bool is_ungapped=false, bool remote=false, bool use_default=true, string task="", bool mt_mode=false)
Retrieve the appropriate batch size for the specified task.
CArgs –.
Definition: ncbiargs.hpp:379
Base command line argument class for a generic BLAST command line binary.
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
Handle command line arguments for psiblast binary Programs supported: psiblast, phi-blastn,...
CRef< CPsiBlastArgs > m_PsiBlastArgs
PSI-BLAST specific argument class.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define NCBI_BLASTINPUT_EXPORT
Definition: ncbi_export.h:336
Modified on Sat Feb 24 07:49:04 2024 by modify_doxy.py rev. 669887