inc/chainToPsl.h File Reference

#include "psl.h"
#include "chainBlock.h"

Include dependency graph for chainToPsl.h:

Go to the source code of this file.

Functions

pslchainToPsl (struct chain *chain)
pslchainToFullPsl (struct chain *chain, struct dnaSeq *query, struct dnaSeq *rQuery, struct dnaSeq *target)


Function Documentation

struct psl* chainToFullPsl ( struct chain chain,
struct dnaSeq query,
struct dnaSeq rQuery,
struct dnaSeq target 
) [read]

Definition at line 110 of file chainToPsl.c.

References chainToPsl(), fillInMatchEtc(), and chain::qStrand.

00115 {
00116 struct psl *psl = chainToPsl(chain);
00117 struct dnaSeq *qSeq = (chain->qStrand == '-' ? rQuery : query);
00118 fillInMatchEtc(chain, qSeq, target, psl);
00119 return psl;
00120 }

Here is the call graph for this function:

struct psl* chainToPsl ( struct chain chain  )  [read]

Definition at line 14 of file chainToPsl.c.

References AllocArray, AllocVar, psl::blockCount, chain::blockList, psl::blockSizes, cloneString(), cBlock::next, psl::qBaseInsert, chain::qEnd, psl::qEnd, cBlock::qEnd, psl::qName, chain::qName, psl::qNumInsert, psl::qSize, chain::qSize, psl::qStart, chain::qStart, cBlock::qStart, psl::qStarts, chain::qStrand, slCount(), psl::strand, psl::tBaseInsert, psl::tEnd, chain::tEnd, cBlock::tEnd, psl::tName, chain::tName, psl::tNumInsert, psl::tSize, chain::tSize, psl::tStart, chain::tStart, cBlock::tStart, and psl::tStarts.

Referenced by chainToFullPsl().

00018 {
00019 struct psl *psl;
00020 int blockCount, i;
00021 struct cBlock *b, *nextB;
00022 
00023 blockCount = slCount(chain->blockList);
00024 AllocVar(psl);
00025 AllocArray(psl->blockSizes, blockCount);
00026 AllocArray(psl->qStarts, blockCount);
00027 AllocArray(psl->tStarts, blockCount);
00028 psl->strand[0] = chain->qStrand;
00029 psl->qName = cloneString(chain->qName);
00030 psl->qSize = chain->qSize;
00031 if (chain->qStrand == '-')
00032     {
00033     psl->qStart = chain->qSize - chain->qEnd;
00034     psl->qEnd = chain->qSize - chain->qStart;
00035     }
00036 else
00037     {
00038     psl->qStart = chain->qStart;
00039     psl->qEnd = chain->qEnd;
00040     }
00041 psl->tName = cloneString(chain->tName);
00042 psl->tSize = chain->tSize;
00043 psl->tStart = chain->tStart;
00044 psl->tEnd = chain->tEnd;
00045 psl->blockCount = blockCount;
00046 for (i=0, b=chain->blockList; i < blockCount; ++i, b = nextB)
00047     {
00048     nextB = b->next;
00049     psl->tStarts[i] = b->tStart;
00050     psl->qStarts[i] = b->qStart;
00051     psl->blockSizes[i] = b->qEnd - b->qStart;
00052     if (nextB != NULL)
00053         {
00054         int qGap = nextB->qStart - b->qEnd;
00055         int tGap = nextB->tStart - b->tEnd;
00056         if (qGap != 0)
00057             {
00058             psl->qBaseInsert += qGap;
00059             psl->qNumInsert += 1;
00060             }
00061         if (tGap != 0)
00062             {
00063             psl->tBaseInsert += tGap;
00064             psl->tNumInsert += 1;
00065             }
00066         }
00067     }
00068 return psl;
00069 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Tue Dec 25 18:44:21 2007 for blat by  doxygen 1.5.2