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

Go to the SVN repository for this file.

1 /* $Id: tblastx_args.cpp 72378 2016-05-04 14:59:01Z camacho $
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 tblastx_args.cpp
31  * Implementation of the TBLASTX command line arguments
32  */
33 
34 #include <ncbi_pch.hpp>
39 
43 
45 {
47  static const string kProgram("tblastx");
48  arg.Reset(new CProgramDescriptionArgs(kProgram,
49  "Translated Query-Translated Subject BLAST"));
50  const bool kQueryIsProtein = false;
51  m_Args.push_back(arg);
52  m_ClientId = kProgram + " " + CBlastVersion().Print();
53 
54  static const char kDefaultTask[] = "tblastx";
55  SetTask(kDefaultTask);
56 
57  m_BlastDbArgs.Reset(new CBlastDatabaseArgs);
58  m_BlastDbArgs->SetDatabaseMaskingSupport(true);
59  arg.Reset(m_BlastDbArgs);
60  m_Args.push_back(arg);
61 
62  m_StdCmdLineArgs.Reset(new CStdCmdLineArgs);
63  arg.Reset(m_StdCmdLineArgs);
64  m_Args.push_back(arg);
65 
66  // N.B.: query is not protein because the options are applied on the
67  // translated query
68  arg.Reset(new CGenericSearchArgs( !kQueryIsProtein, false, false, true));
69  m_Args.push_back(arg);
70 
71  /*arg.Reset(new CFrameShiftArgs);
72  m_Args.push_back(arg);*/
73 
75  m_Args.push_back(arg);
76 
77  // N.B.: this is because the filtering is applied on the translated query
78  arg.Reset(new CFilteringArgs( !kQueryIsProtein ));
79  m_Args.push_back(arg);
80 
81  arg.Reset(new CMatrixNameArg);
82  m_Args.push_back(arg);
83 
84  arg.Reset(new CWordThresholdArg);
85  m_Args.push_back(arg);
86 
87  m_HspFilteringArgs.Reset(new CHspFilteringArgs);
88  arg.Reset(m_HspFilteringArgs);
89  m_Args.push_back(arg);
90 
91  arg.Reset(new CWindowSizeArg);
92  m_Args.push_back(arg);
93 
94  m_QueryOptsArgs.Reset(new CQueryOptionsArgs(kQueryIsProtein));
95  arg.Reset(m_QueryOptsArgs);
96  m_Args.push_back(arg);
97 
99  m_Args.push_back(arg);
100 
102  m_Args.push_back(arg);
103 
104  m_FormattingArgs.Reset(new CFormattingArgs);
105  arg.Reset(m_FormattingArgs);
106  m_Args.push_back(arg);
107 
108  m_MTArgs.Reset(new CMTArgs);
109  arg.Reset(m_MTArgs);
110  m_Args.push_back(arg);
111 
112  m_RemoteArgs.Reset(new CRemoteArgs);
113  arg.Reset(m_RemoteArgs);
114  m_Args.push_back(arg);
115 
116  m_DebugArgs.Reset(new CDebugArgs);
117  arg.Reset(m_DebugArgs);
118  m_Args.push_back(arg);
119 }
120 
123  const CArgs& /*args*/)
124 {
125  return CRef<CBlastOptionsHandle>(new CTBlastxOptionsHandle(locality));
126 }
127 
128 int
130 {
131  bool is_remote = (m_RemoteArgs.NotEmpty() && m_RemoteArgs->ExecuteRemotely());
132  return blast::GetQueryBatchSize(eTblastx, m_IsUngapped, is_remote);
133 }
134 
137 
Handles command line arguments for blastx binary.
Argument class to collect multi-threaded arguments.
Argument class to retrieve options for filtering HSPs (e.g.
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:73
EAPILocality
Enumerates the possible contexts in which objects of this type can be used.
virtual CRef< CBlastOptionsHandle > x_CreateOptionsHandle(CBlastOptions::EAPILocality locality, const CArgs &args)
Database genetic code.
Definition: blast_args.hpp:434
Argument class to collect debugging options.
Handle to the translated nucleotide-translated nucleotide options to the BLAST algorithm.
Argument class to collect formatting options, use this to create a CBlastFormat object.
Definition: blast_args.hpp:934
Argument class to collect database/subject arguments.
Definition: blast_args.hpp:802
Declares the CTBlastxOptionsHandle class.
bool ExecuteRemotely() const
Return whether the search should be executed remotely or not.
Translated nucl-Translated nucl.
Definition: blast_types.hpp:62
Keeps track of the version of the BLAST engine in the NCBI C++ toolkit.
Definition: version.hpp:53
Query genetic code.
Definition: blast_args.hpp:433
CRef< CRemoteArgs > m_RemoteArgs
remote vs. local execution options
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
virtual int GetQueryBatchSize() const
Argument class to retrieve and set the window size BLAST algorithm option.
Definition: blast_args.hpp:195
USING_SCOPE(objects)
Argument class to populate an application's name and description.
Definition: blast_args.hpp:150
Argument class to retrieve and set the word threshold BLAST algorithm option.
Definition: blast_args.hpp:223
bool m_IsUngapped
Is this application being run ungapped.
Argument class for collecting the largest intron size.
Definition: blast_args.hpp:406
Main argument class for TBLASTX application.
Argument class for general search BLAST algorithm options: evalue, gap penalties, query filter string...
Definition: blast_args.hpp:264
Argument class to retrieve and set the scoring matrix name BLAST algorithm option.
Definition: blast_args.hpp:250
Argument class for collecting filtering options.
Definition: blast_args.hpp:298
CRef –.
Definition: ncbiobj.hpp:616
Argument class to collect remote vs. local execution.
CArgs –.
Definition: ncbiargs.hpp:356
int GetQueryBatchSize(EProgram program, bool is_ungapped=false, bool remote=false, bool use_default=true)
Retrieve the appropriate batch size for the specified task.
Auxiliary classes/functions for BLAST input library.
virtual string Print(void) const
Print version information.
Definition: version.hpp:59
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:70
Argument class to collect the genetic code for all queries/subjects.
Definition: blast_args.hpp:428
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
Definition: ncbiobj.hpp:709
Argument class to collect query options.
Definition: blast_args.hpp:691
Argument class to retrieve input and output streams for a command line program.
Definition: blast_args.hpp:109
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:756
Modified on Fri Jun 24 18:21:41 2016 by modify_doxy.py rev. 426318