(
Int4) retval;
77 return(
Int4) retval;
95 return(
Int4) retval;
113 return(
Int8) retval;
126retval = vdbData->
names;
160 if(!vdbDataHandle || !args)
219 if(resSetUpBlk == 0)
257 if(!vdbData || oid ==
NULL) {
267 return(
Int4) retval;
305 if(!vdbDataHandle || !itr)
566*status = vdbArgs.
status;
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
#define BLAST_SEQSRC_ERROR
Error while retrieving sequence.
BlastSeqSrc * BlastSeqSrcNew(const BlastSeqSrcNewInfo *bssn_info)
Allocates memory for a BlastSeqSrc structure and then invokes the constructor function defined in its...
#define BLAST_SEQSRC_SUCCESS
Successful sequence retrieval.
#define BLAST_SEQSRC_EOF
No more sequences available.
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetReleaseSequence(BlastSeqSrc *var, ReleaseSeqBlkFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetResetChunkIterator(BlastSeqSrc *var, ResetChunkIteratorFnPtr arg)
NCBI_XBLAST_EXPORT void * _BlastSeqSrcImpl_GetDataStructure(const BlastSeqSrc *var)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetTotLenStats(BlastSeqSrc *var, GetInt8FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetSequence(BlastSeqSrc *var, GetSeqBlkFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetNumSeqsStats(BlastSeqSrc *var, GetInt4FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetTotLen(BlastSeqSrc *var, GetInt8FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetSeqLen(BlastSeqSrc *var, GetInt4FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetIsProt(BlastSeqSrc *var, GetBoolFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetDataStructure(BlastSeqSrc *var, void *arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetCopyFnPtr(BlastSeqSrc *var, BlastSeqSrcCopier arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetAvgSeqLen(BlastSeqSrc *var, GetInt4FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetIterNext(BlastSeqSrc *var, AdvanceIteratorFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetInitErrorStr(BlastSeqSrc *var, char *arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetDeleteFnPtr(BlastSeqSrc *var, BlastSeqSrcDestructor arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetName(BlastSeqSrc *var, GetStrFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetMaxSeqLen(BlastSeqSrc *var, GetInt4FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetNumSeqs(BlastSeqSrc *var, GetInt4FnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetSetSeqRange(BlastSeqSrc *var, SetSeqRangeFnPtr arg)
NCBI_XBLAST_EXPORT void _BlastSeqSrcImpl_SetGetSupportsPartialFetching(BlastSeqSrc *var, GetBoolFnPtr arg)
Int2 BlastSetUp_SeqBlkNew(const Uint1 *buffer, Int4 length, BLAST_SequenceBlk **seq_blk, Boolean buffer_allocated)
Allocates memory for *sequence_blk and then populates it.
void BlastSequenceBlkClean(BLAST_SequenceBlk *seq_blk)
Deallocate memory only for the sequence in the sequence block.
#define VDBSRC_OVERFLOW_RV
Int4 oid_t
OID type (must be a SIGNED integer type).
void VDBSRC_InitErrorMsg(TVDBErrMsg *vdbErrMsg, uint32_t rc, TVDBErrCode localCode)
Initialize an Error message.
void VDBSRC_ReleaseErrorMsg(TVDBErrMsg *vdbErrMsg)
Release the Error message.
void VDBSRC_InitEmptyErrorMsg(TVDBErrMsg *vdbErrMsg)
Initialize an empty Error message (No Error).
void VDBSRC_FormatErrorMsg(char **errMsg, const TVDBErrMsg *vdbErrMsg)
Format the error message as a single human-readable string.
@ eVDBSRC_READER_2NA_ERROR
Failed to process the NCBI-2na data.
EBlastEncoding
Different types of sequence encodings for sequence retrieval from the BLAST database.
@ eBlastEncodingNcbi4na
NCBI4na.
@ eBlastEncodingNucleotide
Special encoding for preliminary stage of BLAST: permutation of NCBI4na.
int16_t Int2
2-byte (16-bit) signed integer
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
Uint1 Boolean
bool replacment for C
#define FALSE
bool replacment for C indicating false.
#define ASSERT
macro for assert.
Int4 s_VDBSRC_GetSeqLen(void *vdbDataHandle, void *oid)
Get the sequence length from the sequence source given the OID.
static Int8 s_VDBSRC_GetTotLenStats(void *vdbDataHandle, void *dummy)
GetTotLenStats - Not supported.
static Int2 s_VDBSRC_GetSequence(void *vdbDataHandle, BlastSeqSrcGetSeqArg *args)
Get the sequence from the sequence source given the OID and encoding.
static Int4 s_VDBSRC_IteratorNext(void *vdbDataHandle, BlastSeqSrcIterator *itr)
Get the next sequence OID and increment the BlastSeqSrc iterator.
BlastSeqSrc * SRABlastSeqSrcInit(const char **vdbRunAccessions, Uint4 numRuns, Boolean isProtein, Boolean *excluded_runs, Uint4 *status, Boolean isCSRA, Boolean include_filtered_reads)
Allocate and initialize the SRA BlastSeqSrc object.
static BlastSeqSrc * s_VDBSRC_SrcCopy(BlastSeqSrc *seqSrc)
Copy the BlastSeqSrc and its internal SRA data access object.
static BlastSeqSrc * s_VDBSRC_SrcFree(BlastSeqSrc *seqSrc)
Release the BlastSeqSrc and its internal SRA data access object.
static Int4 s_VDBSRC_GetNumSeqsStats(void *vdbDataHandle, void *dummy)
GetNumSeqsStats - Not supported.
static Boolean s_VDBSRC_GetSupportsPartialFetching(void *vdbDataHandle, void *dummy)
static Boolean s_VDBSRC_GetIsProt(void *vdbDataHandle, void *dummy)
GetIsProt - always returns FALSE in our case.
static Int8 s_VDBSRC_GetTotLen(void *vdbDataHandle, void *dummy)
Get the total sequence length in the sequence source.
static Int4 s_VDBSRC_GetMaxLength(void *vdbDataHandle, void *dummy)
Get the maximum sequence length in the sequence source.
static void s_VDBSRC_ResetChunkIterator(void *vdbDataHandle)
Resets the internal bookmark iterator (not applicable in our case).
static const char * s_VDBSRC_GetName(void *vdbDataHandle, void *dummy)
Get the sequence source name (VDB run accessions).
static void s_VDBSRC_SetSeqRange(void *vdbDataHandle, BlastSeqSrcSetRangesArg *args)
static const char *const kEmptyVDBName
Database name string returned by BlastSeqSrc (normally empty).
static Int4 s_VDBSRC_GetAvgLength(void *vdbDataHandle, void *dummy)
Get the average sequence length in the sequence source.
static BlastSeqSrc * s_VDBSRC_SrcNew(BlastSeqSrc *seqSrc, void *args)
Initialize the SRA data access object and set up the BlastSeqSrc.
static Int4 s_VDBSRC_GetNumSeqs(void *vdbDataHandle, void *dummy)
Get the number of sequences in the sequence source.
static void s_VDBSRC_ReleaseSequence(void *vdbDataHandle, BlastSeqSrcGetSeqArg *args)
Release the sequence from the sequence source given the OID.
static void s_InitVDBBlastSeqSrcFields(BlastSeqSrc *seqSrc, TVDBData *vdbData)
Set the BlastSeqSrc function pointers and the SRA data access object.
Uint1 * sequence_start
Start of sequence, usually one byte before sequence as that byte is a NULL sentinel byte.
Int4 oid
The ordinal id of the current sequence.
Boolean sequence_allocated
TRUE if memory has been allocated for sequence.
Int4 length
Length of sequence.
Uint1 * sequence
Sequence used for search (could be translation).
Boolean sequence_start_allocated
TRUE if memory has been allocated for sequence_start.
Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature,...
Int4 oid
Oid in BLAST database, index in an array of sequences, etc [in].
EBlastEncoding encoding
Encoding of sequence, i.e.
BLAST_SequenceBlk * seq
Sequence to return, if NULL, it should allocated by GetSeqBlkFnPtr (using BlastSeqBlkNew or BlastSetU...
Complete type definition of Blast Sequence Source Iterator.
unsigned int current_pos
Keep track of this iterator's current position, implementations use UINT4_MAX to indicate this is uni...
Complete type definition of the structure used to create a new BlastSeqSrc.
BlastSeqSrcConstructor constructor
User-defined function to initialize a BlastSeqSrc structure.
void * ctor_argument
Argument to the above function.
Structure used as the argument to function SetRanges.
Int4 * ranges
Ranges in sorted order [in].
Int4 num_ranges
Number of actual ranges contained.
Int4 oid
Oid in BLAST database, index in an array of sequences, etc [in].
Complete type definition of Blast Sequence Source ADT.
Structure providing top-level VDB data access.
VdbBlast4naReader * reader_4na
Boolean isInitialized
Is the object initialized.
TVDB2naICReader * reader_2na
VdbBlastReferenceSet * refSet
TVDBPartialFetchingRanges * range_list
char * names
Names of the VDB data represented by this object (usually this will include all the SVDB run accessio...
Structure used for passing data in VDB APIs.
uint64_t basesTotal
Number of bases.
uint8_t * data
Pointer to the first byte of the sequence data array.
uint8_t basesFirstByte
Number of bases stored in the first byte (1, 2, 3, or 4).
Structure describing the error messages the library can generate.
Boolean isError
True if the object describes an error.
Structure used for initializing the SRA data access.
const char ** vdbRunAccessions
Array of SRA accession strings identifying the runs to open.
Boolean includeFilteredReads
uint32_t numRuns
Number of runs to open.
Structure describing the properties of requested nucleotide data.
Boolean read4na
Retrieve the data in NCBI-4na format (if FALSE, use NCBI-2na).
Boolean hasSentinelBytes
Append sentinel bytes to both ends of the data.
Boolean convertDataToBlastna
Convert the data to the Blastna format (used in Blast engine).
Int4 oid
Oid in BLAST database, index in an array of sequences, etc [in].
void VDBSRC_FillPartialFetchingList(TVDBData *vdbData, Int4 num_ranges)
void VDBSRC_FreeData(TVDBData *vdbData)
Release the SRA data and free the memory allocated for the object.
uint64_t VDBSRC_GetAvgSeqLen(TVDBData *vdbData)
Get the average sequence length in the open SRA data.
void VDBSRC_ResetReader(TVDBData *vdbData)
uint64_t VDBSRC_GetSeqLen(TVDBData *vdbData, uint64_t oid)
Get sequence length by oid.
void VDBSRC_InitCSRAData(TVDBData *vdbData, TVDBNewArgs *vdbArgs, TVDBErrMsg *vdbErrMsg, Boolean getStats)
TVDBData * VDBSRC_CopyData(TVDBData *vdbData, TVDBErrMsg *vdbErrMsg)
Need to call free data if error is returned.
TVDBData * VDBSRC_NewData(TVDBErrMsg *vdbErrMsg)
Allocate a new SRA data object, flag it as not initialized.
bool VDBSRC_GetIsProtein(TVDBData *vdbData)
Get if run set is protein or nucl.
Int2 VDBSRC_Load2naSeqToBuffer(TVDBData *vdbData, TVDBErrMsg *vdbErrMsg)
void VDBSRC_InitData(TVDBData *vdbData, TVDBNewArgs *vdbArgs, TVDBErrMsg *vdbErrMsg, Boolean getStats)
Initialize the VDB data.
void VDBSRC_ResetPartialFetchingList(TVDBData *vdbData)
void VDBSRC_Init2naReader(TVDBData *vdbData, TVDBErrMsg *vdbErrMsg)
void VDBSRC_Init4naReader(TVDBData *vdbData, TVDBErrMsg *vdbErrMsg)
uint64_t VDBSRC_GetTotSeqLen(TVDBData *vdbData)
Get the total sequence length in the open SRA data.
uint64_t VDBSRC_GetMaxSeqLen(TVDBData *vdbData)
Get the maximum sequence length in the open SRA data.
Boolean VDBSRC_GetSeq2na(TVDBData *vdbData, TByteArray *dataSeq, TNuclDataRequest *req2na, TVDBErrMsg *vdbErrMsg)
Get the specified subsequence in NCBI-2na format.
Boolean VDBSRC_GetSeq4naCopy(TVDBData *vdbData, TByteArray *dataSeq, TNuclDataRequest *req4na, TVDBErrMsg *vdbErrMsg)
Get the specified subsequence in NCBI-4na format.
void VDBSRC_InitByteArray_Empty(TByteArray *byteArray)
Initialize an empty ByteArray object.
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