1 #ifndef OBJTOOLS_BLAST_SEQDB_WRITER___WRITEDB__HPP
2 #define OBJTOOLS_BLAST_SEQDB_WRITER___WRITEDB__HPP
73 if ( !itr->empty() ) {
118 eFullWithTrace = eFullIndex | eAddTrace,
160 const string & title,
162 bool parse_ids =
true,
163 bool long_ids =
false,
164 bool use_gi_mask =
false,
166 bool limit_defline =
false,
168 bool scan_bioseq_4_cfastareader_usrobj =
false);
200 void AddSequence(
const CBioseq & bs);
244 void SetPig(
int pig);
263 const string & options =
string(),
264 const string & name =
string());
273 const string & description =
string(),
274 const string & options =
string());
288 const vector<TGi> & gis);
301 void ListVolumes(vector<string> & vols);
310 void ListFiles(vector<string> & files);
339 void SetMaxFileSize(
Uint8 sz);
352 void SetMaxVolumeLetters(
Uint8 letters);
368 ExtractBioseqDeflines(
const CBioseq & bs,
bool parse_ids=
true,
370 bool scan_bioseq_4_cfastareader_usrobj=
false);
383 void SetMaskedLetters(
const string & masked);
385 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \
386 (!defined(NCBI_COMPILER_MIPSPRO)) )
394 int FindColumn(
const string & title)
const;
412 int CreateUserColumn(
const string & title);
426 void AddColumnMetaData(
int col_id,
428 const string &
value);
478 void Write(
const string & fname);
502 for(
T c =
a; c !=
b; ++c) {
569 void AddMetaData(
const string &
key,
const string &
value);
574 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \
575 (!defined(NCBI_COMPILER_MIPSPRO)) )
595 void ListFiles(vector<string> & files)
const;
632 const string& db_name,
634 const string& gi_file_name,
635 const string& title =
string(),
654 const vector <string> & db_names,
656 const string& gi_file_name,
657 const string& title =
string(),
675 unsigned int num_volumes,
677 const string& title =
string());
681 const vector<string>& db_names,
684 const string& title =
string());
697 const string& output_directory =
kEmptyStr,
698 bool delete_source_alias_files =
false);
711 const string & output_db,
714 const string & title =
string());
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Binary GI or TI List Builder.
TContainerType m_Ids
List of identifiers to use.
TContainerType::size_type size_type
Standard size_type definition.
vector< Int8 > TContainerType
Type definition of the container that stores the IDs for this class.
CBinaryListBuilder(CBinaryListBuilder &)
Prevent copy construction.
EIdType m_IdType
Whether to use GIs or TIs.
CBinaryListBuilder & operator=(CBinaryListBuilder &)
Prevent copy assignment.
size_type Size() const
Returns the number of IDs stored in an instance of this class.
void AppendIdList(const T &a, const T &b)
Add several 4 byte IDs to the list.
void AppendId(const Int8 &id)
Add an identifier to the list.
`Blob' Class for SeqDB (and WriteDB).
This represents a set of masks for a given sequence.
bool empty() const
Redefine empty to mean no elements or none of its elements being empty.
vector< SBlastDbMaskData > TParent
Our parent class.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Builder for BlastDb format column files.
CWriteDB_ColumnBuilder(const CWriteDB_ColumnBuilder &)
Prevent the copy constructor.
class CWriteDB_Column * m_Impl
Implementation object.
int RegisterMaskAlgorithm(EBlast_filter_program program, const string &options=string(), const string &name=string())
Register a type of filtering data found in this database.
CWriteDB_Impl * m_Impl
Implementation object.
EIndexType
Whether and what kind of indices to build.
int RegisterMaskAlgorithm(const string &id, const string &description=string(), const string &options=string())
Register a type of filtering data found in this database.
int TIndexType
Bitwise OR of "EIndexType".
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void Write(CObjectOStream &out, TConstObjectPtr object, const CTypeRef &type)
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_XOBJWRITE_EXPORT
EBlast_filter_program
This defines the possible sequence filtering algorithms to be used in a BLAST database.
char * dbname(DBPROCESS *dbproc)
Get name of current database.
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
Defines BlastDb `Blob' class for SeqDB and WriteDB.
Defines exception class and several constants for SeqDB.
EBlastDbVersion
BLAST database version.
USING_SCOPE(objects)
Include definitions from the objects namespace.
void CWriteDB_ConsolidateAliasFiles(const list< string > &alias_files, const string &output_directory=kEmptyStr, bool delete_source_alias_files=false)
Consolidate the alias files specified into a group alias file.
void CWriteDB_CreateAliasFile(const string &file_name, const string &db_name, CWriteDB::ESeqType seq_type, const string &gi_file_name, const string &title=string(), EAliasFileFilterType alias_type=eGiList)
Writes an alias file that restricts a database with a gi list.
void CWriteDB_CreateOidMaskDB(const string &input_db, const string &output_db, CWriteDB::ESeqType seq_type, int oid_mask_type, const string &title=string())
EAliasFileFilterType
Defines the possible filtering types that can be applied to an alias file.
@ eTiList
Filter a BLAST database via TIs (Trace IDs)
@ eSeqIdList
Filter a BLAST database via a Seq-id list.
@ eTaxIdList
Filter a BLAST database via Taxonomy Id list.
@ eGiList
Filter a BLAST database via GIs.
@ eNoAliasFilterType
Sentinel value.
Defines exception class for WriteDB.