#include "linefile.h"#include "dnaseq.h"#include "chain.h"Include dependency graph for axt.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | axt |
| struct | axtScoreScheme |
| struct | axtBundle |
Functions | |
| void | axtFree (struct axt **pEl) |
| void | axtFreeList (struct axt **pList) |
| axt * | axtRead (struct lineFile *lf) |
| axt * | axtReadWithPos (struct lineFile *lf, off_t *retOffset) |
| boolean | axtCheck (struct axt *axt, struct lineFile *lf) |
| void | axtWrite (struct axt *axt, FILE *f) |
| int | axtCmpQuery (const void *va, const void *vb) |
| int | axtCmpTarget (const void *va, const void *vb) |
| int | axtCmpScore (const void *va, const void *vb) |
| int | axtCmpTargetScoreDesc (const void *va, const void *vb) |
| void | axtScoreSchemeFree (struct axtScoreScheme **pObj) |
| axtScoreScheme * | axtScoreSchemeDefault () |
| axtScoreScheme * | axtScoreSchemeSimpleDna (int match, int misMatch, int gapOpen, int gapExtend) |
| axtScoreScheme * | axtScoreSchemeRnaDefault () |
| axtScoreScheme * | axtScoreSchemeFromBlastzMatrix (char *text, int gapOpen, int gapExtend) |
| axtScoreScheme * | axtScoreSchemeRnaFill () |
| axtScoreScheme * | axtScoreSchemeProteinDefault () |
| axtScoreScheme * | axtScoreSchemeProteinRead (char *fileName) |
| axtScoreScheme * | axtScoreSchemeRead (char *fileName) |
| axtScoreScheme * | axtScoreSchemeReadLf (struct lineFile *lf) |
| void | axtScoreSchemeDnaWrite (struct axtScoreScheme *ss, FILE *f, char *name) |
| int | axtScoreSym (struct axtScoreScheme *ss, int symCount, char *qSym, char *tSym) |
| int | axtScore (struct axt *axt, struct axtScoreScheme *ss) |
| int | axtScoreFilterRepeats (struct axt *axt, struct axtScoreScheme *ss) |
| int | axtScoreUngapped (struct axtScoreScheme *ss, char *q, char *t, int size) |
| int | axtScoreDnaDefault (struct axt *axt) |
| int | axtScoreProteinDefault (struct axt *axt) |
| void | axtSubsetOnT (struct axt *axt, int newStart, int newEnd, struct axtScoreScheme *ss, FILE *f) |
| int | axtTransPosToQ (struct axt *axt, int tPos) |
| void | axtSwap (struct axt *axt, int tSize, int qSize) |
| void | axtBundleFree (struct axtBundle **pObj) |
| void | axtBundleFreeList (struct axtBundle **pList) |
| void | axtBlastOut (struct axtBundle *abList, int queryIx, boolean isProt, FILE *f, char *databaseName, int databaseSeqCount, double databaseLetterCount, char *blastType, char *ourId, double minIdentity) |
| axt * | axtAffine (bioSeq *query, bioSeq *target, struct axtScoreScheme *ss) |
| boolean | axtAffineSmallEnough (double querySize, double targetSize) |
| axt * | axtAffine2Level (bioSeq *query, bioSeq *target, struct axtScoreScheme *ss) |
| void | axtAddBlocksToBoxInList (struct cBlock **pList, struct axt *axt) |
| void | axtPrintTraditional (struct axt *axt, int maxLine, struct axtScoreScheme *ss, FILE *f) |
| double | axtIdWithGaps (struct axt *axt) |
| double | axtCoverage (struct axt *axt, int qSize, int tSize) |
Definition at line 820 of file axt.c.
References AllocVar, FALSE, cBlock::qEnd, axt::qStart, cBlock::qStart, axt::qSym, slAddHead, axt::symCount, cBlock::tEnd, axt::tStart, cBlock::tStart, and axt::tSym.
00822 : list will be in reverse order of axt blocks. */ 00823 { 00824 boolean thisIn, lastIn = FALSE; 00825 int qPos = axt->qStart, tPos = axt->tStart; 00826 int qStart = 0, tStart = 0; 00827 int i; 00828 00829 for (i=0; i<=axt->symCount; ++i) 00830 { 00831 int advanceQ = (isalpha(axt->qSym[i]) ? 1 : 0); 00832 int advanceT = (isalpha(axt->tSym[i]) ? 1 : 0); 00833 thisIn = (advanceQ && advanceT); 00834 if (thisIn) 00835 { 00836 if (!lastIn) 00837 { 00838 qStart = qPos; 00839 tStart = tPos; 00840 } 00841 } 00842 else 00843 { 00844 if (lastIn) 00845 { 00846 int size = qPos - qStart; 00847 assert(size == tPos - tStart); 00848 if (size > 0) 00849 { 00850 struct cBlock *b; 00851 AllocVar(b); 00852 b->qStart = qStart; 00853 b->qEnd = qPos; 00854 b->tStart = tStart; 00855 b->tEnd = tPos; 00856 slAddHead(pList, b); 00857 } 00858 } 00859 } 00860 lastIn = thisIn; 00861 qPos += advanceQ; 00862 tPos += advanceT; 00863 } 00864 }
| struct axt* axtAffine | ( | bioSeq * | query, | |
| bioSeq * | target, | |||
| struct axtScoreScheme * | ss | |||
| ) | [read] |
Definition at line 193 of file axtAffine.c.
References affineAlign(), dnaSeq::dna, dnaSeq::name, phhmTraceToAxt(), phmmMatrixFree(), dnaSeq::size, slFreeList(), and ss.
00195 { 00196 struct axt *axt; 00197 int score; 00198 struct phmmMatrix *matrix; 00199 struct phmmAliPair *pairList; 00200 00201 affineAlign(query->dna, query->size, target->dna, target->size, ss, 00202 &matrix, &pairList, &score); 00203 axt = phhmTraceToAxt(matrix, pairList, score, query->name, target->name); 00204 phmmMatrixFree(&matrix); 00205 slFreeList(&pairList); 00206 return axt; 00207 }
Here is the call graph for this function:

