1 /*  $Id: kblastp_args.cpp 533962 2017-04-21 12:57:45Z madden $
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: Tom Madden
27  *
28  */
29 
30 /** @file kblastp_args.cpp
31  * Implementation of the BLASTP command line arguments
32  */
33 #include <ncbi_pch.hpp>
34 #include <algo/blast/blastinput/kblastp_args.hpp>
35 #include <algo/blast/api/blast_advprot_options.hpp>
36 #include <algo/blast/api/blast_exception.hpp>
37 #include <algo/blast/blastinput/blast_input_aux.hpp>
38 #include <algo/blast/api/version.hpp>
39 
40 BEGIN_NCBI_SCOPE
41 BEGIN_SCOPE(blast)
42 USING_SCOPE(objects);
43 
CKBlastpAppArgs()44 CKBlastpAppArgs::CKBlastpAppArgs()
45 {
46     CRef<IBlastCmdLineArgs> arg;
47     static const string kProgram("kblastp");
48     arg.Reset(new CProgramDescriptionArgs(kProgram, "Protein-Protein BLAST"));
49     const bool kQueryIsProtein = true;
50     bool const kFilterByDefault = false;
51     m_Args.push_back(arg);
52     m_ClientId = kProgram + " " + CBlastVersion().Print();
53 
54     m_BlastDbArgs.Reset(new CBlastDatabaseArgs(false, false, false, false, true));
55     m_BlastDbArgs->SetDatabaseMaskingSupport(false);
56     arg.Reset(m_BlastDbArgs);
57     m_Args.push_back(arg);
58 
59     m_KBlastpArgs.Reset(new CKBlastpArgs);
60     arg.Reset(m_KBlastpArgs);
61     m_Args.push_back(arg);
62 
63     m_StdCmdLineArgs.Reset(new CStdCmdLineArgs);
64     arg.Reset(m_StdCmdLineArgs);
65     m_Args.push_back(arg);
66 
67     arg.Reset(new CGenericSearchArgs(kQueryIsProtein));
68     m_Args.push_back(arg);
69 
70     arg.Reset(new CFilteringArgs(kQueryIsProtein, kFilterByDefault));
71     m_Args.push_back(arg);
72 
73     arg.Reset(new CMatrixNameArg);
74     m_Args.push_back(arg);
75 
76     arg.Reset(new CWordThresholdArg);
77     m_Args.push_back(arg);
78 
79     arg.Reset(new CWindowSizeArg);
80     m_Args.push_back(arg);
81 
82     m_QueryOptsArgs.Reset(new CQueryOptionsArgs(kQueryIsProtein));
83     arg.Reset(m_QueryOptsArgs);
84     m_Args.push_back(arg);
85 
86     m_FormattingArgs.Reset(new CFormattingArgs);
87     arg.Reset(m_FormattingArgs);
88     m_Args.push_back(arg);
89 
90     m_MTArgs.Reset(new CMTArgs);
91     arg.Reset(m_MTArgs);
92     m_Args.push_back(arg);
93 
94     arg.Reset(new CCompositionBasedStatsArgs);
95     m_Args.push_back(arg);
96 
97     m_DebugArgs.Reset(new CDebugArgs);
98     arg.Reset(m_DebugArgs);
99     m_Args.push_back(arg);
100 }
101 
102 CRef<CBlastOptionsHandle>
x_CreateOptionsHandle(CBlastOptions::EAPILocality locality,const CArgs & args)103 CKBlastpAppArgs::x_CreateOptionsHandle(CBlastOptions::EAPILocality locality,
104                                       const CArgs& args)
105 {
106     return CRef<CBlastOptionsHandle>(new CBlastProteinOptionsHandle(locality));
107 }
108 
109 int
GetQueryBatchSize() const110 CKBlastpAppArgs::GetQueryBatchSize() const
111 {
112     return 10000;
113 }
114 
115 END_SCOPE(blast)
116 END_NCBI_SCOPE
117 
118