<<pos);
70m_CaseConversion(eCaseConversion_none),
92m_CaseConversion(eCaseConversion_none),
100m_Randomizer(sv_it.m_Randomizer),
110m_SeqMap(seq_vector.m_SeqMap),
111m_TSE(seq_vector.m_TSE),
112m_Strand(seq_vector.m_Strand),
113m_Coding(seq_vector.m_Coding),
114m_CaseConversion(eCaseConversion_none),
122m_Randomizer(seq_vector.m_Randomizer),
133m_SeqMap(seq_vector.m_SeqMap),
134m_TSE(seq_vector.m_TSE),
135m_Strand(seq_vector.m_Strand),
136m_Coding(seq_vector.m_Coding),
137m_CaseConversion(case_cvt),
145m_Randomizer(seq_vector.m_Randomizer),
156m_SeqMap(seq_vector.m_SeqMap),
157m_TSE(seq_vector.m_TSE),
159m_Coding(seq_vector.m_Coding),
160m_CaseConversion(case_cvt),
168m_Randomizer(seq_vector.m_Randomizer),
209 if( stop < start ) {
228 catch( exception&
) {
264 else if( pos < m_ScannedStart || pos >
m_ScannedEnd) {
416 if(
this== &sv_it ) {
506 x_FillCache(pos - cache_offset, cache_offset + 1);
534 boolrandomize =
false;
535 if( cacheCoding != dataCoding &&
542 const char*
table= 0;
543 if( cacheCoding != dataCoding || reverse ||
547 if( !
table&& cacheCoding != dataCoding ) {
549 "Incompatible sequence codings: "<<
550dataCoding<<
" -> "<<cacheCoding);
565 switch( dataCoding ) {
588 "Ncbipna conversion not implemented");
599 "Ncbipaa conversion not implemented");
606 "Invalid data coding: "<<dataCoding);
657 if( cache_offset < cache_size ) {
668 if( pos < old_pos && pos >= old_pos -
kCacheSize&&
714 "CSeqVector_CI: cannot locate segment at "<<pos);
732 "CSeqVector_CI::GetSeqData: " 733 "cannot get seq-data in range: " 734<<pos<<
"-"<<pos+
count);
743 TCache_Ichunk_end = cache + chunk_count;
744 buffer.append(cache, chunk_end);
745 count-= chunk_count;
747 if( chunk_end == cache_end ) {
772 "Can not update cache: iterator beyond end");
783 "CSeqVector_CI: invalid sequence length: " 784<<pos<<
" <> "<<
size);
808 "Can not update cache: iterator beyond start");
824 "CSeqVector_CI: invalid sequence length: " 825<<pos<<
" <> "<<
size);
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
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 IsReverse(ENa_strand s)
CScope * GetScopeOrNull(void) const
SeqVector related exceptions.
unsigned int TSeqPos
Type for sequence locations and lengths.
element_type * get(void) const
Get pointer.
void reset(element_type *p=0)
Reset will delete the old pointer, set content to the new value, and assume the ownership upon the ne...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
void x_InitSeg(TSeqPos pos)
CSeqVector_CI & SetPos(TSeqPos pos)
virtual void RandomizeData(char *buffer, size_t count, TSeqPos pos)=0
Convert count unpacked bases in buffer 4na -> 2na with randomization.
TSeqPos GetEndPosition(void) const
return end position of current segment in sequence (exclusive)
const CSeq_data & GetRefData(void) const
will allow any data segments, user should check for position and strand
TSeqPos x_CacheEndPos(void) const
TSeqPos x_BackupPos(void) const
SSeqMapSelector & SetLinkUsedTSE(bool link=true)
void x_CheckBackward(void)
TSeqPos SkipGap(void)
skip current gap forward returns number of skipped gap symbols does nothing and returns 0 if current ...
void x_CheckForward(void)
TSeqPos GetPos(void) const
TSeqPos GetRefPosition(void) const
vector< CTSE_Handle > m_UsedTSEs
void x_FillCache(TSeqPos start, TSeqPos count)
TCoding GetCoding(void) const
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer)
Fill the buffer string with the sequence data for the interval [start, stop).
void x_ResizeCache(size_t size)
TSeqPos x_CacheOffset(void) const
CRef< INcbi2naRandomizer > m_Randomizer
TSeqPos GetGapSizeForward(void) const
returns number of gap symbols ahead including current symbol returns 0 if current position is not in ...
CConstRef< CSeq_literal > GetGapSeq_literal(void) const
returns gap Seq-data object ref returns null if it's not a gap or an unspecified gap
CSeqVector_CI & operator=(const CSeqVector_CI &sv_it)
void x_SetPos(TSeqPos pos)
TSeqPos x_GetSize(void) const
void SetCoding(TCoding coding)
ECaseConversion m_CaseConversion
void x_ThrowOutOfRange(void) const
bool GetRefMinusStrand(void) const
TSeqPos x_CachePos(void) const
TSeqPos GetGapSizeBackward(void) const
returns number of gap symbols before current symbol returns 0 if current position is not in gap
CSeqMap::ESegmentType GetType(void) const
bool HasZeroGapBefore(void)
true if there is zero-length gap before current position
TResidue GetGapChar(void) const
returns character representation of gap in sequence
void x_PrevCacheSeg(void)
void x_NextCacheSeg(void)
static const char * sx_GetConvertTable(TCoding src, TCoding dst, bool reverse, ECaseConversion case_cvt)
TSeqPos x_CacheSize(void) const
void x_UpdateCacheUp(TSeqPos pos)
void x_InitializeCache(void)
SSeqMapSelector & SetRange(TSeqPos start, TSeqPos length)
Set range for iterator.
CConstRef< CSeqMap > m_SeqMap
bool CanGetRange(TSeqPos start, TSeqPos stop)
Check if the sequence can be obtained for the interval [start, stop)
void SetNoAmbiguities(void)
void SetStrand(ENa_strand strand)
void x_UpdateSeg(TSeqPos pos)
TSeqPos GetRefEndPosition(void) const
SSeqMapSelector & SetStrand(ENa_strand strand)
Set strand to iterate over.
static TResidue sx_GetGapChar(TCoding coding, ECaseConversion case_cvt)
bool IsInvalid(void) const
TSeqPos GetPosition(void) const
return position of current segment in sequence
void SetRandomizeAmbiguities(void)
TSeqPos SkipGapBackward(void)
skip current gap backward returns number of skipped gap symbols does nothing and returns 0 if current...
void x_SetVector(CSeqVector &seq_vector)
TSeqPos x_BackupSize(void) const
TCoding x_GetCoding(TCoding cacheCoding, TCoding dataCoding) const
TSeqPos GetLength(void) const
return length of current segment
CConstRef< CSeq_literal > GetRefGapLiteral(void) const
return CSeq_literal with gap data, or null if either the segment is not a gap, or an unspecified gap
void x_InitRandomizer(CRandom &random_gen)
bool IsInGap(void) const
true if current position of CSeqVector_CI is inside of sequence gap
void x_UpdateCacheDown(TSeqPos pos)
bool HasZeroGapAt(TSeqPos pos, CScope *scope=0) const
Returns true if there is zero-length gap at position.
CConstRef< CSeqMap > m_SeqMap
CRef< INcbi2naRandomizer > m_Randomizer
bool CanResolveRange(CScope *scope, const SSeqMapSelector &sel) const
TSeqPos GetLength(CScope *scope) const
@ eSeqData
real sequence data
uint32_t Uint4
4-byte (32-bit) unsigned 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.
ENa_strand
strand of nucleic acid
E_Choice
Choice variants.
@ e_Ncbipna
nucleic acid probabilities
@ e_Ncbieaa
extended ASCII 1 letter aa codes
@ e_Ncbistdaa
consecutive codes for std aas
@ e_Ncbi2na
2 bit nucleic acid code
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Ncbipaa
amino acid probabilities
@ e_Ncbi8na
8 bit extended nucleic acid code
@ e_Ncbi4na
4 bit nucleic acid code
@ e_Iupacaa
IUPAC 1 letter amino acid code.
@ e_Ncbi8aa
8 bit extended amino acid codes
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const struct ncbi::grid::netcache::search::fields::SIZE size
void ThrowOutOfRangeSeq_inst(size_t pos)
static const TSeqPos kMaxPreloadBases
static const TSeqPos kCacheSize
void copy_8bit_any(DstIter dst, size_t count, const SrcCont &srcCont, size_t srcPos, const char *table, bool reverse)
void copy_4bit_any(DstIter dst, size_t count, const SrcCont &srcCont, size_t srcPos, const char *table, bool reverse)
void copy_2bit_any(DstIter dst, size_t count, const SrcCont &srcCont, size_t srcPos, const char *table, bool reverse)
Selector used in CSeqMap methods returning iterators.
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