| struct axt* axtAffine2Level | ( | bioSeq * | query, | |
| bioSeq * | target, | |||
| struct axtScoreScheme * | ss | |||
| ) | [read] |
Definition at line 462 of file axtAffine.c.
References cell2L::backd, cell2L::backi, cell2L::backm, cell2L::bestd, cell2L::besti, cell2L::bestm, cloneString(), dnaSeq::dna, errAbort(), freez(), kForwardAffine(), dnaSeq::name, needLargeMem(), needMem(), reverseBytes(), dnaSeq::size, ss, and WORST.
00480 : 00481 Double-gap cost is equal to gap-extend cost, but gap-open would also work. 00482 On very large target, score integer may overflow. 00483 Input sequences not checked for invalid chars. 00484 Input not checked but query should be shorter than target. 00485 00486 */ 00487 { 00488 struct axt *axt=needMem(sizeof(struct axt)); 00489 00490 char *q = query->dna; 00491 char *t = target->dna; 00492 00493 int Q= query->size; 00494 int T=target->size; 00495 int lv=Q+1; /* Q+1 is used so often let's call it lv for q-width */ 00496 int lw=T+1; /* T+1 is used so often let's call it lw for t-height */ 00497 00498 00499 int r = 0; /* row matrix index */ 00500 int c = 0; /* col matrix index */ 00501 char dir=' '; /* dir for bt */ 00502 int bestbest = WORST; /* best score in entire mtx */ 00503 00504 int k=0; /* save every kth row (k decreasing) */ 00505 int ksize = 0; /* T+1 saved rows as ksize, ksize-1,...,1*/ 00506 int arrsize = 0; /* dynprg array size, +1 for 0 sentinel col. */ 00507 struct cell2L *cells = NULL; /* best score dyn prog array */ 00508 int ki = 0; /* base offset into array */ 00509 int cmost = Q; /* track right edge shrinkage during backtrace */ 00510 int kmax = 0; /* rows range from ki to kmax */ 00511 int rr = 0; /* maps ki base to actual target seq */ 00512 int nrows = 0; /* num rows to do, usually k or less */ 00513 int bestr = 0; /* remember best r,c,dir for local ali */ 00514 int bestc = 0; 00515 char bestdir = 0; 00516 int temp = 0; 00517 00518 00519 char *btq=NULL; /* temp pointers to track ends of string while accumulating */ 00520 char *btt=NULL; 00521 00522 ksize = (int) (-1 + sqrt(8*lw+1))/2; 00523 if (((ksize*(ksize+1))/2) < lw) 00524 {ksize++;} 00525 arrsize = (ksize+1) * lv; /* dynprg array size, +1 for lastrow that moves back up. */ 00526 cells = needLargeMem(arrsize * sizeof(struct cell2L)); /* best score dyn prog array */ 00527 00528 #ifdef DEBUG 00529 printf("\n k=%d \n ksize=%d \n arrsize=%d \n Q,lv=%d,%d T=%d \n \n",k,ksize,arrsize,Q,lv,T); 00530 #endif 00531 00532 axt->next = NULL; 00533 axt->qName = cloneString(query->name); 00534 axt->tName = cloneString(target->name); 00535 axt->qStrand ='+'; 00536 axt->tStrand ='+'; 00537 axt->frame = 0; 00538 axt->score=0; 00539 axt->qStart=0; 00540 axt->tStart=0; 00541 axt->qEnd=0; 00542 axt->tEnd=0; 00543 axt->symCount=0; 00544 axt->qSym=NULL; 00545 axt->tSym=NULL; 00546 00547 if ((Q==0) || (T==0)) 00548 { 00549 axt->qSym=cloneString(""); 00550 axt->tSym=cloneString(""); 00551 freez(&cells); 00552 return axt; 00553 } 00554 00555 00556 00557 /* initialize origin corner */ 00558 cells[0].bestm=0; 00559 cells[0].bestd=WORST; 00560 cells[0].besti=WORST; 00561 cells[0].backm='x'; 00562 cells[0].backd='x'; 00563 cells[0].backi='x'; 00564 #ifdef DEBUG 00565 dump2L(cells); 00566 #endif 00567 00568 /* initialize row 0 col 1 */ 00569 cells[1].bestm=WORST; 00570 cells[1].bestd=WORST; 00571 cells[1].besti=-ss->gapOpen; 00572 cells[1].backm='x'; 00573 cells[1].backd='x'; 00574 cells[1].backi='m'; 00575 #ifdef DEBUG 00576 dump2L(cells+1); 00577 #endif 00578 00579 /* initialize first row of sentinels */ 00580 for (c=2;c<lv;c++) 00581 { 00582 cells[c].bestm=WORST; 00583 cells[c].bestd=WORST; 00584 cells[c].besti=cells[c-1].besti-ss->gapExtend; 00585 cells[c].backm='x'; 00586 cells[c].backd='x'; 00587 cells[c].backi='i'; 00588 #ifdef DEBUG 00589 dump2L(cells+c); 00590 #endif 00591 } 00592 #ifdef DEBUG 00593 printf("\n"); 00594 printf("\n"); 00595 #endif 00596 00597 k=ksize; 00598 00599 ki++; /* advance to next row */ 00600 00601 r=1; /* r is really the rows all done */ 00602 while(1) 00603 { 00604 nrows = k; /* do k rows at a time, save every kth row on 1st pass */ 00605 if (nrows > (lw-r)) {nrows=lw-r;} /* may get less than k on last set */ 00606 kmax = ki+nrows-1; 00607 00608 kForwardAffine(cells, ki, kmax, r-ki, cmost, lv, q, t, ss, &bestbest, &bestr, &bestc, &bestdir); 00609 #ifdef DEBUG 00610 printf("\n"); 00611 #endif 00612 00613 r += nrows; 00614 00615 if (nrows == k) /* got full set of k rows */ 00616 { 00617 /* compress, save every kth row */ 00618 /* optimize as a mem-copy */ 00619 memcpy(cells+ki*lv,cells+kmax*lv,sizeof(struct cell2L) *lv); 00620 } 00621 00622 if (r >= lw){break;} /* we are done */ 00623 00624 ki++; 00625 k--; /* decreasing k is "moving boundary" */ 00626 } 00627 00628 #ifdef DEBUG 00629 printf("\nFWD PASS DONE. bestbest=%d bestr=%d bestc=%d bestdir=%c \n\n",bestbest,bestr,bestc,bestdir); 00630 #endif 00631 00632 /* start doing backtrace */ 00633 00634 /* adjust for reverse pass */ 00635 00636 /* for local we automatically skip to bestr, bestc to begin tb */ 00637 00638 if (bestbest <= 0) /* null alignment */ 00639 { 00640 bestr=0; 00641 bestc=0; 00642 /* bestdir won't matter */ 00643 } 00644 00645 r = bestr; 00646 c = bestc; 00647 dir = bestdir; 00648 cmost = c; 00649 00650 axt->qEnd=bestc; 00651 axt->tEnd=bestr; 00652 00653 temp = (2*ksize)+1; 00654 ki = (int)(temp-sqrt((temp*temp)-(8*r)))/2; 00655 rr = ((2*ksize*ki)+ki-(ki*ki))/2; 00656 kmax = ki+(r-rr); 00657 k = ksize - ki; 00658 00659 00660 /* now that we jumped back into saved start-points, 00661 let's fill the array forward and start backtrace from there. 00662 */ 00663 00664 #ifdef DEBUG 00665 printf("bestr=%d, bestc=%d, bestdir=%c k=%d, ki=%d, kmax=%d\n",bestr,bestc,bestdir,k,ki,kmax); 00666 #endif 00667 00668 kForwardAffine(cells, ki+1, kmax, rr-ki, cmost, lv, q, t, ss, &bestbest, &bestr, &bestc, &bestdir); 00669 00670 #ifdef DEBUG 00671 printf("\n(initial)BKWD PASS DONE. cmost=%d r=%d c=%d dir=%c \n\n",cmost,r,c,dir); 00672 #endif 00673 00674 00675 /* backtrace */ 00676 00677 /* handling for resulting ali'd strings when very long */ 00678 00679 axt->symCount=0; 00680 axt->qSym = needLargeMem((Q+T+1)*sizeof(char)); 00681 axt->tSym = needLargeMem((Q+T+1)*sizeof(char)); 00682 btq=axt->qSym; 00683 btt=axt->tSym; 00684 while(1) 00685 { 00686 while(1) 00687 { 00688 #ifdef DEBUG 00689 printf("bt: r=%d, c=%d, dir=%c \n",r,c,dir); 00690 #endif 00691 00692 00693 if ((r==0) && (c==0)){break;} /* hit origin, done */ 00694 if (r<rr){break;} /* ran out of targ seq, backup and reload */ 00695 if (dir=='x'){errAbort("unexpected error backtracing");} /* x only at origin */ 00696 if (dir=='s'){break;} /* hit start, local ali */ 00697 if (dir=='m') /* match */ 00698 { 00699 *btq++=q[c-1]; /* accumulate alignment output strings */ 00700 *btt++=t[r-1]; /* accumulate alignment output strings */ 00701 axt->symCount++; 00702 dir = cells[lv*(ki+r-rr)+c].backm; /* follow backtrace */ 00703 r--; /* adjust coords to move in dir spec'd by back ptr */ 00704 c--; 00705 cmost--; /* decreases as query seq is aligned, so saves on unused areas */ 00706 } 00707 else 00708 { 00709 if (dir=='d') /* delete in query (gap) */ 00710 { 00711 *btq++='-'; /* accumulate alignment output strings */ 00712 *btt++=t[r-1]; /* accumulate alignment output strings */ 00713 axt->symCount++; 00714 dir = cells[lv*(ki+r-rr)+c].backd; /* follow backtrace */ 00715 r--; /* adjust coords to move in dir spec'd by back ptr */ 00716 } 00717 else /* insert in query (gap) */ 00718 { 00719 *btq++=q[c-1]; /* accumulate alignment output strings */ 00720 *btt++='-'; /* accumulate alignment output strings */ 00721 axt->symCount++; 00722 dir = cells[lv*(ki+r-rr)+c].backi; /* follow backtrace */ 00723 c--; 00724 cmost--; /* decreases as query seq is aligned, so saves on unused areas */ 00725 } 00726 } 00727 00728 } 00729 00730 /* back up and do it again */ 00731 ki--; 00732 k++; /* k grows as we move back up */ 00733 rr-=k; 00734 kmax = ki+k-1; 00735 00736 /* check for various termination conditions to stop main loop */ 00737 if (ki < 0) {break;} 00738 if ((r==0)&&(c==0)) {break;} 00739 if (dir=='s') {break;} 00740 00741 /* re-calculate array from previous saved kth row going back 00742 this is how we save memory, but have to regenerate half on average 00743 we are re-using the same call 00744 */ 00745 00746 #ifdef DEBUG 00747 printf("bestr=%d, bestc=%d, bestdir=%c k=%d, ki=%d, kmax=%d\n",bestr,bestc,bestdir,k,ki,kmax); 00748 #endif 00749 00750 00751 kForwardAffine(cells, ki+1, kmax, rr-ki, cmost, lv, q, t, ss, &bestbest, &bestr, &bestc, &bestdir); 00752 00753 #ifdef DEBUG 00754 printf("\nBKWD PASS DONE. cmost=%d r=%d c=%d\n\n",cmost,r,c); 00755 #endif 00756 00757 } 00758 00759 axt->qStart=c; 00760 axt->tStart=r; 00761 00762 /* reverse backwards trace and zero-terminate strings */ 00763 00764 reverseBytes(axt->qSym,axt->symCount); 00765 reverseBytes(axt->tSym,axt->symCount); 00766 axt->qSym[axt->symCount]=0; 00767 axt->tSym[axt->symCount]=0; 00768 00769 axt->score=bestbest; 00770 00771 00772 /* 00773 should I test stringsize and if massively smaller, realloc string to save ram? 00774 */ 00775 00776 freez(&cells); 00777 00778 return axt; 00779 }
Here is the call graph for this function:

| boolean axtAffineSmallEnough | ( | double | querySize, | |
| double | targetSize | |||
| ) |
Definition at line 13 of file axtAffine.c.
Referenced by affineAlign().
Here is the caller graph for this function:

| void axtBlastOut | ( | struct axtBundle * | abList, | |
| int | queryIx, | |||
| boolean | isProt, | |||
| FILE * | f, | |||
| char * | databaseName, | |||
| int | databaseSeqCount, | |||
| double | databaseLetterCount, | |||
| char * | blastType, | |||
| char * | ourId, | |||
| double | minIdentity | |||
| ) |
Definition at line 782 of file blastOut.c.
References errAbort(), FALSE, ncbiBlastOut(), sameWord, tabBlastOut(), TRUE, wuBlastOut(), and xmlBlastOut().
Referenced by blastQueryOut().
00787 : 00788 * ab - the list of bundles of axt's. 00789 * f - output file handle 00790 * databaseSeqCount - number of sequences in database 00791 * databaseLetterCount - number of bases or aa's in database 00792 * blastType - blast/wublast/blast8/blast9/xml 00793 * ourId - optional (may be NULL) thing to put in header 00794 */ 00795 { 00796 if (abList == NULL) 00797 return; 00798 if (sameWord(blastType, "wublast")) 00799 wuBlastOut(abList, queryIx, isProt, f, databaseName, 00800 databaseSeqCount, databaseLetterCount, ourId); 00801 else if (sameWord(blastType, "xml")) 00802 xmlBlastOut(abList, queryIx, isProt, f, databaseName, 00803 databaseSeqCount, databaseLetterCount, ourId); 00804 else if (sameWord(blastType, "blast")) 00805 ncbiBlastOut(abList, queryIx, isProt, f, databaseName, 00806 databaseSeqCount, databaseLetterCount, ourId, minIdentity); 00807 else if (sameWord(blastType, "blast8")) 00808 tabBlastOut(abList, queryIx, isProt, f, databaseName, 00809 databaseSeqCount, databaseLetterCount, ourId, FALSE); 00810 else if (sameWord(blastType, "blast9")) 00811 tabBlastOut(abList, queryIx, isProt, f, databaseName, 00812 databaseSeqCount, databaseLetterCount, ourId, TRUE); 00813 else 00814 errAbort("Unrecognized blastType %s in axtBlastOut", blastType); 00815 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void axtBundleFree | ( | struct axtBundle ** | pObj | ) |
Definition at line 796 of file axt.c.
References axtFreeList(), axtBundle::axtList, and freez().
Referenced by axtBundleFreeList().
00798 { 00799 struct axtBundle *obj = *pObj; 00800 if (obj != NULL) 00801 { 00802 axtFreeList(&obj->axtList); 00803 freez(pObj); 00804 } 00805 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void axtBundleFreeList | ( | struct axtBundle ** | pList | ) |
Definition at line 807 of file axt.c.
References axtBundleFree(), and axtBundle::next.
Referenced by axtQueryOut(), blastQueryOut(), mafQueryOut(), and sim4QueryOut().
00809 { 00810 struct axtBundle *el, *next; 00811 00812 for (el = *pList; el != NULL; el = next) 00813 { 00814 next = el->next; 00815 axtBundleFree(&el); 00816 } 00817 *pList = NULL; 00818 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 167 of file axt.c.
References countNonDash(), FALSE, lineFile::fileName, lineFile::lineIx, axt::qEnd, axt::qStart, axt::qSym, axt::symCount, axt::tEnd, TRUE, axt::tStart, axt::tSym, and warn().
00169 { 00170 int tSize = countNonDash(axt->tSym, axt->symCount); 00171 int qSize = countNonDash(axt->qSym, axt->symCount); 00172 if (tSize != axt->tEnd - axt->tStart) 00173 { 00174 warn("%d non-dashes, but %d bases to cover at line %d of %s", 00175 tSize, axt->tEnd - axt->tStart, lf->lineIx, lf->fileName); 00176 return FALSE; 00177 } 00178 if (qSize != axt->qEnd - axt->qStart) 00179 { 00180 warn("%d non-dashes, but %d bases to cover at line %d of %s", 00181 tSize, axt->qEnd - axt->qStart, lf->lineIx, lf->fileName); 00182 return FALSE; 00183 } 00184 return TRUE; 00185 }
Here is the call graph for this function:

| int axtCmpQuery | ( | const void * | va, | |
| const void * | vb | |||
| ) |
Definition at line 123 of file axt.c.
References axt::qName, and axt::qStart.
00125 { 00126 const struct axt *a = *((struct axt **)va); 00127 const struct axt *b = *((struct axt **)vb); 00128 int dif; 00129 dif = strcmp(a->qName, b->qName); 00130 if (dif == 0) 00131 dif = a->qStart - b->qStart; 00132 return dif; 00133 }
| int axtCmpScore | ( | const void * | va, | |
| const void * | vb | |||
| ) |
| int axtCmpTarget | ( | const void * | va, | |
| const void * | vb | |||
| ) |
Definition at line 135 of file axt.c.
References axt::tName, and axt::tStart.
00137 { 00138 const struct axt *a = *((struct axt **)va); 00139 const struct axt *b = *((struct axt **)vb); 00140 int dif; 00141 dif = strcmp(a->tName, b->tName); 00142 if (dif == 0) 00143 dif = a->tStart - b->tStart; 00144 return dif; 00145 }
| int axtCmpTargetScoreDesc | ( | const void * | va, | |
| const void * | vb | |||
| ) |
Definition at line 155 of file axt.c.
References axt::score, and axt::tName.
00157 { 00158 const struct axt *a = *((struct axt **)va); 00159 const struct axt *b = *((struct axt **)vb); 00160 int dif; 00161 dif = strcmp(a->tName, b->tName); 00162 if (dif == 0) 00163 dif = b->score - a->score; 00164 return dif; 00165 }
| double axtCoverage | ( | struct axt * | axt, | |
| int | qSize, | |||
| int | tSize | |||
| ) |
Definition at line 940 of file axt.c.
References axt::qEnd, axt::qStart, axt::tEnd, and axt::tStart.
00942 { 00943 double cov = axt->tEnd - axt->tStart + axt->qEnd - axt->qStart; 00944 return cov/(qSize+tSize); 00945 }
| void axtFree | ( | struct axt ** | pEl | ) |
Definition at line 25 of file axt.c.
References freeMem(), freez(), axt::qName, axt::qSym, axt::tName, and axt::tSym.
Referenced by axtFreeList().
00027 { 00028 struct axt *el = *pEl; 00029 if (el != NULL) 00030 { 00031 freeMem(el->qName); 00032 freeMem(el->tName); 00033 freeMem(el->qSym); 00034 freeMem(el->tSym); 00035 freez(pEl); 00036 } 00037 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void axtFreeList | ( | struct axt ** | pList | ) |
Definition at line 39 of file axt.c.
References axtFree(), and axt::next.
Referenced by axtBundleFree().
00041 { 00042 struct axt *el, *next; 00043 00044 for (el = *pList; el != NULL; el = next) 00045 { 00046 next = el->next; 00047 axtFree(&el); 00048 } 00049 *pList = NULL; 00050 }
Here is the call graph for this function:

Here is the caller graph for this function:

| double axtIdWithGaps | ( | struct axt * | axt | ) |
Definition at line 927 of file axt.c.
References axt::qSym, axt::symCount, and axt::tSym.
00929 { 00930 int i; 00931 int matchCount = 0; 00932 for (i=0; i<axt->symCount; ++i) 00933 { 00934 if (toupper(axt->qSym[i]) == toupper(axt->tSym[i])) 00935 ++matchCount; 00936 } 00937 return (double)matchCount/axt->symCount; 00938 }
| void axtPrintTraditional | ( | struct axt * | axt, | |
| int | maxLine, | |||
| struct axtScoreScheme * | ss, | |||
| FILE * | f | |||
| ) |
Definition at line 866 of file axt.c.
References digitsBaseTen(), max, axt::qEnd, axt::qStart, axt::qSym, spaceOut(), ss, axt::symCount, axt::tEnd, axt::tStart, and axt::tSym.
00868 { 00869 int qPos = axt->qStart; 00870 int tPos = axt->tStart; 00871 int symPos; 00872 int aDigits = digitsBaseTen(axt->qEnd); 00873 int bDigits = digitsBaseTen(axt->tEnd); 00874 int digits = max(aDigits, bDigits); 00875 00876 for (symPos = 0; symPos < axt->symCount; symPos += maxLine) 00877 { 00878 /* Figure out which part of axt to use for this line. */ 00879 int lineSize = axt->symCount - symPos; 00880 int lineEnd, i; 00881 if (lineSize > maxLine) 00882 lineSize = maxLine; 00883 lineEnd = symPos + lineSize; 00884 00885 /* Draw query line including numbers. */ 00886 fprintf(f, "%0*d ", digits, qPos+1); 00887 for (i=symPos; i<lineEnd; ++i) 00888 { 00889 char c = axt->qSym[i]; 00890 fputc(c, f); 00891 if (c != '.' && c != '-') 00892 ++qPos; 00893 } 00894 fprintf(f, " %0*d\n", digits, qPos); 00895 00896 /* Draw line with match/mismatch symbols. */ 00897 spaceOut(f, digits+1); 00898 for (i=symPos; i<lineEnd; ++i) 00899 { 00900 char q = axt->qSym[i]; 00901 char t = axt->tSym[i]; 00902 char out = ' '; 00903 if (q == t) 00904 out = '|'; 00905 else if (ss != NULL && ss->matrix[(int)q][(int)t] > 0) 00906 out = '+'; 00907 fputc(out, f); 00908 } 00909 fputc('\n', f); 00910 00911 /* Draw target line including numbers. */ 00912 fprintf(f, "%0*d ", digits, tPos+1); 00913 for (i=symPos; i<lineEnd; ++i) 00914 { 00915 char c = axt->tSym[i]; 00916 fputc(c, f); 00917 if (c != '.' && c != '-') 00918 ++tPos; 00919 } 00920 fprintf(f, " %0*d\n", digits, tPos); 00921 00922 /* Draw extra empty line. */ 00923 fputc('\n', f); 00924 } 00925 }
Here is the call graph for this function:

Definition at line 95 of file axt.c.
References axtReadWithPos().
00098 { 00099 return axtReadWithPos(lf, NULL); 00100 }
Here is the call graph for this function:

Definition at line 53 of file axt.c.
References AllocVar, cloneMem(), cloneString(), errAbort(), lineFile::fileName, lineFileChop, lineFileNeedNext(), lineFileNeedNum(), lineFileNext(), lineFileTell, lineFile::lineIx, axt::qEnd, axt::qName, axt::qStart, axt::qStrand, axt::qSym, axt::score, axt::symCount, axt::tEnd, axt::tName, axt::tStart, axt::tStrand, and axt::tSym.
Referenced by axtRead().
00056 { 00057 char *words[10], *line; 00058 int wordCount, symCount; 00059 struct axt *axt; 00060 00061 wordCount = lineFileChop(lf, words); 00062 if (retOffset != NULL) 00063 *retOffset = lineFileTell(lf); 00064 if (wordCount <= 0) 00065 return NULL; 00066 if (wordCount < 8) 00067 { 00068 errAbort("Expecting at least 8 words line %d of %s got %d\n", lf->lineIx, lf->fileName, 00069 wordCount); 00070 } 00071 AllocVar(axt); 00072 00073 axt->qName = cloneString(words[4]); 00074 axt->qStart = lineFileNeedNum(lf, words, 5) - 1; 00075 axt->qEnd = lineFileNeedNum(lf, words, 6); 00076 axt->qStrand = words[7][0]; 00077 axt->tName = cloneString(words[1]); 00078 axt->tStart = lineFileNeedNum(lf, words, 2) - 1; 00079 axt->tEnd = lineFileNeedNum(lf, words, 3); 00080 axt->tStrand = '+'; 00081 if (wordCount > 8) 00082 axt->score = lineFileNeedNum(lf, words, 8); 00083 lineFileNeedNext(lf, &line, NULL); 00084 axt->symCount = symCount = strlen(line); 00085 axt->tSym = cloneMem(line, symCount+1); 00086 lineFileNeedNext(lf, &line, NULL); 00087 if (strlen(line) != symCount) 00088 errAbort("Symbol count %d != %d inconsistent between sequences line %d and prev line of %s", 00089 symCount, (int)strlen(line), lf->lineIx, lf->fileName); 00090 axt->qSym = cloneMem(line, symCount+1); 00091 lineFileNext(lf, &line, NULL); /* Skip blank line */ 00092 return axt; 00093 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int axtScore | ( | struct axt * | axt, | |
| struct axtScoreScheme * | ss | |||
| ) |
Definition at line 286 of file axt.c.
References axtScoreSym(), axt::qSym, ss, axt::symCount, and axt::tSym.
Referenced by axtScoreDnaDefault(), axtScoreProteinDefault(), and axtSubsetOnT().
00288 { 00289 return axtScoreSym(ss, axt->symCount, axt->qSym, axt->tSym); 00290 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int axtScoreDnaDefault | ( | struct axt * | axt | ) |
Definition at line 292 of file axt.c.
References axtScore(), axtScoreSchemeDefault(), and ss.
Referenced by axtFromBlocks(), and saveAxtBundle().
00294 { 00295 static struct axtScoreScheme *ss; 00296 if (ss == NULL) 00297 ss = axtScoreSchemeDefault(); 00298 return axtScore(axt, ss); 00299 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int axtScoreFilterRepeats | ( | struct axt * | axt, | |
| struct axtScoreScheme * | ss | |||
| ) |
Definition at line 280 of file axt.c.
References axtScoreSymFilterRepeats(), axt::qSym, ss, axt::symCount, and axt::tSym.
00282 { 00283 return axtScoreSymFilterRepeats(ss, axt->symCount, axt->qSym, axt->tSym); 00284 }
Here is the call graph for this function:

| int axtScoreProteinDefault | ( | struct axt * | axt | ) |
Definition at line 301 of file axt.c.
References axtScore(), axtScoreSchemeProteinDefault(), and ss.
Referenced by saveAxtBundle().
00303 { 00304 static struct axtScoreScheme *ss; 00305 if (ss == NULL) 00306 ss = axtScoreSchemeProteinDefault(); 00307 return axtScore(axt, ss); 00308 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct axtScoreScheme* axtScoreSchemeDefault | ( | ) | [read] |
Definition at line 382 of file axt.c.
References AllocVar, propagateCase(), and ss.
Referenced by axtScoreDnaDefault(), and axtScoreSchemeFromBlastzMatrix().
00385 { 00386 static struct axtScoreScheme *ss; 00387 00388 if (ss != NULL) 00389 return ss; 00390 AllocVar(ss); 00391 00392 /* Set up lower case elements of matrix. */ 00393 ss->matrix['a']['a'] = 91; 00394 ss->matrix['a']['c'] = -114; 00395 ss->matrix['a']['g'] = -31; 00396 ss->matrix['a']['t'] = -123; 00397 00398 ss->matrix['c']['a'] = -114; 00399 ss->matrix['c']['c'] = 100; 00400 ss->matrix['c']['g'] = -125; 00401 ss->matrix['c']['t'] = -31; 00402 00403 ss->matrix['g']['a'] = -31; 00404 ss->matrix['g']['c'] = -125; 00405 ss->matrix['g']['g'] = 100; 00406 ss->matrix['g']['t'] = -114; 00407 00408 ss->matrix['t']['a'] = -123; 00409 ss->matrix['t']['c'] = -31; 00410 ss->matrix['t']['g'] = -114; 00411 ss->matrix['t']['t'] = 91; 00412 00413 propagateCase(ss); 00414 ss->gapOpen = 400; 00415 ss->gapExtend = 30; 00416 return ss; 00417 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void axtScoreSchemeDnaWrite | ( | struct axtScoreScheme * | ss, | |
| FILE * | f, | |||
| char * | name | |||
| ) |
Definition at line 727 of file axt.c.
References ss, and stripChar().
00730 { 00731 if (ss == NULL) 00732 return; 00733 if (f == NULL) 00734 return; 00735 fprintf(f, "##matrix=%s 16 %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", 00736 name, 00737 ss->matrix['a']['a'], 00738 ss->matrix['a']['c'], 00739 ss->matrix['a']['g'], 00740 ss->matrix['a']['t'], 00741 00742 ss->matrix['c']['a'], 00743 ss->matrix['c']['c'], 00744 ss->matrix['c']['g'], 00745 ss->matrix['c']['t'], 00746 00747 ss->matrix['g']['a'], 00748 ss->matrix['g']['c'], 00749 ss->matrix['g']['g'], 00750 ss->matrix['g']['t'], 00751 00752 ss->matrix['t']['a'], 00753 ss->matrix['t']['c'], 00754 ss->matrix['t']['g'], 00755 ss->matrix['t']['t']); 00756 fprintf(f, "##gapPenalties=%s O=%d E=%d\n", name, ss->gapOpen, ss->gapExtend); 00757 if (ss->extra!=NULL) 00758 { 00759 stripChar(ss->extra,' '); 00760 stripChar(ss->extra,'"'); 00761 fprintf(f, "##blastzParms=%s\n", ss->extra); 00762 } 00763 }
Here is the call graph for this function:

| void axtScoreSchemeFree | ( | struct axtScoreScheme ** | pObj | ) |
| struct axtScoreScheme* axtScoreSchemeFromBlastzMatrix | ( | char * | text, | |
| int | gapOpen, | |||
| int | gapExtend | |||
| ) | [read] |
Definition at line 472 of file axt.c.
References axtScoreSchemeDefault(), chopString(), and ss.
00475 { 00476 char *matrixDna[32]; 00477 struct axtScoreScheme *ss = axtScoreSchemeDefault(); 00478 int matrixSize = chopString(text, ",", matrixDna, 32); 00479 if (matrixSize != 16) 00480 return ss; 00481 if (ss == NULL) 00482 return NULL; 00483 ss->gapOpen = gapOpen; 00484 ss->gapExtend = gapExtend; 00485 ss->matrix['a']['a'] = atoi(matrixDna[0]); 00486 ss->matrix['a']['c'] = atoi(matrixDna[1]); 00487 ss->matrix['a']['g'] = atoi(matrixDna[2]); 00488 ss->matrix['a']['t'] = atoi(matrixDna[3]); 00489 00490 ss->matrix['c']['a'] = atoi(matrixDna[4]); 00491 ss->matrix['c']['c'] = atoi(matrixDna[5]); 00492 ss->matrix['c']['g'] = atoi(matrixDna[6]); 00493 ss->matrix['c']['t'] = atoi(matrixDna[7]); 00494 00495 ss->matrix['g']['a'] = atoi(matrixDna[8]); 00496 ss->matrix['g']['c'] = atoi(matrixDna[9]); 00497 ss->matrix['g']['g'] = atoi(matrixDna[10]); 00498 ss->matrix['g']['t'] = atoi(matrixDna[11]); 00499 00500 ss->matrix['t']['a'] = atoi(matrixDna[12]); 00501 ss->matrix['t']['c'] = atoi(matrixDna[13]); 00502 ss->matrix['t']['g'] = atoi(matrixDna[14]); 00503 ss->matrix['t']['t'] = atoi(matrixDna[15]); 00504 return ss; 00505 }
Here is the call graph for this function:

| struct axtScoreScheme* axtScoreSchemeProteinDefault | ( | ) | [read] |
Definition at line 616 of file axt.c.
References axtScoreSchemeFromProteinText(), blosumText, and ss.
Referenced by axtScoreProteinDefault(), blastiodAxtOutput(), and countPositives().
00619 { 00620 static struct axtScoreScheme *ss; 00621 int i,j; 00622 if (ss != NULL) 00623 return ss; 00624 ss = axtScoreSchemeFromProteinText(blosumText, "blosum62"); 00625 for (i=0; i<128; ++i) 00626 for (j=0; j<128; ++j) 00627 ss->matrix[i][j] *= 19; 00628 ss->gapOpen = 11 * 19; 00629 ss->gapExtend = 1 * 19; 00630 return ss; 00631 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct axtScoreScheme* axtScoreSchemeProteinRead | ( | char * | fileName | ) | [read] |
Definition at line 639 of file axt.c.
References axtScoreSchemeFromProteinText(), freeMem(), readInGulp(), and ss.
00640 { 00641 char *string; 00642 struct axtScoreScheme *ss; 00643 00644 readInGulp(fileName, &string, NULL); 00645 ss = axtScoreSchemeFromProteinText(string, fileName); 00646 freeMem(string); 00647 00648 return ss; 00649 }
Here is the call graph for this function:

| struct axtScoreScheme* axtScoreSchemeRead | ( | char * | fileName | ) | [read] |
Definition at line 712 of file axt.c.
References axtScoreSchemeReadLf(), lineFileOpen(), ss, and TRUE.
00721 { 00722 struct lineFile *lf = lineFileOpen(fileName, TRUE); 00723 struct axtScoreScheme *ss = axtScoreSchemeReadLf(lf); 00724 return ss; 00725 }
Here is the call graph for this function:

| struct axtScoreScheme* axtScoreSchemeReadLf | ( | struct lineFile * | lf | ) | [read] |
Definition at line 651 of file axt.c.
References AllocVar, ArraySize, chopString(), cloneString(), errAbort(), FALSE, lineFileNeedNum(), lineFileNext(), lineFileRow, propagateCase(), sameString, shortScoreScheme(), ss, and TRUE.
Referenced by axtScoreSchemeRead().
00660 { 00661 char *line, *row[4], *parts[32]; 00662 int i,j, partCount; 00663 struct axtScoreScheme *ss; 00664 boolean gotO = FALSE, gotE = FALSE; 00665 static int trans[4] = {'a', 'c', 'g', 't'}; 00666 00667 AllocVar(ss); 00668 ss->extra = NULL; 00669 if (!lineFileRow(lf, row)) 00670 shortScoreScheme(lf); 00671 if (row[0][0] != 'A' || row[1][0] != 'C' || row[2][0] != 'G' 00672 || row[3][0] != 'T') 00673 errAbort("%s doesn't seem to be a score matrix file", lf->fileName); 00674 for (i=0; i<4; ++i) 00675 { 00676 if (!lineFileRow(lf, row)) 00677 shortScoreScheme(lf); 00678 for (j=0; j<4; ++j) 00679 ss->matrix[trans[i]][trans[j]] = lineFileNeedNum(lf, row, j); 00680 } 00681 if (lineFileNext(lf, &line, NULL)) 00682 { 00683 ss->extra = cloneString(line); 00684 partCount = chopString(line, " =,\t", parts, ArraySize(parts)); 00685 for (i=0; i<partCount-1; i += 2) 00686 { 00687 if (sameString(parts[i], "O")) 00688 { 00689 gotO = TRUE; 00690 ss->gapOpen = atoi(parts[i+1]); 00691 } 00692 if (sameString(parts[i], "E")) 00693 { 00694 gotE = TRUE; 00695 ss->gapExtend = atoi(parts[i+1]); 00696 } 00697 } 00698 if (!gotO || !gotE) 00699 errAbort("Expecting O = and E = in last line of %s", lf->fileName); 00700 if (ss->gapOpen <= 0 || ss->gapExtend <= 0) 00701 errAbort("Must have positive gap scores"); 00702 } 00703 else 00704 { 00705 ss->gapOpen = 400; 00706 ss->gapExtend = 30; 00707 } 00708 propagateCase(ss); 00709 return ss; 00710 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct axtScoreScheme* axtScoreSchemeRnaDefault | ( | ) | [read] |
Definition at line 452 of file axt.c.
References axtScoreSchemeSimpleDna(), and ss.
Referenced by bandedExtend(), findFromSmallerSeeds(), hardRefineSplice(), and smoothOneGap().
00455 { 00456 static struct axtScoreScheme *ss; 00457 if (ss == NULL) 00458 ss = axtScoreSchemeSimpleDna(100, 200, 300, 300); 00459 return ss; 00460 }
Here is the call graph for this function:

Here is the caller graph for this function:

| struct axtScoreScheme* axtScoreSchemeRnaFill | ( | ) | [read] |
Definition at line 462 of file axt.c.
References axtScoreSchemeSimpleDna(), and ss.
00465 { 00466 static struct axtScoreScheme *ss; 00467 if (ss == NULL) 00468 ss = axtScoreSchemeSimpleDna(100, 100, 200, 200); 00469 return ss; 00470 }
Here is the call graph for this function:

| struct axtScoreScheme* axtScoreSchemeSimpleDna | ( | int | match, | |
| int | misMatch, | |||
| int | gapOpen, | |||
| int | gapExtend | |||
| ) | [read] |
Definition at line 419 of file axt.c.
References AllocVar, propagateCase(), and ss.
Referenced by axtScoreSchemeRnaDefault(), and axtScoreSchemeRnaFill().
00421 { 00422 static struct axtScoreScheme *ss; 00423 AllocVar(ss); 00424 00425 /* Set up lower case elements of matrix. */ 00426 ss->matrix['a']['a'] = match; 00427 ss->matrix['a']['c'] = -misMatch; 00428 ss->matrix['a']['g'] = -misMatch; 00429 ss->matrix['a']['t'] = -misMatch; 00430 00431 ss->matrix['c']['a'] = -misMatch; 00432 ss->matrix['c']['c'] = match; 00433 ss->matrix['c']['g'] = -misMatch; 00434 ss->matrix['c']['t'] = -misMatch; 00435 00436 ss->matrix['g']['a'] = -misMatch; 00437 ss->matrix['g']['c'] = -misMatch; 00438 ss->matrix['g']['g'] = match; 00439 ss->matrix['g']['t'] = -misMatch; 00440 00441 ss->matrix['t']['a'] = -misMatch; 00442 ss->matrix['t']['c'] = -misMatch; 00443 ss->matrix['t']['g'] = -misMatch; 00444 ss->matrix['t']['t'] = match; 00445 00446 propagateCase(ss); 00447 ss->gapOpen = gapOpen; 00448 ss->gapExtend = gapExtend; 00449 return ss; 00450 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int axtScoreSym | ( | struct axtScoreScheme * | ss, | |
| int | symCount, | |||
| char * | qSym, | |||
| char * | tSym | |||
| ) |
Definition at line 197 of file axt.c.
References dnaUtilOpen(), FALSE, ss, and TRUE.
Referenced by axtScore(), hardRefineSplice(), and smoothOneGap().
00199 { 00200 int i; 00201 char q,t; 00202 int score = 0; 00203 boolean lastGap = FALSE; 00204 int gapStart = ss->gapOpen; 00205 int gapExt = ss->gapExtend; 00206 00207 dnaUtilOpen(); 00208 for (i=0; i<symCount; ++i) 00209 { 00210 q = qSym[i]; 00211 t = tSym[i]; 00212 if (q == '-' || t == '-') 00213 { 00214 if (lastGap) 00215 score -= gapExt; 00216 else 00217 { 00218 /* Use gapStart+gapExt to be consistent with blastz: */ 00219 score -= (gapStart + gapExt); 00220 lastGap = TRUE; 00221 } 00222 } 00223 else 00224 { 00225 score += ss->matrix[(int)q][(int)t]; 00226 lastGap = FALSE; 00227 } 00228 } 00229 return score; 00230 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int axtScoreUngapped | ( | struct axtScoreScheme * | ss, | |
| char * | q, | |||
| char * | t, | |||
| int | size | |||
| ) |
| void axtSubsetOnT | ( | struct axt * | axt, | |
| int | newStart, | |||
| int | newEnd, | |||
| struct axtScoreScheme * | ss, | |||
| FILE * | f | |||
| ) |
Definition at line 310 of file axt.c.
References axtScore(), axtWrite(), countNonDash(), FALSE, axt::qEnd, axt::qStart, axt::qSym, axt::score, skipIgnoringDash(), ss, axt::symCount, axt::tEnd, TRUE, axt::tStart, and axt::tSym.
00314 { 00315 if (newStart < axt->tStart) 00316 newStart = axt->tStart; 00317 if (newEnd > axt->tEnd) 00318 newEnd = axt->tEnd; 00319 if (newEnd <= newStart) 00320 return; 00321 if (newStart == axt->tStart && newEnd == axt->tEnd) 00322 { 00323 axt->score = axtScore(axt, ss); 00324 axtWrite(axt, f); 00325 } 00326 else 00327 { 00328 struct axt a = *axt; 00329 char *tSymStart = skipIgnoringDash(a.tSym, newStart - a.tStart, TRUE); 00330 char *tSymEnd = skipIgnoringDash(tSymStart, newEnd - newStart, FALSE); 00331 int symCount = tSymEnd - tSymStart; 00332 char *qSymStart = a.qSym + (tSymStart - a.tSym); 00333 a.qStart += countNonDash(a.qSym, qSymStart - a.qSym); 00334 a.qEnd = a.qStart + countNonDash(qSymStart, symCount); 00335 a.tStart = newStart; 00336 a.tEnd = newEnd; 00337 a.symCount = symCount; 00338 a.qSym = qSymStart; 00339 a.tSym = tSymStart; 00340 a.score = axtScore(&a, ss); 00341 if (a.qStart < a.qEnd && a.tStart < a.tEnd) 00342 axtWrite(&a, f); 00343 } 00344 }
Here is the call graph for this function:

| void axtSwap | ( | struct axt * | axt, | |
| int | tSize, | |||
| int | qSize | |||
| ) |
Definition at line 765 of file axt.c.
References axt::qEnd, axt::qName, axt::qStart, axt::qStrand, axt::qSym, reverseComplement(), reverseIntRange(), axt::symCount, axt::tEnd, axt::tName, axt::tStart, axt::tStrand, and axt::tSym.
00767 { 00768 struct axt old = *axt; 00769 00770 /* Copy non-strand dependent stuff */ 00771 axt->qName = old.tName; 00772 axt->tName = old.qName; 00773 axt->qSym = old.tSym; 00774 axt->tSym = old.qSym; 00775 axt->qStart = old.tStart; 00776 axt->qEnd = old.tEnd; 00777 axt->tStart = old.qStart; 00778 axt->tEnd = old.qEnd; 00779 00780 /* Copy strand dependent stuff. */ 00781 assert(axt->tStrand != '-'); 00782 00783 if (axt->qStrand == '-') 00784 { 00785 /* axt's are really set up so that the target is on the 00786 * + strand and the query is on the minus strand. 00787 * Therefore we need to reverse complement both 00788 * strands while swapping to preserve this. */ 00789 reverseIntRange(&axt->tStart, &axt->tEnd, qSize); 00790 reverseIntRange(&axt->qStart, &axt->qEnd, tSize); 00791 reverseComplement(axt->qSym, axt->symCount); 00792 reverseComplement(axt->tSym, axt->symCount); 00793 } 00794 }
Here is the call graph for this function:

| int axtTransPosToQ | ( | struct axt * | axt, | |
| int | tPos | |||
| ) |
Definition at line 346 of file axt.c.
References countNonDash(), axt::qStart, axt::qSym, skipIgnoringDash(), TRUE, axt::tStart, and axt::tSym.
00348 { 00349 char *tSym = skipIgnoringDash(axt->tSym, tPos - axt->tStart, TRUE); 00350 int symIx = tSym - axt->tSym; 00351 int qPos = countNonDash(axt->qSym, symIx); 00352 return qPos + axt->qStart; 00353 }
Here is the call graph for this function:

| void axtWrite | ( | struct axt * | axt, | |
| FILE * | f | |||
| ) |
Definition at line 102 of file axt.c.
References mustWrite(), axt::qEnd, axt::qName, axt::qStart, axt::qStrand, axt::qSym, axt::score, axt::symCount, axt::tEnd, axt::tName, axt::tStart, and axt::tSym.
Referenced by axtQueryOut(), and axtSubsetOnT().
00104 { 00105 static int ix = 0; 00106 fprintf(f, "%d %s %d %d %s %d %d %c", 00107 ix++, axt->tName, axt->tStart+1, axt->tEnd, 00108 axt->qName, axt->qStart+1, axt->qEnd, axt->qStrand); 00109 fprintf(f, " %d", axt->score); 00110 fputc('\n', f); 00111 mustWrite(f, axt->tSym, axt->symCount); 00112 fputc('\n', f); 00113 mustWrite(f, axt->qSym, axt->symCount); 00114 fputc('\n', f); 00115 fputc('\n', f); 00116 if ((strlen(axt->tSym) != strlen(axt->qSym)) || (axt->symCount > strlen(axt->tSym))) 00117 fprintf(stderr,"Symbol count %d != %d || %d > %d inconsistent in %s in " 00118 "record %d.\n", 00119 (int)strlen(axt->qSym), (int)strlen(axt->tSym), axt->symCount, 00120 (int)strlen(axt->tSym), axt->qName, ix); 00121 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.2