num_db_sequences);
146 "should be Fasta, Fastc, or Fastq");
206ss <<
"The provided SRA accession '"<<
str 207<<
"' does not exist"<< ends;
229 Uint8& subject_length,
232db_adapter.
Reset();
239 if(scope.
Empty()) {
246 if( (subjects = db_args->GetSubjects(scope)) ) {
272IOS_BASE::iostate orig_state =
in.rdstate();
273IOS_BASE::fmtflags orig_flags =
in.setf(ios::skipws);
279 in.flags(orig_flags);
281 in.setstate(orig_state);
291 for(
unsigned int i=0;
i<
a.Size();
i++) {
292 cmd+=
a[
i] +
" ";
301 const intkSamLargeNumSubjects =
INT4_MAX;
311 env.Set(
"SEQ_ID_PREFER_ACCESSION_OVER_GI",
"1");
324 intnum_db_sequences;
359 _ASSERT(fr ==
false|| rf ==
false);
365 if(!only_specific && (fr || rf)) {
367 "-fr or -rf can only be used with SAM format." 368 " Use -oufmt sam option.");
376 if(only_specific && !(fr || rf)) {
378 "-only_strand_specific without either -fr or -rf " 384 if(num_db_sequences < kSamLargeNumSubjects) {
414 intbatch_num = 500000;
417 stringnum_seqs_str =
env.Get(
"BATCH_NUM_SEQS");
418 if(!num_seqs_str.empty()) {
425batch_size =
MAX(batch_size / num_threads, 5000000);
431 input.SetMaxBatchNumSeqs(batch_num);
434 for(
int i=0;
i< num_threads;
i++) {
444threads[
i]->
Run();
447 for(
int i=0;
i< num_threads;
i++) {
448threads[
i]->
Join();
461(
Int8)db_size, (
Int8)num_db_sequences);
475 Int8num_db_sequences)
498 if(
l->GetNumGis()) {
501 if(
l->GetNumSis()){
504 if(
l->GetNumTaxIds()){
507 if(
l->GetNumPigs()) {
513 if(
l->GetNumGis()) {
516 if(
l->GetNumSis()){
519 if(
l->GetNumTaxIds()){
522 if(
l->GetNumPigs()) {
527vector<CAlignFormatUtil::SDbInfo> dbinfo;
541 #ifndef SKIP_DOXYGEN_PROCESSINGProduce formatted blast output for command line applications.
#define CATCH_ALL(exit_code)
Standard catch statement for all BLAST command line programs.
#define BLAST_EXIT_SUCCESS
Command line binary exit code: success.
Interface for reading SRA sequences into blast input.
Int4 BlastSeqSrcGetNumSeqs(const BlastSeqSrc *seq_src)
Get the number of sequences contained in the sequence source.
Int8 BlastSeqSrcGetTotLen(const BlastSeqSrc *seq_src)
Get the total length of all sequences in the sequence source.
Class representing a text or binary file containing sequences in ASN.1 format as a collection of Seq-...
static void GetBlastDbInfo(vector< SDbInfo > &retval, const string &blastdb_names, bool is_protein, int dbfilt_algorithm, bool is_remote=false)
Retrieve BLAST database information for presentation in BLAST report.
virtual CNcbiIstream & GetInputStream()
Get the input stream.
size_t GetNumThreads() const
Get the number of threads to spawn.
CRef< CBlastOptionsHandle > SetOptions(const CArgs &args)
Extract the command line arguments into a CBlastOptionsHandle object.
CRef< CBlastDatabaseArgs > GetBlastDatabaseArgs() const
Get the BLAST database arguments.
CArgDescriptions * SetCommandLine()
Set the command line arguments.
CRef< CQueryOptionsArgs > GetQueryOptionsArgs() const
Get the options for the query sequence(s)
CRef< CFormattingArgs > GetFormattingArgs() const
Get the formatting options.
bool ProduceDebugOutput() const
Return whether debug (verbose) output should be produced on remote searches (only available when comp...
virtual CNcbiOstream & GetOutputStream()
Get the output stream.
Encapsulates ALL the BLAST algorithm's options.
void AddParam(EUsageParams p, int val)
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) const
EOutputFormat GetFormattedOutputChoice() const
Get the choice of formatted output.
@ eTabular
Tabular output.
Defines user input exceptions.
Interface to create a BlastSeqSrc suitable for use in CORE BLAST from a a variety of BLAST database/s...
Handles command line arguments for blastmapper binary.
bool HasUnalignedOutputStream(void) const
Has a separate output stream for unaligned reads been set up.
virtual int GetQueryBatchSize() const
@inheritDoc
CNcbiOstream * GetUnalignedOutputStream(void) const
Get output stream for unaligned reads or NULL if it was not set up.
virtual void Init()
@inheritDoc
CBlastUsageReport m_UsageReport
void x_LogBlastSearchInfo(CBlastUsageReport &report, const CBlastOptions &options, CRef< CMapperFormattingArgs > fmt_args, CRef< CLocalDbAdapter > db_adapter, Int8 db_size, Int8 num_db_sequences)
CRef< CMagicBlastAppArgs > m_CmdLineArgs
This application's command line args.
CMagicBlastApp()
@inheritDoc
virtual int Run()
@inheritDoc
Handle to the nucleotide mapping options to the BLAST algorithm.
Formatting args for magicblast advertising only SAM and fast tabular formats.
const string & GetUserTag(void) const
Get a user tag added to each alignment.
bool SelectFwdRev(void) const
Specify fwd/ref strands.
EOutputFormat GetUnalignedOutputFormat(void) const
Get format choice for unaligned reads.
bool SelectRevFwd(void) const
Specify rev/fwd strands.
bool SelectOnlyStrandSpecific(void) const
Specify only-strand-specific.
Argument class to collect query options for BLAST Mapper.
bool IsSraCacheEnabled(void) const
Is SRA caching in local files enabled (see File Caching at https://github.com/ncbi/sra-tools/wiki/Too...
const vector< string > & GetSraAccessions(void) const
Get a list of SRA accessions.
bool HasMateInputStream(void) const
Does the mate input stream exits.
EInputFormat GetInputFormat(void) const
Are queries provided in Fastc format.
bool IsPaired(void) const
Are query sequences paired.
EInputFormat
Input formats.
CNcbiIstream * GetMateInputStream(void) const
Get input stream for query mates.
Uint8 GetTotalLength() const
Returns the sum of the lengths of all available sequences.
int GetNumSeqs() const
Returns the number of sequences available.
EInputFormat
Input formats.
@ eNotFoundDb
DB main file not found.
virtual TErrCode GetErrCode(void) const
Class for reading sequences from SRA respository or SRA file.
void Print(const CCompactSAMApplication::AlignInfo &ai)
static const char * str(char *buf, int n)
string GetDatabaseName() const
Accessor for the database name.
const CRef< CSeqDBGiList > & GetNegativeGiList() const
Accessor for the negative gi list.
CRef< CSeqDB > GetSeqDb() const
Obtain a reference to the database.
bool IsBlastDb() const
Returns true if this object represents a BLAST database.
bool GetLookupDbFilter(void) const
const CBlastOptions & GetOptions() const
Return the object which this object is a handle for.
CRef< CBlastOptions > Clone() const
Explicit deep copy of the Blast options object.
const CRef< CSeqDBGiList > & GetGiList() const
Accessor for the gi list.
CRef< CSearchDatabase > GetSearchDatabase()
void SetFullVersion(CRef< CVersionAPI > version)
Set version data for the program.
void HideStdArgs(THideStdArgs hide_mask)
Set the hide mask for the Hide Std Flags.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
CVersionInfo GetVersion(void) const
Get the program version information.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ fHideXmlHelp
Hide XML help description.
@ fHideLogfile
Hide log file description.
@ fHideFullVersion
Hide full version description.
@ fHideDryRun
Hide dryrun description.
@ fHideConffile
Hide configuration file description.
void SetDiagPostPrefix(const char *prefix)
Specify a string to prefix all subsequent error postings with.
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
@ eDiag_Warning
Warning message.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)
Split a path string into its basic components.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
TObjectType * GetNonNullPointer(void)
Get pointer value and throw a null pointer exception if pointer is null.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
bool IsEnabled(void)
Indicates whether application usage statistics collection is enabled for a current reporter instance.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::streampos CNcbiStreampos
Portable alias for streampos.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
bool Run(TRunMode flags=fRunDefault)
Run the thread.
void Join(void **exit_data=0)
Wait for the thread termination.
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Start(void)
Start the timer.
Declares CMagicBlast, the C++ API for the BLAST RNA-Seq mapping engine.
static CBlastInputSourceOMF * s_CreateInputSource(CRef< CMapperQueryOptionsArgs > query_opts, CRef< CMagicBlastAppArgs > cmd_line_args)
static const int kMinorVersion
static const int kMajorVersion
int NcbiSys_main(int argc, ncbi::TXChar *argv[])
static CShortReadFastaInputSource::EInputFormat s_QueryOptsInFmtToFastaInFmt(CMapperQueryOptionsArgs::EInputFormat infmt)
static void s_InitializeSubject(CRef< blast::CBlastDatabaseArgs > db_args, CRef< blast::CBlastOptionsHandle > opts_hndl, CRef< blast::CLocalDbAdapter > &db_adapter, Uint8 &subject_length, int &num_sequences)
static string s_GetCmdlineArgs(const CNcbiArguments &a)
static const int kPatchVersion
static bool s_IsIStreamEmpty(CNcbiIstream &in)
CNcbiOstream & PrintSAMHeader(CNcbiOstream &ostr, CRef< CLocalDbAdapter > db_adapter, const string &cmd_line_args)
CNcbiOstream & PrintTabularHeader(CNcbiOstream &ostr, const string &version, const string &cmd_line_args, bool user_tag)
const string version
version string
#define INT4_MAX
largest nubmer represented by signed int
#define MAX(a, b)
returns larger of a and b.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
std::istream & in(std::istream &in_, double &x_)
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Complete type definition of Blast Sequence Source ADT.
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