inc/chainBlock.h

Go to the documentation of this file.
00001 /* chainBlock - Chain together scored blocks from an alignment
00002  * into scored chains.  Internally this uses a kd-tree and a
00003  * varient of an algorithm suggested by Webb Miller and further
00004  * developed by Jim Kent. */
00005 
00006 #ifndef CHAINBLOCK_H
00007 #define CHAINBLOCK_H
00008 
00009 #ifndef CHAIN_H
00010 #include "chain.h"
00011 #endif
00012 
00013 typedef int (*GapCost)(int dq, int dt, void *gapData);
00014 /* A function that returns gap cost (gaps can be in both dimensions
00015  * at once!) */
00016 
00017 typedef int (*ConnectCost)(struct cBlock *a, struct cBlock *b, void *gapData);
00018 /* A function that returns gap cost as well as any penalty
00019  * from a and b overlapping. */
00020 
00021 struct chain *chainBlocks(
00022         char *qName, int qSize, char qStrand,   /* Info on query sequence */
00023         char *tName, int tSize,                 /* Info on target. */
00024         struct cBlock **pBlockList,             /* Unordered ungapped alignments. */
00025         ConnectCost connectCost,                /* Calculate cost to connect nodes. */
00026         GapCost gapCost,                        /* Cost for non-overlapping nodes. */
00027         void *gapData,                          /* Passed through to connect/gapCosts */
00028         FILE *details);                         /* NULL except for debugging */
00029 /* Create list of chains from list of blocks.  The blockList will get
00030  * eaten up as the blocks are moved from the list to the chain. 
00031  * The list of chains returned is sorted by score. 
00032  *
00033  * The details FILE may be NULL, and is where additional information
00034  * about the chaining is put.
00035  *
00036  * Note that the connectCost needs to adjust for possibly partially 
00037  * overlapping blocks, and that these need to be taken out of the
00038  * resulting chains in general.  This can get fairly complex.  Also
00039  * the chains will need some cleanup at the end.  Use the chainConnect
00040  * module to help with this.  See hg/mouseStuff/axtChain for example usage. */
00041 
00042 #endif /* CHAINBLOCK_H */

Generated on Tue Dec 25 18:39:29 2007 for blat by  doxygen 1.5.2