A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/remote__blastdb__adapter_8hpp_source.html below:

NCBI C++ ToolKit: src/objtools/data_loaders/blastdb/remote_blastdb_adapter.hpp Source File

1 #ifndef OBJTOOLS_DATA_LOADERS_BLASTDB___REMOTE_BLASTDB_ADAPTER__HPP 2 #define OBJTOOLS_DATA_LOADERS_BLASTDB___REMOTE_BLASTDB_ADAPTER__HPP 54  _ASSERT

(m_UseFixedSizeSlices == 0);

55

m_UseFixedSizeSlices = use_fixed_size_slices;

56  _ASSERT

(m_SeqDataVector.size() == 0);

58

m_SeqDataVector.resize(x_CalculateNumberOfSlices());

59  _ASSERT

(m_SeqDataVector.size() != 0);

69  copy

(idlist.begin(), idlist.end(), back_inserter(m_IdList));

87  return

m_Bioseq.NotEmpty() &&

GetLength

() != 0 && !m_IdList.empty();

94  return

GetSeqDataChunk(begin, end).NotEmpty();

102  _ASSERT

(m_SeqDataVector.size());

106  if

(m_UseFixedSizeSlices) {

109

(idx+1 == m_SeqDataVector.size()));

114

idx =

static_cast<unsigned int>

(m_SeqDataVector.size() - 1);

117

((idx+1) == m_SeqDataVector.size()));

119  _ASSERT

(m_SeqDataVector.size() > idx);

144  if

(m_UseFixedSizeSlices) {

149  for

(

TSeqPos

pos = 0; pos < m_Length; retval++) {

151  if

((end - pos) > slice_size) {

152

end = pos + slice_size;

183  bool

use_fixed_size_slices);

206  const

vector<TSeqRange>& ranges,

236  const

vector<TSeqRange>& ranges);

Interface definition of IBlastDbAdapter.

#define kSliceGrowthFactor

When fixed size slices are not used, each subsequent slice grows its size by this factor.

@ kRmtSequenceSliceSize

Same as above, but used for fetching sequences from remote BLAST databases.

This class defines a "bundle" of elements to cache which are then returned by CRemoteBlastDbAdapter.

CRef< CBioseq > m_Bioseq

the bioseq object for this object

CRef< CBioseq > GetBioseq() const

Retrieve the Bioseq associated with a given sequence.

void SetBioseq(CRef< CBioseq > bioseq)

Set the Bioseq associated with a given sequence.

bool m_UseFixedSizeSlices

Determines whether sequences should be fetched in fixed size slices or in incrementally larger sizes.

IBlastDbAdapter::TSeqIdList GetIdList() const

Retrieve the Seq-id's associated with a given sequence.

CCachedSeqDataForRemote()

Default constructor, needed to insert objects in std::map.

TSeqPos x_CalculateNumberOfSlices()

Calculates the number of slices in the same manner as the CCachedSequence class in its SplitSeqData m...

IBlastDbAdapter::TSeqIdList m_IdList

List of Seq-id's associated with this sequence.

TSeqPos GetLength() const

Retrieve the sequence length.

bool IsValid()

Returns true if this object has been properly initialized and it's ready to be used.

vector< CRef< CSeq_data > > m_SeqDataVector

each element in this vector represents a "chunk" of the sequence data

bool HasSequenceData(int begin, int end)

Returns true if the requested range has sequence data already.

void SetLength(TSeqPos length, bool use_fixed_size_slices)

Sets the length of the sequence data for a given Bioseq.

CRef< CSeq_data > & GetSeqDataChunk(int begin, int end)

Access the sequence data chunk for a given starting and ending offset.

TSeqPos m_Length

length of the sequence data

void SetIdList(const IBlastDbAdapter::TSeqIdList &idlist)

Sets the Seq-id's associated with a given sequence param idlist IDs to assign to this object [in].

This class allows retrieval of sequence data from BLAST databases at NCBI.

virtual bool SeqidToOid(const CSeq_id &id, int &oid)

@inheritDoc

bool SeqidToOidBatch(const vector< CRef< CSeq_id > > &ids, vector< int > &oids)

Batch-version of SeqidToOid.

virtual CSeqDB::ESeqType GetSequenceType()

@inheritDoc

virtual TSeqIdList GetSeqIDs(int oid)

@inheritDoc

void GetSequenceBatch(const vector< int > &oids, const vector< TSeqRange > &ranges, vector< CRef< CSeq_data > > &sequence_data)

Batch-version of GetSequence.

CRemoteBlastDbAdapter(const string &db_name, CSeqDB::ESeqType db_type, bool use_fixed_size_slices)

Constructor.

int m_NextLocalId

Our local "OID generator".

virtual int GetSeqLength(int oid)

@inheritDoc

map< int, CCachedSeqDataForRemote > m_Cache

Internal cache, maps OIDs to CCachedSeqDataForRemote.

virtual CRef< CSeq_data > GetSequence(int oid, int begin=0, int end=0)

@inheritDoc

virtual CRef< CBioseq > GetBioseqNoData(int oid, TGi target_gi=ZERO_GI, const CSeq_id *target_id=NULL)

@inheritDoc

string m_DbName

BLAST database name.

void x_FetchData(int oid, int begin, int end)

This method actually retrieves the sequence data.

bool m_UseFixedSizeSlices

Determines whether sequences should be fetched in fixed size slices or in incrementally larger sizes.

CSeqDB::ESeqType m_DbType

Sequence type of the BLAST database.

void x_FetchDataByBatch(const vector< int > &oids, const vector< TSeqRange > &ranges)

ESeqType

Sequence types (eUnknown tries protein, then nucleotide).

Interface that provides a common interface to retrieve sequence data from local vs.

list< CRef< CSeq_id > > TSeqIdList

Convenience typedef for a list of CSeq_id-s.

std::list< CRef< objects::CSeq_id > > TSeqIdList

unsigned int TSeqPos

Type for sequence locations and lengths.

TSeqPos GetLength(const CSeq_id &id, CScope *scope)

Get sequence length if scope not null, else return max possible TSeqPos.

int32_t Int4

4-byte (32-bit) signed integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

Int4 ilog2(Int8 x)

Integer base two logarithm.

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

static SLJIT_INLINE sljit_ins lg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)


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