58 if (packed_mtx ==
NULL)
61 m_alphabet = packed_mtx->
symbols;
64 if (string::npos == m_alphabet.find(
'X'))
70 for(
int i = 0;
i < 256; ++
i) {
71 for(
int j = 0; j < 256; ++j) {
72 scaled_subst_matrix[
i][j] = packed_mtx->
defscore*scaling;
77 for(
const char* p1 = packed_mtx->
symbols; *p1; ++p1) {
80 for(
const char* p2 = packed_mtx->
symbols; *p2; ++p2) {
83 score =
mtx.s[(
int)(*p1)][(
int)(*p2)]*scaling;
84 scaled_subst_matrix[c][d] = score;
85 scaled_subst_matrix[
lc][ld] = score;
86 scaled_subst_matrix[c][ld] = score;
87 scaled_subst_matrix[
lc][d] = score;
97 m_trans_table(
CGen_code_table::GetTransTable(gcode)), m_allow_alt_starts(allow_alt_starts)
99 for(
int i=0;
i<5; ++
i)
100 for(
int j=0; j<5; ++j)
101 for(
int k=0; k<5; ++k)
107 if(c ==
'A' || c ==
'a')
return nA;
108 if(c ==
'C' || c ==
'c')
return nC;
109 if(c ==
'G' || c ==
'g')
return nG;
110 if(c ==
'T' || c ==
't')
return nT;
115 if(
n ==
nA)
return 'A';
116 if(
n ==
nT)
return 'T';
117 if(
n ==
nG)
return 'G';
118 if(
n ==
nC)
return 'C';
132 for(j=2; j<seq.
size(); ++j) {
133 *++pos =
GetScore(seq[j-2], seq[j-1], seq[j]);
141 if(num == string::npos) num = matrix.
m_alphabet.find(
'X');
160 for(i1 = 0; i1<5; ++i1) {
161 for(i2 = 0; i2<5; ++i2) {
174 int ilen = (
int)pseq.size() + 1;
175 int jlen = nseq.
size() + 1;
178 int v1,
v2, h1, h2, w1, w2, w3, w4, w5, w6, w7, w8, w9, v0, h0, w0;
179 int hpre1, hpre2, hpre3;
182 for(j=0;j<jlen;j++) {
187 for(
i=1;
i<ilen;
i++) {
189 crow->
w[0] = -
g - 3*
i*e;
191 crow->
w[1] = -
f - (
i*3 - 1)*e;
193 crow->
w[2] = -
f - (
i*3 - 2)*e;
198 for(j=3;j<jlen;j++) {
200 char&
b = bi.
b[
i-1][j-1];
206 v1 = prow->w[j] -
g - 3*e;
207 v2 = prow->v[j] - 3*e;
210 if(v0 ==
v2)
b += (char)32;
212 h1 = crow->
w[j-3] -
g - 3*e;
215 if(h0 == h2)
b += (char)16;
217 w1 = prow->w[j-3] + matrix.
MultScore(nseq[j-3], nseq[j-2], nseq[j-1], pseq[
i-1]);
218 w2 = prow->w[j-1] -
f - 2*e;
219 w3 = prow->v[j-1] - (
f -
g) - 2*e;
220 w4 = prow->w[j-2] -
f - e;
221 w5 = prow->v[j-2] - (
f -
g) - e;
222 w6 = crow->
w[j-1] -
f - e;
223 w7 = hpre1 - (
f -
g) - e;
224 w8 = crow->
w[j-2] -
f - 2*e;
225 w9 = hpre2 - (
f -
g) - 2*e;
226 w0 =
max(w1,
max(w2,
max(w3,
max(w4,
max(w5,
max(w6,
max(w7,
max(w8,
max(w9,
max(v0, h0))))))))));
228 else if(w0 == w2)
b += 2;
229 else if(w0 == w3)
b += 3;
230 else if(w0 == w4)
b += 4;
231 else if(w0 == w5)
b += 5;
232 else if(w0 == w6)
b += 6;
233 else if(w0 == w7)
b += 7;
234 else if(w0 == w8)
b += 8;
235 else if(w0 == w9)
b += 9;
236 else if(w0 == v0)
b += 10;
237 else if(w0 == h0)
b += 11;
243 int wmax = crow->
w[0];
245 for(j=1;j<jlen;++j) {
246 if(wmax <= crow->w[j]) {
266 if(nseq.
size() < 1)
return 0;
268 int ilen = (
int)pseq.size() + 1;
269 int jlen = nseq.
size() + 1;
282 fiscore.
Init(nseq, matrix);
290 int pev1 = -
g - 3*e;
293 int pe3 = - (
f -
g) - 2*e;
295 int pe5 = - (
f -
g) - e;
297 int *cv, *cw, *pv, *pv1, *pw1, *pw3, *
ch1, *
ch2, *
ch3;
302 for(j=1;j<jlen;j++) {
310 int jlen_1 = jlen - 1;
311 for(
i=1;
i<ilen;++
i) {
337 for(j=3;j<jlen_1;++j) {
339 const CBestI& bei = fin.
Step(j, scoring, fiscore);
344 int w4 = *++pw3 + pe4;
345 int w5 = *++pv + pe5;
347 int v0 = *++pw1 + pev1;
348 int v2 = *++pv1 + pev2;
349 if(bei.
v > v0 && bei.
v >
v2) {
355 crow->
vis[j].
Copy(prow->vis[j]);
357 crow->
vis[j].
Copy(prow->wis[j]);
379 if(bei.
h1 > h1 && bei.
h1 > h12) {
383 }
else if(h12 > h1) {
393 int w0 =
max(w1,
max(w2,
max(w3,
max(w4,
max(w5,
max(h1,
max(h2,
max(h3,
max(v0,
max(bei.
w2,
max(bei.
w1, bei.
w)))))))))));
394 if(w0 == w1) crow->
wis[j].
Copy(prow->wis[j - 3]);
395 else if(w0 == v0) crow->
wis[j].
Copy(crow->
vis[j]);
396 else if(w0 == h3) crow->
wis[j].
Copy(crow->
h3is[j]);
397 else if(w0 == h1) crow->
wis[j].
Copy(crow->
h1is[j]);
398 else if(w0 == h2) crow->
wis[j].
Copy(crow->
h2is[j]);
399 else if(w0 == w2) crow->
wis[j].
Copy(prow->wis[j - 1]);
400 else if(w0 == w3) crow->
wis[j].
Copy(prow->vis[j - 1]);
401 else if(w0 == w4) crow->
wis[j].
Copy(prow->wis[j - 2]);
402 else if(w0 == w5) crow->
wis[j].
Copy(prow->vis[j - 2]);
403 else if(w0 == bei.
w1) {
406 }
else if(w0 == bei.
w2) {
417 const CBestI bei = fin.
Step(j, scoring, fiscore);
420 int w12 = prow->w[j-1];
421 int w13 = prow->w[j-2];
441 if(bei.
h1 > h1 && bei.
h1 > h12) {
445 }
else if(h12 > h1) {
453 if(w0 == w1) crow->
wis[j].
Copy(prow->wis[j - 3]);
454 else if(w0 == h3) crow->
wis[j].
Copy(crow->
h3is[j]);
455 else if(w0 == h1) crow->
wis[j].
Copy(crow->
h1is[j]);
456 else if(w0 == h2) crow->
wis[j].
Copy(crow->
h2is[j]);
457 else if(w0 == w12) crow->
wis[j].
Copy(prow->wis[j - 1]);
458 else if(w0 == w13) crow->
wis[j].
Copy(prow->wis[j - 2]);
459 else if(w0 == bei.
w1) {
462 }
else if(w0 == bei.
w2) {
473 if(wmax <= crow->w[jlen - 1]) {
474 wmax = crow->
w[jlen - 1];
482 for(j=1;j<jlen;++j) {
483 if(wmax <= crow->w[j]) {
493 igi.push_back(make_pair(jmax, jlen - jmax - 1));
497 if(
tmp->m_Len > 0) igi.push_back(make_pair(
tmp->m_Beg,
tmp->m_Len));
498 else left_gap =
true;
501 reverse(igi.begin(), igi.end());
502 if(left_gap)
_ASSERT(!igi.empty() && igi.front().first == 0);
515 int ilen = (
int)pseq.size() + 1;
516 int jlen = nseq.
size() + 1;
517 CAlignInfo row1(jlen, pool), row2(jlen, pool);
522 for(j=0;j<jlen;j++) {
530 for(
i=1;
i<ilen;
i++) {
533 crow->
w[0] = -
g -
i*e*3;
535 crow->
w[1] = crow->
v[1] = -
g -
i*e*3;
538 crow->
fv[1] = -
f - (
i*3 - 1)*e;
540 crow->
w[2] = crow->
v[2] = -
g -
i*e*3;
543 crow->
fv[2] = -
f - (
i*3 - 2)*e;
547 CBestIntron chin(2, pseq[
i-1], *prow, *crow, nseq, scoring);
550 for(j=3;j<jlen;j++) {
553 int d1, d2, d3, d4, d5, d6;
558 int d101, d102, d103, d104, h101, h102, h103, h104, h105, fv101, fv102, fh101, v101, s0;
559 int d0, v0, h0, fv0, fh0, w0;
561 dspl101 = chin.
GetW1(matrix);
562 d101 = dspl101.first;
563 dspl102 = chin.
GetW2();
564 d102 = dspl102.first;
566 d103 = dspl103.first -
f - e;
568 d104 = dspl104.first - e;
569 d1 = prow->w[j-3] + matrix.
MultScore(nseq[j-3], nseq[j-2], nseq[j-1], pseq[
i-1]);
570 d2 = prow->w[j-1] -
f - 2*e;
571 d3 = prow->fv[j-1] - 2*e;
572 d4 = prow->v[j-1] - (
f -
g) - 2*e;
573 d5 = prow->w[j-2] -
f - e;
574 d6 = prow->fv[j-2] - e;
580 h102 = spl102.first -
g - 3*e;
582 h103 = spl103.first - 3*e;
584 h104 = spl104.first -
g - 3*e;
586 h105 = spl105.first - 3*e;
587 h1 = crow->
w[j-3] -
g - 3*e;
588 h2 = crow->
h[j-3] - 3*e;
590 if(h0 == h1) crow->
his[j].
Copy(crow->
wis[j-3]);
591 else if(h0 == h2) crow->
his[j].
Copy(crow->
his[j-3]);
592 else if(h0 == h101) crow->
his[j].
Expand(crow->
his[j-spl101.second], j-spl101.second, spl101.second);
593 else if(h0 == h102) crow->
his[j].
Expand(crow->
wis[j-3-spl102.second], j-2-spl102.second, spl102.second);
594 else if(h0 == h103) crow->
his[j].
Expand(crow->
his[j-3-spl103.second], j-2-spl103.second, spl103.second);
595 else if(h0 == h104) crow->
his[j].
Expand(crow->
wis[j-3-spl104.second], j-1-spl104.second, spl104.second);
596 else if(h0 == h105) crow->
his[j].
Expand(crow->
his[j-3-spl105.second], j-1-spl105.second, spl105.second);
600 fh101 = spl101.first;
601 fh1 = crow->
w[j-1] -
f - e;
602 fh2 = crow->
fh[j-1] - e;
603 fh3 = crow->
h[j-1] - (
f-
g) - e;
604 fh0 =
max(fh1,
max(fh2,
max(fh3, fh101)));
606 else if(fh0 == fh2) crow->
fhis[j].
Copy(crow->
fhis[j-1]);
607 else if(fh0 == fh3) crow->
fhis[j].
Copy(crow->
his[j-1]);
608 else crow->
fhis[j].
Expand(crow->
fhis[j-spl101.second], j-spl101.second, spl101.second);
612 fv101 = spl101.first;
614 fv102 = spl102.first -
f - e;
615 fv1 = prow->w[j-2] -
f - e;
616 fv2 = prow->w[j-1] -
f -2*e;
617 fv3 = prow->fv[j] - 3*e;
619 if(fv0 == fv1) crow->
fvis[j].
Copy(prow->wis[j-2]);
620 else if(fv0 == fv2) crow->
fvis[j].
Copy(prow->wis[j-1]);
621 else if(fv0 == fv3) crow->
fvis[j].
Copy(prow->fvis[j]);
622 else if(fv0 == fv101) crow->
fvis[j].
Expand(crow->
fvis[j-spl101.second], j-spl101.second, spl101.second);
623 else if(fv0 == fv102) crow->
fvis[j].
Expand(prow->wis[j-2-spl102.second], j-1-spl102.second, spl102.second);
628 v1 = prow->w[j] -
g - 3*e;
629 v2 = prow->v[j] - 3*e;
631 if(v0 == v1) crow->
vis[j].
Copy(prow->wis[j]);
632 else if(v0 ==
v2) crow->
vis[j].
Copy(prow->vis[j]);
633 else if(v0 == v101) crow->
vis[j].
Expand(crow->
vis[j-spl101.second], j-spl101.second, spl101.second);
641 if(d0 == d1) crow->
wis[j].
Copy(prow->wis[j-3]);
642 else if(d0 == d2) crow->
wis[j].
Copy(prow->wis[j-1]);
643 else if(d0 == d3) crow->
wis[j].
Copy(prow->fvis[j-1]);
644 else if(d0 == d4) crow->
wis[j].
Copy(prow->vis[j-1]);
645 else if(d0 == d5) crow->
wis[j].
Copy(prow->wis[j-2]);
646 else if(d0 == d6) crow->
wis[j].
Copy(prow->fvis[j-2]);
647 else if(d0 == d101) crow->
wis[j].
Expand(prow->wis[j-3-dspl101.second], j - 2 - dspl101.second, dspl101.second);
648 else if(d0 == d102) crow->
wis[j].
Expand(prow->wis[j-3-dspl102.second], j - 1 - dspl102.second, dspl102.second);
649 else if(d0 == d103) crow->
wis[j].
Expand(prow->wis[j-2-dspl103.second], j - 1 - dspl103.second, dspl103.second);
650 else if(d0 == d104) crow->
wis[j].
Expand(prow->fvis[j-2-dspl104.second], j - 1 - dspl104.second, dspl104.second);
652 else if(w0 == h0) crow->
wis[j].
Copy(crow->
his[j]);
653 else if(w0 == v0) crow->
wis[j].
Copy(crow->
vis[j]);
654 else if(w0 == fv0) crow->
wis[j].
Copy(crow->
fvis[j]);
655 else if(w0 == fh0) crow->
wis[j].
Copy(crow->
fhis[j]);
656 else crow->
wis[j].
Expand(crow->
wis[j-spl101.second], j-spl101.second, spl101.second);
664 int wmax = crow->
w[0];
666 for(j=1;j<jlen;++j) {
667 if(wmax < crow->w[j]) {
673 if(jmax<jlen-1) igi.push_back(make_pair(jmax, jlen - jmax - 1));
676 if(
tmp->m_Len > 0) igi.push_back(make_pair(
tmp->m_Beg,
tmp->m_Len));
679 reverse(igi.begin(), igi.end());
690 for(j = bi.
jlen-1; j>bi.
maxj; --j) {
694 while(
i>=0 && j>=0) {
712 }
else if( curGAPmode ==
eV || ( curGAPmode ==
eD &&
b == 10 ) ) {
715 if(vmode) curGAPmode =
eV;
716 else curGAPmode =
eD;
717 }
else if(curGAPmode ==
eH || ( curGAPmode ==
eD &&
b == 11 ) ) {
720 if(hmode) curGAPmode =
eH;
721 else curGAPmode =
eD;
722 }
else if(curGAPmode ==
eH3 || ( curGAPmode ==
eD &&
b == 15) ) {
726 }
else if(curGAPmode ==
eH2 || ( curGAPmode ==
eD &&
b == 14) ) {
730 }
else if(curGAPmode ==
eH1 || ( curGAPmode ==
eD &&
b == 0) ) {
733 if(h1mode) curGAPmode =
eH3;
734 else curGAPmode =
eD;
740 }
else if(
b == 2 ||
b == 3 ) {
745 }
else if(
b == 4 ||
b == 5 ) {
750 }
else if(
b == 6 ||
b == 7 ) {
753 }
else if(
b == 8 ||
b == 9 ) {
758 if(
b == 3 ||
b == 5 ) curGAPmode =
eV;
759 else if(
b == 7 ||
b == 9 ) curGAPmode =
eH;
762 for(
int j1 = j; j1 >= 0; j1--) {
765 for(
int i1 =
i; i1>= 0 ; i1--) {
777 bool left_gap,
bool right_gap)
783 if(nseq.
size() < 1)
return 0;
784 int ilen = (
int)pseq.size() + 1;
785 int jlen = nseq.
size() + 1;
790 fiscore.
Init(nseq, matrix);
792 for(j=0;j<jlen;j++) {
801 int pev1 = -
g - 3*e;
804 int pe3 = - (
f -
g) - 2*e;
806 int pe5 = - (
f -
g) - e;
809 int *cv, *cw, *pv, *pv1, *pw1, *pw3;
817 for(
i=1;
i<ilen;++
i) {
820 crow->
w[0] = -
g -3*e*
i;
821 crow->
w[1] = -
f - (
i*3 - 1)*e;
822 crow->
w[2] = -
f - (
i*3 - 2)*e;
843 for(j=3;j<jlen_1;++j) {
850 int w4 = *++pw3 + pe4;
851 int w5 = *++pv + pe5;
853 int v0 = *++pw1 + pev1;
854 int v2 = *++pv1 + pev2;
870 if(w0 == w1)
bb += 1;
871 else if(w0 == v0)
bb += 10;
872 else if(w0 == h3)
bb += 15;
873 else if(w0 == h2)
bb += 14;
874 else if(w0 == w2)
bb += 2;
875 else if(w0 == w3)
bb += 3;
876 else if(w0 == w4)
bb += 4;
877 else if(w0 == w5)
bb += 5;
886 char&
b = bi.
b[
i-1][j-1];
893 h1 = crow->
w[j-1] + pe4;
899 int w1 = prow->w[j-3] + matrix.
MultScore(nseq[j-3], nseq[j-2], nseq[j-1], pseq[
i-1]);
900 int w12 = prow->w[j-1];
901 int w13 = prow->w[j-2];
904 else if(w0 == w12)
b += 12;
905 else if(w0 == w13)
b += 13;
906 else if(w0 == h2)
b += 14;
907 else if(w0 == h3)
b += 15;
912 if(wmax <= crow->w[jlen - 1]) {
913 wmax = crow->
w[jlen - 1];
917 wmax = crow->
w[jlen - 1];
924 for(j=1;j<jlen;++j) {
925 if(wmax <= crow->w[j]) {
939 if(nseq.
size() < 1)
return 0;
940 int ilen = (
int)pseq.size() + 1;
941 int jlen = nseq.
size() + 1;
942 CAlignRow row1(jlen, scoring), row2(jlen, scoring);
946 fiscore.
Init(nseq, matrix);
949 for(j=0;j<jlen;j++) {
962 int pev1 = -
g - 3*e;
965 int pe3 = - (
f -
g) - 2*e;
967 int pe5 = - (
f -
g) - e;
969 int *cv, *cw, *pv, *pv1, *pw1, *pw3, *
ch1, *
ch2, *
ch3;
971 for(
i=1;
i<ilen;++
i) {
976 bi.
b[
i-1][0].wmode = 4;
978 bi.
b[
i-1][1].wmode = 6;
997 int jlen_1 = jlen - 1;
999 for(j=3;j<jlen_1;++j) {
1002 const CBestI& bei = fin.
Step(j, scoring, fiscore);
1004 int w1 = *pw3 + fiscore.
GetScore();
1005 int w2 = *pw1 + pe2;
1006 int w3 = *pv1 + pe3;
1007 int w4 = *++pw3 + pe4;
1008 int w5 = *++pv + pe5;
1010 int v0 = *++pw1 + pev1;
1011 int v2 = *++pv1 + pev2;
1012 if(bei.
v > v0 && bei.
v >
v2) {
1016 }
else if(
v2 > v0) {
1036 if(bei.
h1 > h1 && bei.
h1 > h12) {
1040 }
else if(h12 > h1) {
1048 int w0 =
max(w1,
max(w2,
max(w3,
max(w4,
max(w5,
max(h1,
max(h2,
max(h3,
max(v0,
max(bei.
w2,
max(bei.
w1, bei.
w)))))))))));
1049 if(w0 == w1)
bb += 3;
1050 else if(w0 == v0)
bb += 1;
1051 else if(w0 == h3)
bb += 11;
1052 else if(w0 == h1)
bb += 8;
1053 else if(w0 == h2)
bb += 10;
1054 else if(w0 == w2)
bb += 4;
1055 else if(w0 == w3)
bb += 5;
1056 else if(w0 == w4)
bb += 6;
1057 else if(w0 == w5)
bb += 7;
1058 else if(w0 == bei.
w1) {
1061 }
else if(w0 == bei.
w2) {
1073 int&
bb = bi.
b[
i-1][j-1].wmode;
1075 const CBestI bei = fin.
Step(j, scoring, fiscore);
1077 int w1 = *pw3 + fiscore.
GetScore();
1078 int w12 = prow->w[j-1];
1079 int w13 = prow->w[j-2];
1095 if(bei.
h1 > h1 && bei.
h1 > h12) {
1099 }
else if(h12 > h1) {
1105 if(w0 == w1)
bb += 3;
1106 else if(w0 == h3)
bb += 11;
1107 else if(w0 == h1)
bb += 8;
1108 else if(w0 == h2)
bb += 10;
1109 else if(w0 == w12)
bb += 12;
1110 else if(w0 == w13)
bb += 13;
1111 else if(w0 == bei.
w1) {
1114 }
else if(w0 == bei.
w2) {
1124 if(wmax <= crow->w[jlen - 1]) {
1125 wmax = crow->
w[jlen - 1];
1131 for(j=1;j<jlen;++j) {
1132 if(wmax <= crow->w[j]) {
1150 for(j = bi.
jlen-1; j>bi.
maxj; --j) {
1153 int curGAPmode =
eD;
1154 int vs, h1s, h2s, h3s, vmode, h1mode, wm;
1155 while(
i>=0 && j>=0) {
1165 if(curGAPmode ==
eV || (curGAPmode ==
eD && wm == 1)) {
1173 if(vmode) curGAPmode =
eV;
1174 else curGAPmode =
eD;
1176 }
else if(curGAPmode ==
eH1 || (curGAPmode ==
eD && wm == 8)) {
1184 if(h1mode) curGAPmode =
eH3;
1185 else curGAPmode =
eD;
1187 }
else if(curGAPmode ==
eH2 || (curGAPmode ==
eD && wm == 10)) {
1197 }
else if(curGAPmode ==
eH3 || (curGAPmode ==
eD && wm == 11)) {
1207 }
else if(curGAPmode ==
eD && ((wm > 2 && wm < 8)
1208 || wm == 20 || wm == 21 || wm == 22 || wm == 12 || wm == 13)) {
1212 }
else if(wm == 21) {
1219 }
else if(wm == 22) {
1226 }
else if(wm == 3) {
1230 }
else if(wm == 4 || wm == 5) {
1235 }
else if(wm == 6 || wm == 7) {
1240 }
else if(wm == 12) {
1245 }
else if(wm == 13) {
1251 if(wm == 5 || wm == 7) curGAPmode =
eV;
1255 for(
int j1 = j; j1 >= 0; j1--) {
1258 for(
int i1 =
i; i1>= 0 ; i1--) {
void FrBackAlign(CBackAlignInfo &bi, CAli &ali)
int FindIGapIntrons(const CProSplignInterrupt &interrupt, vector< pair< int, int > > &igi, const PSEQ &pseq, const CNSeq &nseq, int g, int e, int f, const CProSplignScaledScoring &scoring, const CSubstMatrix &matrix)
int FindFGapIntronNog(const CProSplignInterrupt &interrupt, vector< pair< int, int > > &igi, const PSEQ &pseq, const CNSeq &nseq, bool &left_gap, bool &right_gap, const CProSplignScaledScoring &scoring, const CSubstMatrix &matrix)
int FrAlign(const CProSplignInterrupt &interrupt, CBackAlignInfo &bi, const PSEQ &pseq, const CNSeq &nseq, int g, int e, int f, const CProSplignScaledScoring &, const CSubstMatrix &matrix)
void BackAlignNog(CTBackAlignInfo< CBMode > &bi, CAli &ali)
int FrAlignFNog1(const CProSplignInterrupt &interrupt, CBackAlignInfo &bi, const PSEQ &pseq, const CNSeq &nseq, const CProSplignScaledScoring &scoring, const CSubstMatrix &matrix, bool left_gap, bool right_gap)
int AlignFNog(const CProSplignInterrupt &interrupt, CTBackAlignInfo< CBMode > &bi, const PSEQ &pseq, const CNSeq &nseq, const CProSplignScaledScoring &scoring, const CSubstMatrix &matrix)
void Add(EAliPieceType type, int len)
void NucStep(const CProSplignScaledScoring scoring, const CSubstMatrix &matrix)
CHIntronScore GetW1(const CSubstMatrix &matrix)
const CBestI & Step(int j, const CProSplignScaledScoring &scoring, const CFastIScore &fiscore)
int GetH1len(int j, const CProSplignScaledScoring &scoring) const
int GetWlen(int j, const CProSplignScaledScoring &scoring) const
int GetH2len(int j, const CProSplignScaledScoring &scoring) const
void InitRowScores(CAlignRow *row, vector< int > &prevw, int j)
int GetVlen(int j, const CProSplignScaledScoring &scoring) const
int GetH3len(int j, const CProSplignScaledScoring &scoring) const
int GetW2len(int j, const CProSplignScaledScoring &scoring) const
int GetW1len(int j, const CProSplignScaledScoring &scoring) const
void SetAmin(char amin, const CSubstMatrix &matrix)
void Init(const CNSeq &seq, const CSubstMatrix &matrix)
void Expand(CIgapIntronChain &source, int beg, int len)
void Creat(int beg, int len)
void SetPool(CIgapIntronPool &pool)
void Copy(CIgapIntronChain &source)
void CheckUserInterrupt(void) const
int GetGapOpeningCost() const
int GetFrameshiftOpeningCost() const
int GetGapExtensionCost() const
Substitution Matrix for Scoring Amino-Acid Alignments.
CConstRef< CTranslationTable > m_trans_table
void SetTranslationTable(const CTranslationTable *trans_table)
int MultScore(int nuc1, int nuc2, int nuc3, char amin) const
static char NucToChar(int n)
char TranslateTriplet(char n1, char n2, char n3) const
CTranslationTable(int gcode, bool allow_alt_starts)
static int CharToNuc(char c)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static vector< string > arr
struct parameters_t * pb[]
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Reset(void)
Reset reference object.
#define numeric_limits
Pre-declaration of the "numeric_limits<>" template Forcibly overrides (using preprocessor) the origin...
#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.
static string & ToUpper(string &str)
Convert string to upper case – string& version.
unsigned int
A callback function used to compare two keys in a database.
static const BitmapCharRec ch3
static const BitmapCharRec ch1
static const BitmapCharRec ch2
double f(double x_, const double &y_)
const SNCBIPackedScoreMatrix NCBISM_Blosum62
void NCBISM_Unpack(const SNCBIPackedScoreMatrix *psm, SNCBIFullScoreMatrix *fsm)
Expand a packed score matrix into an unpacked one, which callers can proceed to index directly by sta...
TNCBIScore defscore
score for unknown residues
const char * symbols
order of residues
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)