x_GetSeq();
123 inline voidx_RetSeq();
180 static stringESeqType2String(ESeqType
type);
254 if(_size + 1 > _capacity) {
272 bool empty()
const{
return_size == 0; }
287 if(num_elements > _capacity) {
289(
value_type*) realloc(_data, (num_elements + 1) *
291 if( !reallocation ) {
292 string msg(
"Failed to allocate ");
296_data = (
TSeqPos*) reallocation;
297_capacity = num_elements;
303reserve(_size + num_elements);
304memcpy(&_data[1+ 2*_size], src, num_elements *
sizeof(
value_type));
305_size += num_elements;
310x_reallocate_if_necessary();
339 booluse_atlas_lock =
true);
422 CSeqDB(
constvector<string> & dbs,
502 static stringGenerateSearchPath();
512 TGiGetSeqGI(
intoid)
const;
521 intGetSeqLengthApprox(
intoid)
const;
572vector<TTaxId> & taxids,
591 voidGetTaxIDs(
intoid,
593 boolpersist =
false)
const;
611 voidGetTaxIDs(
intoid,
612vector<TTaxId> & taxids,
613 boolpersist =
false)
const;
622 voidGetAllTaxIDs(
intoid,
668ExtractBlastDefline(
const CBioseq& bioseq);
708 intGetAmbigSeq(
intoid,
const char**
buffer,
intnucl_code)
const;
729 intGetAmbigSeq(
intoid,
733 intend_offset)
const;
761 intGetAmbigSeqAlloc(
intoid,
767 intGetAmbigPartialSeq(
intoid,
787 voidRetSequence(
const char**
buffer)
const;
802 voidRetAmbigSeq(
const char**
buffer)
const;
813list< CRef<CSeq_id> > GetSeqIDs(
intoid)
const;
828 voidGetGis(
intoid, vector<TGi> & gis,
bool append=
false)
const;
847 stringGetDate()
const;
865 intGetNumSeqs()
const;
870 intGetNumSeqsStats()
const;
873 intGetNumOIDs()
const;
881 Uint8GetTotalLength()
const;
888 Uint8GetExactTotalLength();
896 Uint8GetTotalLengthStats()
const;
905 Uint8GetVolumeLength()
const;
933 Uint8* total_length,
934 booluse_approx =
true)
const;
940 intGetMaxLength()
const;
946 intGetMinLength()
const;
963 boolCheckOrFindOID(
int& next_oid)
const;
998GetNextOIDChunk(
int& begin_chunk,
1001vector<int> & oid_list,
1002 int* oid_state =
NULL);
1007 voidResetInternalChunkBookmark();
1014 const string& GetDBNameList()
const;
1041 boolPigToOid(
intpig,
int& oid)
const;
1044 boolOidToPig(
intoid,
int& pig)
const;
1047 boolTiToOid(
Int8ti,
int& oid)
const;
1050 boolOidToGi(
intoid,
TGi& gi)
const;
1053 boolGiToOid(
TGigi,
int& oid)
const;
1056 boolGiToOidwFilterCheck(
TGigi,
int& oid)
const;
1059 boolGiToPig(
TGigi,
int& pig)
const;
1062 boolPigToGi(
intpig,
TGi& gi)
const;
1065 voidAccessionToOids(
const string& acc, vector<int> & oids)
const;
1067 voidAccessionsToOids(
constvector<string>& accs, vector<blastdb::TOid>& oids)
const;
1070 voidSeqidToOids(
const CSeq_id& seqid, vector<int> & oids)
const;
1073 boolSeqidToOid(
const CSeq_id& seqid,
int& oid)
const;
1090 intGetOidAtOffset(
intfirst_seq,
Uint8residue)
const;
1149FindVolumePaths(
const string&
dbname,
1151vector<string> & paths,
1152vector<string> * alias_paths =
NULL,
1153 boolrecursive =
true,
1154 boolexpand_links =
true);
1165 voidFindVolumePaths(vector<string> & paths,
boolrecursive=
true)
const;
1179 voidSetIterationRange(
intoid_begin,
intoid_end);
1253 voidGetSequenceAsString(
intoid,
1270 voidGetSequenceAsString(
intoid,
1275 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \ 1276 (!defined(NCBI_COMPILER_MIPSPRO)) ) 1285 voidListColumns(vector<string> & titles);
1296 intGetColumnId(
const string& title);
1322 const string& GetColumnValue(
intcolumn_id,
const string&
key);
1336GetColumnMetaData(
intcolumn_id,
1337 const string& volname);
1343 voidGetColumnBlob(
intcol_id,
intoid,
CBlastDbBlob& blob);
1359 voidGetAvailableMaskAlgorithms(vector<int> & algorithms);
1363 intGetMaskAlgorithmId(
const string&algo_name)
const;
1367 stringGetAvailableMaskAlgorithmDescriptions();
1371vector<int> ValidateMaskAlgorithms(
constvector<int>& algorithm_ids);
1387 voidGetMaskAlgorithmDetails(
intalgorithm_id,
1389 string& program_name,
1390 string& algo_opts);
1392 voidGetMaskAlgorithmDetails(
intalgorithm_id,
1394 string& program_name,
1395 string& algo_opts);
1409 constvector<int> & algo_ids,
1412GetMaskData(oid, algo_ids[0], ranges);
1424 voidGetMaskData(
intoid,
1426TSequenceRanges &ranges);
1466 voidSetOffsetRanges(
intoid,
1473 voidRemoveOffsetRanges(
intoid);
1476 voidFlushOffsetRangeCache();
1487 voidSetNumberOfThreads(
intnum_threads,
boolforce_mt =
false);
1490 Int8GetDiskUsage()
const;
1493 voidSetVolsMemBit(
intmbit);
1505 voidTaxIdsToOids(
set<TTaxId>& tax_ids, vector<blastdb::TOid>& rv)
const;
1511 voidGetTaxIdsForOids(
constvector<blastdb::TOid> & oids,
set<TTaxId>& tax_ids)
const;
1519 voidGetTaxIdsForAccession(
const string& accs, vector<TTaxId> & taxids);
1525 voidGetTaxIdsForSeqId(
const CSeq_id& seq_id, vector<TTaxId> & taxids);
1541 voidx_GetDBFilesMetaData(
Int8& disk_bytes,
Int8& cached_bytes, vector<string> & db_files,
const string& user_path)
const;
1582vector<SSeqDBInitInfo>
1583 FindBlastDBs(
const string& path,
const string& dbtype,
boolrecurse,
1584 boolinclude_alias_files =
false,
1585 boolremove_redundant_dbs =
false);
1611m_Length = m_DB->GetSequence(oid, & m_Data);
1618m_DB->RetSequence(& m_Data);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
bool GetSeqData(ParserPtr pp, const DataBlk &entry, CBioseq &bioseq, Int4 nodetype, unsigned char *seqconv, Uint1 seq_data_type)
const size_t kResizeFactor
factor by which these arrays are resized
@ eOidRange
Data is a range of contiguous ordinal ids (indices)
`Blob' Class for SeqDB (and WriteDB).
SeqDB ID list for performing boolean set operations.
virtual ~CSeqDBIter()
Destructor.
int m_Length
The length of this OID.
const CSeqDB * m_DB
The CSeqDB object which this object iterates over.
void x_RetSeq()
Release hold on current sequence.
const char * m_Data
The sequence data for this OID.
int GetLength()
Get the length (in base pairs) of the currently held sequence.
int m_OID
The OID this iterator is currently accessing.
void x_GetSeq()
Get data pointer and length for the current sequence.
const char * GetData()
Get the sequence data for the currently held sequence.
int GetOID()
Get the OID of the currently held sequence.
DECLARE_OPERATOR_BOOL(m_Length !=-1)
Returns true if the iterator points to a valid sequence.
CSeqDBSequence(const CSeqDBSequence &)
Prevent copy construct.
const char * GetData()
Get pointer to sequence data.
CRef< CSeqDB > m_DB
The CSeqDB object this sequence is from.
~CSeqDBSequence()
Destructor, returns the sequence.
const char * m_Data
The sequence data for this sequence.
CSeqDBSequence & operator=(const CSeqDBSequence &)
Prevent copy.
int m_Length
The length of this sequence.
CSeqDB::TOID TOID
Defines the type used to select which sequence to get.
CSeqDBSequence(CSeqDB *db, int oid)
Get a hold a database sequence.
int GetLength()
Get sequence length.
int TOID
Sequence type accepted and returned for OID indices.
int TPIG
Sequence type accepted and returned for PIG indices.
static const char * kOidNotFound
String containing the error message in exceptions thrown when a given OID cannot be found.
EOidListType
Indicates how block of OIDs was returned.
ESeqType
Sequence types (eUnknown tries protein, then nucleotide).
void RetSequence(const char **buffer) const
Returns any resources associated with the sequence.
int GetSequence(int oid, const char **buffer) const
Get a pointer to raw sequence data.
ESummaryType
Types of summary information available.
@ eUnfilteredAll
Sum of all sequences, ignoring GI and OID lists and alias files.
@ eFilteredAll
Values from alias files, or summation over all included sequences.
static const char * kBlastDbDateFormat
Format string for the date returned by CSeqDB::GetDate.
class CSeqDBImpl * m_Impl
Implementation details are hidden. (See seqdbimpl.hpp).
TGi TGI
Sequence type accepted and returned for GI indices.
EMmapStrategies
Permitted mmap strategies.
@ eMmap_Normal
Normal, no special behavior (should undo next two options).
@ eMmap_Sequential
Expect sequential page references.
TSeqDBAliasFileValues TAliasFileValues
Import type to allow shorter name.
EMmapFileTypes
File type for which mmap strategy may be set.
@ eMmap_IndexFile
Index files (name ends with ".pin" or ".nin").
set< pair< int, int > > TRangeList
List of sequence offset ranges.
void GetMaskData(int oid, const vector< int > &algo_ids, TSequenceRanges &ranges)
Get masked ranges of a sequence.
static unsigned char depth[2 *(256+1+29)+1]
int GetSeqLength(const CBioseq &bioseq)
static void DLIST_NAME() append(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static SQLCHAR output[256]
static const char * str(char *buf, int n)
SBlastSequence GetSequence(const objects::CSeq_loc &sl, EBlastEncoding encoding, objects::CScope *scope, objects::ENa_strand strand=objects::eNa_strand_plus, ESentinelType sentinel=eSentinels, std::string *warnings=NULL)
Retrieves a sequence using the object manager.
unsigned int TSeqPos
Type for sequence locations and lengths.
SStrictId_Tax::TId TTaxId
Taxon id type.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
CBeginInfo Begin(C &obj)
Get starting point of object hierarchy.
NCBI_XOBJUTIL_EXPORT string GetTitle(const CBioseq_Handle &hnd, TGetTitleFlags flags=0)
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
#define NCBI_XOBJREAD_EXPORT
strategy
Block allocation strategies.
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.
CBioseq_Info & GetBioseq(CTSE_Info &tse, const CBioObjectId &id)
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::KEY key
USING_SCOPE(objects)
Include definitions from the objects namespace.
CSeqDB::ESeqType ParseMoleculeTypeString(const string &str)
Convert a string to a CSeqDB ESeqType object.
vector< SSeqDBInitInfo > FindBlastDBs(const string &path, const string &dbtype, bool recurse, bool include_alias_files=false, bool remove_redundant_dbs=false)
Find BLAST DBs in the directory specified.
bool DeleteBlastDb(const string &dbpath, CSeqDB::ESeqType seq_type)
Deletes all files associated with a BLAST database.
Defines BlastDb `Blob' class for SeqDB and WriteDB.
Defines exception class and several constants for SeqDB.
ESeqDBAllocType
Certain methods have an "Alloc" version.
EBlastDbVersion
BLAST database version.
Uint4 GetSequenceType(const CBioseq_Handle &bsh)
Return a (corrected) set of flags identifying the sequence type.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Structure to represent a range.
TOffsetPair()
Default constructor.
List of sequence offset ranges.
void append(const void *src, size_type num_elements)
Append extra elements at the end.
const_iterator end() const
value_type & operator[](size_type i)
const value_type * const_iterator
const_iterator begin() const
void reserve(size_t num_elements)
Reserves capacity for at least num_elements elements.
void push_back(const value_type &element)
Append extra element at the end.
void x_reallocate_if_necessary()
value_type * get_data() const
Structure to define basic information to initialize a BLAST DB.
string m_BlastDbName
The BLAST DB name.
bool operator<(const SSeqDBInitInfo &rhs) const
operator less to support sorting
CRef< CSeqDB > InitSeqDb() const
Create a new CSeqDB instance from this object.
CSeqDB::ESeqType m_MoleculeType
The molecule type.
SSeqDBInitInfo()
Default constructor.
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