Exemple #1
0
struct ffAli *cutAtBigIntrons(struct ffAli *ffList, int maxIntron, 
	int *pScore, enum ffStringency stringency, 
	boolean isProt, bioSeq *tSeq, struct trans3 *t3List,
	struct ffAli **returnLeftovers)
/* Return ffList up to the first intron that's too big.
 * Put the rest of the blocks back onto the leftovers list. */
{
struct ffAli *prevFf, *ff, *cutFf = NULL;
prevFf = ffList;
for (ff = prevFf->right; ff != NULL; ff = ff->right)
    {
    int nhStart = trans3GenoPos(    ff->hStart, tSeq, t3List, FALSE);
    int ohEnd   = trans3GenoPos(prevFf->hEnd  , tSeq, t3List, TRUE);
    int dt = nhStart - ohEnd;
    if (dt > maxIntron)
        {
	cutFf = prevFf;
	break;
	}
    prevFf = ff;
    }
if (cutFf != NULL)
    {
    ff = cutFf->right;
    cutFf->right = NULL;
    ff->left = NULL;
    ffCat(returnLeftovers, &ff);
    if (isProt)
	*pScore = ffScoreProtein(ffList, stringency);
    else
	*pScore = ffScore(ffList, stringency);
    }
return ffList;
}
Exemple #2
0
void showBundle(struct ssBundle *bun, boolean isRc)
/* Display a bundle for user. */
{
struct ssFfItem *ffi;

for (ffi = bun->ffList; ffi != NULL; ffi = ffi->next)
    {
    struct ffAli *left, *right;
    int score;
    DNA *needle = bun->qSeq->dna;
    DNA *hay = bun->genoSeq->dna;
    left = ffi->ff;
    right = ffRightmost(left);
    score = ffScore(left, ffTight);
    printf("%s:%d-%d of %d %s:%d-%d of %d strand %c score %d\n",
	bun->genoSeq->name, left->hStart - hay, right->hEnd - hay, bun->genoSeq->size,
	bun->qSeq->name, left->nStart - needle, right->nEnd - needle, bun->qSeq->size,	
	(isRc ? '-' : '+'), score);
    }
}
Exemple #3
0
int ffScoreCdna(struct ffAli *ali)
/* Figure out overall score of this alignment. 
 * Perfect match is number of bases in needle. */
{
return ffScore(ali, ffCdna);
}