#include "chain.h"Include dependency graph for chainBlock.h:

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

Go to the source code of this file.
Typedefs | |
| typedef int(*) | GapCost (int dq, int dt, void *gapData) |
| typedef int(*) | ConnectCost (struct cBlock *a, struct cBlock *b, void *gapData) |
Functions | |
| chain * | chainBlocks (char *qName, int qSize, char qStrand, char *tName, int tSize, struct cBlock **pBlockList, ConnectCost connectCost, GapCost gapCost, void *gapData, FILE *details) |
| typedef int(*) ConnectCost(struct cBlock *a, struct cBlock *b, void *gapData) |
Definition at line 17 of file chainBlock.h.
| typedef int(*) GapCost(int dq, int dt, void *gapData) |
Definition at line 13 of file chainBlock.h.
| struct chain* chainBlocks | ( | char * | qName, | |
| int | qSize, | |||
| char | qStrand, | |||
| char * | tName, | |||
| int | tSize, | |||
| struct cBlock ** | pBlockList, | |||
| ConnectCost | connectCost, | |||
| GapCost | gapCost, | |||
| void * | gapData, | |||
| FILE * | details | |||
| ) | [read] |
Definition at line 392 of file chainBlock.c.
References chainCmpScore(), findBestPredecessors(), kdLeafCmpT(), kdLeafCmpTotal(), kdTreeMake(), lm, lmAllocVar, lmCleanup(), lmInit(), cBlock::next, chain::next, peelChains(), cBlock::score, scoreBlocks(), slAddHead, slSort(), cBlock::tEnd, and cBlock::tStart.
Referenced by ssFindBestBig().
00412 { 00413 struct kdTree *tree; 00414 struct kdLeaf *leafList = NULL, *leaf; 00415 struct cBlock *block; 00416 struct chain *chainList = NULL, *chain; 00417 struct lm *lm; 00418 00419 /* Empty lists will be problematic later, so deal with them here. */ 00420 if (*pBlockList == NULL) 00421 return NULL; 00422 00423 /* Make a leaf for each block. */ 00424 lm = lmInit(0); /* Memory for tree, branches and leaves. */ 00425 for (block = *pBlockList; block != NULL; block = block->next) 00426 { 00427 /* Watch out for 0-length blocks in input: */ 00428 if (block->tStart == block->tEnd) 00429 continue; 00430 lmAllocVar(lm, leaf); 00431 leaf->cb = block; 00432 leaf->totalScore = block->score; 00433 slAddHead(&leafList, leaf); 00434 } 00435 00436 /* Figure out chains. */ 00437 slSort(&leafList, kdLeafCmpT); 00438 tree = kdTreeMake(leafList, lm); 00439 findBestPredecessors(tree, leafList, connectCost, gapCost, gapData); 00440 slSort(&leafList, kdLeafCmpTotal); 00441 chainList = peelChains(qName, qSize, qStrand, tName, tSize, leafList, details); 00442 00443 /* Rescore chains (since some truncated) */ 00444 for (chain = chainList; chain != NULL; chain = chain->next) 00445 chain->score = scoreBlocks(chain->blockList, connectCost, gapData); 00446 slSort(&chainList, chainCmpScore); 00447 00448 /* Clean up and go home. */ 00449 lmCleanup(&lm); 00450 *pBlockList = NULL; 00451 return chainList; 00452 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.2