blast::CGenericSearchArgs search_args(
false,
72blast::CFilteringArgs filter_args(
false);
73blast::CNuclArgs nucl_args;
74blast::CGappedArgs gapped_args;
75blast::CHspFilteringArgs cull_args;
76blast::CBlastDatabaseArgs blastdb_args;
77blast::CWindowSizeArg window_args;
78blast::CFormattingArgs format_args;
79blast::CRemoteArgs remote_args;
81search_args.SetArgumentDescriptions(ArgDesc);
82filter_args.SetArgumentDescriptions(ArgDesc);
83nucl_args.SetArgumentDescriptions(ArgDesc);
84gapped_args.SetArgumentDescriptions(ArgDesc);
85cull_args.SetArgumentDescriptions(ArgDesc);
86blastdb_args.SetArgumentDescriptions(ArgDesc);
87window_args.SetArgumentDescriptions(ArgDesc);
88format_args.SetArgumentDescriptions(ArgDesc);
89remote_args.SetArgumentDescriptions(ArgDesc);
96blast::CGenericSearchArgs search_args(
false,
99blast::CFilteringArgs filter_args(
false);
100blast::CNuclArgs nucl_args;
101blast::CGappedArgs gapped_args;
102blast::CHspFilteringArgs cull_args;
103blast::CBlastDatabaseArgs blastdb_args;
104blast::CWindowSizeArg window_args;
105blast::CFormattingArgs format_args;
106blast::CRemoteArgs remote_args;
124NucOptions->SetTraditionalMegablastDefaults();
127search_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
128filter_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
129nucl_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
130gapped_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
131cull_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
132window_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
133format_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
134remote_args.ExtractAlgorithmOptions(Args, Options->
SetOptions());
149vector<string> Tokens;
150Tokens.push_back(
"megablast");
157unique_ptr<CArgs> Args(ArgDesc.
CreateArgs(Tokens.size(), Tokens));
173 stringDelims =
" \n\r\t";
174 stringQuotes =
"'\"";
177 boolInQuotes =
false;
181 for(
unsigned intIndex = 0; Index < Params.length(); Index++) {
183 if(Quotes.find(Params[Index]) !=
NPOS) {
185Tokens.push_back(Curr);
190Curr.push_back(Params[Index]);
194 if(Delims.find(Params[Index]) !=
NPOS) {
196Tokens.push_back(Curr);
199 else if(Quotes.find(Params[Index]) !=
NPOS) {
201Tokens.push_back(Curr);
206Curr.push_back(Params[Index]);
246 if(Subjects.
IsNull()) {
247 ERR_POST(
Info<<
"Blast Warning: Empty Subject Set");
258BlastResults = Blast.
Run();
282 if(SetIter->IsNull())
291TSubjectMap SubjectMap;
294SubjectMap[SubjectIdH].push_back(*AlignIter);
297 ITERATE(TSubjectMap, SubjectIter, SubjectMap) {
298list<CRef<CSeq_align> > Filtered;
300 if(!Filtered.empty()) {
301FilteredResults.
Set().insert(FilteredResults.
Set().end(),
302Filtered.begin(), Filtered.end());
314scores.push_back(Score);
326 if(AlignCount == 0) {
327 _TRACE(
"CBlastAligner found no hits this run.");
329 _TRACE(
"CBlastAligner found "<< AlignCount <<
" hits.");
333Results->Insert(FilteredResults);
339list<CBlastAligner::TBlastAlignerRef>
342list<TBlastAlignerRef> Aligners;
346Aligners.push_back(CurrAligner);
352list<CBlastAligner::TBlastAlignerRef>
355list<TBlastOptionsRef> BlastOptions;
356 ITERATE(list<string>, ParamsIter, Params) {
359BlastOptions.push_back(CurrOptions);
382 ERR_POST(
Info<<
"Remote Blast Warning: Empty Query Set");
419TSubjectMap SubjectMap;
422SubjectMap[SubjectIdH].push_back(*AlignIter);
425 ITERATE(TSubjectMap, SubjectIter, SubjectMap) {
426list<CRef<CSeq_align> > Filtered;
428 if(!Filtered.empty()) {
429FilteredResults.
Set().insert(FilteredResults.
Set().end(),
430Filtered.begin(), Filtered.end());
445 if(AlignCount == 0) {
450Results->Insert(FilteredResults);
457list<CRemoteBlastAligner::TBlastAlignerRef>
460list<TBlastAlignerRef> Aligners;
464Aligners.push_back(CurrAligner);
470list<CRemoteBlastAligner::TBlastAlignerRef>
473list<TBlastOptionsRef> BlastOptions;
474 ITERATE(list<string>, ParamsIter, Params) {
477BlastOptions.push_back(CurrOptions);
Declares the CBl2Seq (BLAST 2 Sequences) class.
Declares the CBlastNucleotideOptionsHandle class.
Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.
Definitions of special type used in BLAST.
Main argument class for BLASTN application.
static void FilterBothRows(const list< CRef< objects::CSeq_align > > &Input, list< CRef< objects::CSeq_align > > &Output, size_t DepthCutoff=5, double PctIdentRescue=95.0)
TAlignResultsRef GenerateAlignments(objects::CScope &Scope, ISequenceSet *QuerySet, ISequenceSet *SubjectSet, TAlignResultsRef AccumResults)
CRef< blast::CBlastOptionsHandle > m_BlastOptions
static list< TBlastAlignerRef > CreateBlastAligners(list< TBlastOptionsRef > &Options, int Threshold)
TInterruptFnPtr m_InterruptFunc
CBlastAligner(blast::CBlastOptionsHandle &Options, int Threshold)
static void x_ParseOptionsString(const string &Params, vector< string > &Tokens)
static CRef< blast::CBlastOptionsHandle > s_CreateBlastOptions(const string &Params)
static void s_CreateBlastArgDescriptions(CArgDescriptions &ArgDesc)
static CRef< blast::CBlastOptionsHandle > s_ExtractBlastArgs(CArgs &Args)
void SetSoftFiltering(int Filter)
void SetNegativeGiList(const vector< TGi > &GiList)
Handle to the nucleotide-nucleotide options to the BLAST algorithm.
@ eRemote
To be used when running BLAST remotely.
Class to perform a BLAST search on local BLAST databases Note that PHI-BLAST can be run using this cl...
static list< TBlastAlignerRef > CreateBlastAligners(list< TBlastOptionsRef > &Options, int Threshold)
CRef< blast::CBlastOptionsHandle > m_BlastOptions
TAlignResultsRef GenerateAlignments(objects::CScope &Scope, ISequenceSet *QuerySet, ISequenceSet *SubjectSet, TAlignResultsRef AccumResults)
CRemoteBlastAligner(blast::CBlastOptionsHandle &Options, int Threshold)
API for Remote Blast Requests.
Search Results for All Queries.
Search Results for One Query.
void GetGiList(vector< TGi > &GiList, objects::CScope &Scope, const CAlignResultsSet &Alignments, int Threshold)
void SetNamedScore(const string &id, int score)
bool GetNamedScore(const string &id, int &score) const
Get score.
virtual CRef< blast::IQueryFactory > CreateQueryFactory(objects::CScope &Scope, const blast::CBlastOptionsHandle &BlastOpts)=0
virtual CRef< blast::CLocalDbAdapter > CreateLocalDbAdapter(objects::CScope &Scope, const blast::CBlastOptionsHandle &BlastOpts)=0
Class for the messages for an individual query sequence.
Declares the CDiscNucleotideOptionsHandle class.
bool HasErrors() const
Returns true if there are errors among the results for this object.
CConstRef< objects::CSeq_align_set > GetSeqAlign() const
Accessor for the Seq-align results.
CRef< CSearchResultSet > Run()
Executes the search.
CBlastOptions & SetOptions()
Returns a reference to the internal options class which this object is a handle for.
TInterruptFnPtr SetInterruptCallback(TInterruptFnPtr fnptr, void *user_data=NULL)
Set a function callback to be invoked by the CORE of BLAST to allow interrupting a BLAST search in pr...
bool HasWarnings() const
Returns true if there are warnings among the results for this object.
string GetWarningStrings() const
Retrieve a string with the query identifier followed by the warnings produced, returns a empty string...
CRef< CSearchResultSet > GetResultSet()
Submit the search (if necessary) and return the results.
TQueryMessages GetErrors(int min_severity=eBlastSevError) const
Accessor for the error/warning messsages for this query.
string GetErrorStrings() const
Retrieve a string with the query identifier followed by the errors produced, returns a empty string i...
@ eBlastDbIsNucleotide
nucleotide
unsigned int TSeqPos
Type for sequence locations and lengths.
#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.
virtual string & PrintUsage(string &str, bool detailed=false) const
Print usage message to end of specified string.
CArgs * CreateArgs(TSize argc, TArray argv) const
Create parsed arguments in CArgs object.
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
CDiagContext & GetDiagContext(void)
Get diag context instance.
CDiagContext_Extra Extra(void) const
Create a temporary CDiagContext_Extra object.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
void Warning(CExceptionArgs_Base &args)
string ReportAll(TDiagPostFlags flags=eDPF_Exception) const
Report all exceptions.
void Info(CExceptionArgs_Base &args)
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Tdata & Set(void)
Assign a value to data member.
list< CRef< CSeq_align > > Tdata
const Tdata & Get(void) const
Get the member data.
Main class to perform a BLAST search on the local machine.
Magic spell ;-) needed for some weird compilers... very empiric.
Defines NCBI C++ exception handling.
Declares the CRemoteBlast class.
Predicate for sorting CSeq_id_Handles in a defined order.
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