NCBI C++ ToolKit
|
Command line tool to create BLAST databases. More...
#include <ncbi_pch.hpp>
#include <serial/objostrjson.hpp>
#include <algo/blast/api/version.hpp>
#include <algo/blast/blastinput/blast_input_aux.hpp>
#include <corelib/ncbiapp.hpp>
#include <serial/iterator.hpp>
#include <objmgr/util/create_defline.hpp>
#include <objmgr/util/sequence.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/general/User_object.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/blastdb/Blast_db_mask_info.hpp>
#include <objects/blastdb/Blast_mask_list.hpp>
#include <objtools/blast/seqdb_reader/seqdb.hpp>
#include <objtools/blast/seqdb_reader/seqdbcommon.hpp>
#include <objtools/blast/seqdb_writer/writedb.hpp>
#include <objtools/blast/seqdb_writer/writedb_error.hpp>
#include <util/format_guess.hpp>
#include <util/util_exception.hpp>
#include <util/compress/stream_util.hpp>
#include <objtools/blast/seqdb_writer/build_db.hpp>
#include <algo/blast/blastinput/blast_input.hpp>
#include "../blast/blast_app_util.hpp"
#include "masked_range_set.hpp"
#include <iostream>
#include <sstream>
#include <fstream>
#include <random>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | CMakeBlastDBApp |
The main application class. More... | |
class | CSeqEntrySource |
class | CRawSeqDBSource |
Functions | |
USING_SCOPE (blast) | |
USING_SCOPE (objects) | |
template<class TObj > | |
void | s_ReadObject (CNcbiIstream &file, CFormatGuess::EFormat fmt, CRef< TObj > &obj, const string &msg) |
Reads an object defined in a NCBI ASN.1 spec from a stream in multiple formats: binary and text ASN.1 and XML. More... | |
template<class TObj > | |
void | s_ReadObject (CNcbiIstream &file, CRef< TObj > &obj, const string &msg) |
Overloaded version of s_ReadObject which uses CFormatGuess to determine the encoding of the object in the file. More... | |
static const string | kInput ("in") |
Command line flag to represent the input. More... | |
static const string | kInputSeparators (" ") |
Defines token separators when multiple inputs are present. More... | |
static const string | kOutput ("out") |
Command line flag to represent the output. More... | |
static string | Uint8ToString_DataSize (Uint8 v, unsigned minprec=10) |
Converts a Uint8 into a string which contains a data size (converse to NStr::StringToUInt8_DataSize) More... | |
static TTaxId | s_GetTaxId (const CBioseq &bio) |
static bool | s_HasTitle (const CBioseq &bio) |
int | main (int argc, const char *argv[]) |
Variables | |
USING_NCBI_SCOPE | |
Command line tool to create BLAST databases.
This is the successor to formatdb from the C toolkit
Definition in file makeblastdb.cpp.
Command line flag to represent the input.
Referenced by CMakeBlastDBApp::Init(), and CMakeBlastDBApp::x_BuildDatabase().
Defines token separators when multiple inputs are present.
Referenced by CMakeBlastDBApp::x_BuildDatabase().
Command line flag to represent the output.
Referenced by CMakeBlastDBApp::Init(), and CMakeBlastDBApp::x_BuildDatabase().
Definition at line 1357 of file makeblastdb.cpp.
References CNcbiApplicationAPI::AppMain().
Definition at line 367 of file makeblastdb.cpp.
References CSeq_descr_Base::Get(), CSeq_entry::GetDescr(), CSeqdesc_Base::GetOrg(), CBioSource_Base::GetOrg(), CBioseq::GetParentEntry(), CSeq_entry::GetParentEntry(), CSeqdesc_Base::GetSource(), COrg_ref::GetTaxId(), CSeqdesc_Base::IsOrg(), CSeq_entry::IsSetDescr(), CSeqdesc_Base::IsSource(), ITERATE, NULL, and ZERO_TAX_ID.
Referenced by CSeqEntrySource::GetNext().
Definition at line 391 of file makeblastdb.cpp.
References CBioseq_Base::CanGetDescr(), CSeq_descr_Base::Get(), CBioseq_Base::GetDescr(), CSeqdesc_Base::IsTitle(), and ITERATE.
Referenced by CSeqEntrySource::GetNext().
void s_ReadObject | ( | CNcbiIstream & | file, |
CFormatGuess::EFormat | fmt, | ||
CRef< TObj > & | obj, | ||
const string & | msg | ||
) |
Reads an object defined in a NCBI ASN.1 spec from a stream in multiple formats: binary and text ASN.1 and XML.
file | stream to read the object from [in] |
fmt | specifies the format in which the object is encoded [in] |
obj | on input is an empty CRef<> object, on output it's populated with the object read [in|out] |
msg | error message to display if reading fails [in] |
Definition at line 164 of file makeblastdb.cpp.
References CFormatGuess::eBinaryASN, CFormatGuess::eTextASN, file, MSerial_AsnBinary, MSerial_AsnText, msg(), NCBI_THROW, and CRef< C, Locker >::Reset().
Referenced by CSeqEntrySource::CSeqEntrySource(), s_ReadObject(), and CMakeBlastDBApp::x_ProcessMaskData().
void s_ReadObject | ( | CNcbiIstream & | file, |
CRef< TObj > & | obj, | ||
const string & | msg | ||
) |
Overloaded version of s_ReadObject which uses CFormatGuess to determine the encoding of the object in the file.
file | stream to read the object from [in] |
obj | on input is an empty CRef<> object, on output it's populated with the object read [in|out] |
msg | error message to display if reading fails [in] |
Definition at line 192 of file makeblastdb.cpp.
References CFormatGuess::eBinaryASN, CFormatGuess::eTextASN, file, msg(), and s_ReadObject().
Converts a Uint8 into a string which contains a data size (converse to NStr::StringToUInt8_DataSize)
v | value to convert [in] |
minprec | minimum precision [in] |
Definition at line 341 of file makeblastdb.cpp.
References i, and NStr::UInt8ToString().
Referenced by CMakeBlastDBApp::x_BuildDatabase().
USING_SCOPE | ( | blast | ) |
USING_SCOPE | ( | objects | ) |
USING_NCBI_SCOPE |
Definition at line 71 of file makeblastdb.cpp.