<
typenameIterator>
60 template<
typenameIterator>
70 template<
typenameIterator>
80 template<
typenameIterator>
85 TSeqPosmax_following_bases = 0);
91 template<
typenameIterator>
102 case 'A':
return 'T';
103 case 'T':
return 'A';
104 case 'C':
return 'G';
105 case 'G':
return 'C';
106 default:
return*
tmp;
177 template<
typenameForwardIterator1,
typenameForwardIterator2>
178ForwardIterator1
ItrSearch(ForwardIterator1 first1, ForwardIterator1 last1,
179ForwardIterator2 first2, ForwardIterator2 last2)
181ptrdiff_t d1 = last1 - first1;
182ptrdiff_t d2 = last2 - first2;
187ForwardIterator1 current1 = first1;
188ForwardIterator2 current2 = first2;
190 while(current2 != last2) {
191 if(!(*current1 == *current2)) {
203 return(current2 == last2) ? first1 : last1;
210 template<
typenameIterator>
214 returntail_found.
Empty() ? -1 : tail_found.
GetFrom();
221 template<
typenameIterator>
224 stringmotif1(
"AATAAA");
225 stringmotif2(
"ATTAAA");
227Iterator pos = begin;
229Iterator uStrmMotif = pos;
230 while(uStrmMotif != end) {
232uStrmMotif =
ItrSearch(pos, end, motif1.begin(), motif1.end());
233 if(uStrmMotif == end) {
234uStrmMotif =
ItrSearch(pos, end, motif2.begin(), motif2.end());
237 if(uStrmMotif != end) {
238 if(end - uStrmMotif < 16) {
241pos = uStrmMotif + 15;
244Iterator maxCleavage = (end - pos < 21) ? end : pos + 21;
246 while(pos < maxCleavage) {
247 unsigned intaRun = 0;
248 for(++pos; pos < maxCleavage && aRun < 3; ++pos) {
256Iterator cleavageSite = pos - aRun;
259 unsigned intnumA = 0, numOther = 0;
260 for(Iterator p = cleavageSite; p < end; ++p) {
268 for(Iterator p = end - 1;
269p >= cleavageSite &&
TSeqPos(end - p) <= max_following_bases+1;
271 if(numOther + numA > 0 &&
272((
double) numA / (numA+numOther)) > 0.95) {
275 return TSeqRange(cleavageSite - begin, p - begin);
295 template<
typenameIterator>
304cleavageSite = tail.
GetFrom();
306cleavageSite = tail.
GetTo();
315 template<
typenameIterator>
329max_following_bases);
332 intseqLen = end - begin;
333tail_result.
Set(seqLen - 1 - tail.
GetTo(),
334seqLen - 1 - tail.
GetFrom());
Implementation [in header because of templates].
bool operator!=(const CRevComp_It &it) const
bool operator<(const CRevComp_It &it) const
CRevComp_It & operator-=(int i)
bool operator==(const CRevComp_It &it) const
CRevComp_It operator++(int)
bool operator>=(const CRevComp_It &it) const
CRevComp_It operator--(int)
CRevComp_It(const Iterator &it)
CRevComp_It operator+(int i) const
bool operator>(const CRevComp_It &it) const
CRevComp_It & operator+=(int i)
CRevComp_It & operator--(void)
CRevComp_It operator-(int i) const
char operator*(void) const
bool operator<=(const CRevComp_It &it) const
CRevComp_It & operator++(void)
Include a standard set of the NCBI C++ Toolkit most basic headers.
unsigned int TSeqPos
Type for sequence locations and lengths.
int TSignedSeqPos
Type for signed sequence position.
position_type GetLength(void) const
TThisType & Set(position_type from, position_type to)
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
TSeqRange FindPolyARange(Iterator begin, Iterator end, TSeqPos max_following_bases)
PRE : two random access iterators pointing to sequence data [begin, end); maximum number of non-A bas...
TSignedSeqPos FindPolyA(Iterator begin, Iterator end)
PRE : two random access iterators pointing to sequence data [begin, end) POST: poly-A tail cleavage s...
EPolyTail FindPolyTail(Iterator begin, Iterator end, TSignedSeqPos &cleavageSite, TSeqPos min_length=1)
PRE : two random access iterators pointing to sequence data [begin, end); minimum length for tail POS...
ForwardIterator1 ItrSearch(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
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