,
true,
false,
false,
false,
true},
64 true,
true,
false,
false,
false,
true},
66 true,
true,
false,
false,
false,
true},
68 false,
false,
true,
false,
false,
false},
70 true,
false,
true,
true,
false,
false},
72 false,
true,
true,
false,
true,
false},
73{
blast::eTblastx,
"Translated Nucleotide-Translated Nucleotide (tBLASTx)",
74 true,
true,
true,
true,
true,
false}
81, m_FilterLowComplex(
true)
82, m_QueryGeneticCode(1)
84, m_MaskLowercase(
false)
85, m_MaskRepeats(
false)
92 intthresh,
intword,
doubleev,
93 boollow_c,
intquery_gen_code,
intdb_gen_code
98, m_FilterLowComplex(low_c)
99, m_QueryGeneticCode(query_gen_code)
100, m_DbGeneticCode(db_gen_code)
101, m_MaskLowercase(
false)
102, m_MaskRepeats(
false)
114 returnit->second->m_NucInput;
126 returnit->second->m_UseDustFilter;
138 returnit->second->m_NucDB;
150 returnit->second->m_NeedsThreshold;
162 returnit->second->m_NeedsQueryGenCode;
173 returnit->second->m_NeedsDbGenCode;
188 return code.GetId();
192 "CBLASTParams::GetGeneticCodeByLabel() - invalid argument"+
label);
202 if(
code.GetId() == code_id) {
203 return code.GetName();
207 "CBLASTParams::GetGeneticCodeLabel() - invalid argument: "+
216 constlist<CRef<CGenetic_code> >& codes = code_table.
Get();
219 stringname = (*it)->GetName();
220labels.push_back(name);
259 for(
size_t i= 0;
i<
n;
i++) {
363{
"Anopheles gambiae",
"repeat/repeat_7165"},
364{
"Arabidopsis thaliana",
"repeat/repeat_3702"},
365{
"bony fishes",
"repeat/repeat_31032"},
366{
"Caenorhabditis briggsae",
"repeat/repeat_6238"},
367{
"Caenorhabditis elegans",
"repeat/repeat_6239"},
368{
"Chlamydomonas reinhardtii",
"repeat/repeat_3055"},
369{
"Ciona intestinalis",
"repeat/repeat_7719"},
370{
"Danio rerio",
"repeat/repeat_7955"},
371{
"Drosophila melanogaster",
"repeat/repeat_7227"},
372{
"fungi",
"repeat/repeat_4751"},
373{
"human",
"repeat/repeat_9606"},
374{
"mammals",
"repeat/repeat_40674"},
375{
"Oryza sativa",
"repeat/repeat_4530"},
376{
"rodents",
"repeat/repeat_9989"},
377{
"Thalassiosira pseudonana",
"repeat/repeat_35128"}
387libs.
insert(iter->first);
405 if(iter != sc_RepeatMap.end()) {
518vector<string> databases;
535 stringname =
"Params for "+
val;
562vector<string> databases;
563databases.insert(databases.end(),
569databases.insert(databases.end(),
582 stringname =
"Params for "+
val;
583 if(obj.HasField(name)) {
687 if(
info->m_NucInput == nuc_input) {
688labels.push_back(
info->m_Label);
698 returnit->second->m_Label;
709 if(it->second->m_Label ==
label) {
717string::const_iterator end,
718string::const_iterator& tok_begin,
719string::const_iterator& tok_end)
721 static const strings_WhiteSpace(
" \n\t\r");
724 for( ; tok_begin != end; ++tok_begin) {
725 if(s_WhiteSpace.find_first_of(*tok_begin) == string::npos) {
731 if(tok_begin != tok_end &&
732(*tok_begin ==
'"'|| *tok_begin ==
'\'')) {
733 charquot_balance = *tok_begin;
734 for(++tok_begin, ++tok_end; tok_end != end; ++tok_end) {
735 if(*tok_end == quot_balance) {
742 for( ; tok_end != end; ++tok_end) {
743 if(s_WhiteSpace.find_first_of(*tok_end) != string::npos) {
752vector<string>& arg_vec,
bool local 761 if( !opts )
return null;
769arg_vec.push_back(
"-"+
kTask);
806unique_ptr<CArgDescriptions> arg_descs( blast_args->SetCommandLine() );
807unique_ptr<CArgs> args( arg_descs->CreateArgs( arg_vec.size(), arg_vec ) );
809blast_args->SetOptionsHandle( opts );
810opts = blast_args->SetOptions( *args );
827 if( !opts )
return null;
936unique_ptr<CArgDescriptions> arg_descs( blast_args->SetCommandLine() );
937unique_ptr<CArgs> args( arg_descs->CreateArgs( argv.size(), argv ) );
939blast_args->SetOptionsHandle( opts );
940opts = blast_args->SetOptions( *args );
947opts->SetOptions().Validate();
1000 if( !repeat_lib.empty() && repeat_lib !=
"none"){
1002 if( !repeat_db.empty() ){
1004arg_vec.push_back( repeat_db );
1011 const string& wm_dir =
GetWmDir();
1012 if( !wm_dir.empty() ){
1016 ERR_POST(
Error<<
"BLAST window masker tax-id filtering ignored. WindowMasker DB directory not set.");
1019 ERR_POST(
Warning<<
"BLAST window masker tax-id filtering ignored. Incompatible program or input.");
1024 static const strings_whitespace(
" \n\t\r");
1026 NStr::Split( arg_params, s_whitespace, arg_vec );
1031vector<string>::iterator argit;
1032argit = find( arg_vec.begin(), arg_vec.end(),
"-"+
kArgNumThreads);
1033 if(argit == arg_vec.end()) {
1047vector<string> argv;
1049argv.insert( argv.end(), arg_vec.begin(), arg_vec.end() );
1077unique_ptr<CArgDescriptions> arg_descs( blast_args->SetCommandLine() );
1078unique_ptr<CArgs> args( arg_descs->CreateArgs( argv.size(), argv ) );
1080 returnargs.release();
1084 const string& cmd_line, blast::CBlastOptions& opts
1086string::const_iterator begin = cmd_line.begin();
1087string::const_iterator end = cmd_line.end();
1088string::const_iterator tok_begin = begin;
1089string::const_iterator tok_end = end;
1093 stringarg(tok_begin, tok_end);
1098 if( arg[0] !=
'-'|| arg.size() != 2 ){
1099 string msg(
"invalid command-line switch to BLAST: ");
1105 string val(tok_begin, tok_end);
1107 const char* err_postfix =
"";
1124err_postfix =
"': expected an integer";
1129err_postfix =
"': expected an integer";
1134err_postfix =
"': expected a floating point number";
1139err_postfix =
"': expected an integer";
1144err_postfix =
"': expected an integer";
1150opts.SetMatrixName(
val.c_str());
1159err_postfix =
"': expected a floating point number";
1164err_postfix =
"': expected a floating point number";
1169err_postfix =
"': expected an integer";
1174err =
"parameter not understood: "+ arg;
1180 stringerr =
"-"+ arg +
": invalid parameter: '";
1199 "\n eValue="<< prog_params.
m_eValue<<
Declares the CBlastNucleotideOptionsHandle class.
Declares class to encapsulate all BLAST options.
Declares the CBlastProteinOptionsHandle class.
static CBLASTParams::SProgParams s_DefaultParams(blast::EProgram prg)
static const char * kGeneticCodeTag
static const char * kLocalDBLoader
static const char * kMaskLowercaseTag
static const char * kNucMRUDBsTag
static const char * kSubjectType
static const char * kAdvParamsTag
static const char * kNucDBTag
static const CBLASTParams::SProgInfo sc_ProgPairs[]
static const char * kWordSizeTag
static void s_NextToken(string::const_iterator &begin, string::const_iterator end, string::const_iterator &tok_begin, string::const_iterator &tok_end)
static const char * keValueTag
SStaticPair< const char *, const char * > TRepeatName
static const char * kThresholdTag
static const char * kDbGeneticCodeTag
DEFINE_STATIC_ARRAY_MAP(TRepeatMap, sc_RepeatMap, sc_RepeatLibs)
CStaticPairArrayMap< const char *, const char *, PNocase_CStr > TRepeatMap
static const char * kFilterLowComplexTag
static const char * kBLASTParamsTag
static TRepeatName sc_RepeatLibs[]
static const char * kLocalProtDB
static const char * kJobTitleTag
static const char * kMaskRepeatsTag
static const char * kProtDBTag
static const char * kProtMRUDBsTag
static const char * kEntrezQueryTag
static const char * kLocalNucDB
static const char * kProtProgTag
static const char * kNucProgTag
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
@ eBlastNotSet
Not yet set.
@ eTblastx
Translated nucl-Translated nucl.
@ eBlastn
Nucl-Nucl (traditional blastn)
@ eBlastp
Protein-Protein.
@ eTblastn
Protein-Translated nucl.
@ eMegablast
Nucl-Nucl (traditional megablast)
@ eDiscMegablast
Nucl-Nucl using discontiguous megablast.
@ eBlastx
Translated nucl-Protein.
Main argument class for BLASTN application.
Main argument class for BLASTP application.
Main argument class for BLASTX application.
Declares the CBlastxOptionsHandle class.
CBLASTParams - save user-specified parameters and preferences.
@ eLocal
To be used for running BLAST locally.
@ eRemote
To be used when running BLAST remotely.
Handles command line arguments for blastn binary.
Handles command line arguments for blastp binary.
Handles command line arguments for blastx binary.
static const CGenetic_code_table & GetCodeTable(void)
const TItems & GetItems() const
void SetItems(const TItems &items)
class CStaticArrayMap<> is an array adaptor that provides an STLish interface to statically-defined a...
TBase::const_iterator const_iterator
static unsigned int GetCpuCount(void)
Return number of active CPUs/cores (never less than 1).
Handles command line arguments for Tblastn binary.
Handles command line arguments for blastx binary.
bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Verify that a named field exists.
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user object.
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
const string kDfltArgApplyFiltering
Default argument to specify filtering.
const string kArgDbGeneticCode
Database genetic code.
const string kArgFilteringDb
Argument to specify a filtering database (i.e.
const string kArgSegFiltering
Argument to specify SEG filtering on query sequence(s)
const string kArgDustFiltering
Argument to specify DUST filtering on query sequence(s)
const string kTask
Task to perform.
const string kArgEvalue
Argument for expectation value cutoff.
const string kArgWindowMaskerTaxId
Argument to specify a taxid for Window Masker.
const string kArgWordSize
Argument to select the wordfinder's word size.
const string kArgUseLCaseMasking
Argument to specify whether lowercase masking in the query sequence(s) should be interpreted as maski...
const string kArgNumThreads
Argument to determine the number of threads to use when running BLAST.
const string kArgQueryGeneticCode
Query genetic code.
const string kArgWordScoreThreshold
Argument to specify the minimum word score such that the word is added to the lookup table.
static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)
Creates an options handle object configured with default options for the requested program,...
string EProgramToTaskName(EProgram p)
Convert a EProgram enumeration value to a task name (as those used in the BLAST command line binaries...
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
void Info(CExceptionArgs_Base &args)
TMRUDatabases & GetCurrMRUDatabases()
returns MRU databases for the current program
CRef< blast::CBlastOptionsHandle > ToBlastOptions(bool local=false) const
static bool NeedsThreshold(blast::EProgram program)
static void GetGeneticCodeLabels(vector< string > &labels)
TMRUDatabases m_NucMRUDatabases
TConstScopedObjects m_SubjSeqLocs
Params applying only to BLAST Sequences.
TConstScopedObjects & GetSeqLocs()
const string & GetWmDir() const
TConstScopedObjects & GetSubjSeqLocs()
void x_ArgsToBlastOptions(const string &cmd_line, blast::CBlastOptions &opts) const
TMRUDatabases m_ProtMRUDatabases
static string GetRepeatLib(const string &repeat_db)
CRef< blast::CBlastOptionsHandle > ToArgVecBlastOptions(vector< string > &arg_vec, bool local=true) const
TProgramParamsMap m_ProgToParams
Common parameters.
void FromUserObject(const objects::CUser_object &user_obj)
TConstScopedObjects m_SeqLocs
static string GetGeneticCodeLabel(int code_id)
static void x_FromUserObject(const objects::CUser_object &user_obj, blast::EProgram prg, SProgParams ¶ms)
reads SProgParams fields from CUser_object
static blast::EProgram GetProgramByLabel(const string &str)
static objects::CUser_object * x_ToUserObject(blast::EProgram prg, const SProgParams ¶ms)
converts SProgParams into CUser_object
static bool UseDustFilter(blast::EProgram program)
CArgs * ToArgs(vector< string > &argv) const
static string GetRepeatDb(const string &repeat_lib)
static TProgramAttrMap sm_ProgramToAttr
static bool IsNucDatabase(blast::EProgram program)
static bool NeedsQueryGeneticCode(blast::EProgram program)
blast::EProgram & GetProgram(bool nuc)
returns the selected programs for the given input type
static TRepeatLibs GetAllRepeatLibs()
blast::EProgram m_NucProgram
SProgParams & GetCurrParams()
returns params for the current program
int m_WM_TaxId
winmask tax id
bool m_MaskLowercase
mask Lowercase features
static int GetGeneticCodeByLabel(const string &label)
vector< string > & ToArgVec(vector< string > &arg_vec) const
blast::EProgram & GetCurrProgram()
returns the current program for the currently selected input type
blast::EProgram m_ProtProgram
TMRUDatabases & GetMRUDatabases(bool nuc_db)
void PrintParams(const string &log_title) const
LOG_POST params for forensic purposes.
string & GetCurrDatabase()
returns the current database for the current program
ESubjectType m_SubjectType
bool m_MaskRepeats
mask Repeat features
static void GetProgramLabels(bool nuc_input, vector< string > &labels)
static bool NeedsDbGeneticCode(blast::EProgram program)
bool IsSubjNucInput() const
string m_EntrezQuery
Params applying only to BLAST Search.
string & GetDatabase(bool nuc_db)
returns the database of the specified type
string & GetEntrezQuery()
objects::CUser_object * ToUserObject() const
string & GetAdvancedParams()
static string GetProgramLabel(blast::EProgram program)
vector< SConstScopedObject > TConstScopedObjects
void Reset(void)
Reset reference object.
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static const char label[]
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
TBool GetBool(void) const
Get the variant data.
TInt GetInt(void) const
Get the variant data.
const TObject & GetObject(void) const
Get the variant data.
TReal GetReal(void) const
Get the variant data.
void SetType(TType &value)
Assign a value to Type data member.
list< CRef< CGenetic_code > > Tdata
const Tdata & Get(void) const
Get the member data.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
describes static attributes of a BLAST program
describes parameters for a BLAST program
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...
Main argument class for TBLASTN application.
Declares the CTBlastnOptionsHandle class.
Main argument class for TBLASTX application.
Declares the CTBlastxOptionsHandle class.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4