00001 /* gfInternal - some stuff that connects modules but we 00002 * don't want widely advertised in the blat code. */ 00003 00004 struct gfRange 00005 /* A range of bases found by genoFind. Recursive 00006 * data structure. Lowest level roughly corresponds 00007 * to an exon. */ 00008 { 00009 struct gfRange *next; /* Next in singly linked list. */ 00010 int qStart; /* Start in query */ 00011 int qEnd; /* End in query */ 00012 char *tName; /* Target name. Allocated here. */ 00013 struct dnaSeq *tSeq; /* Target Seq. May be NULL in a .nib. Not allocated here. */ 00014 int tStart; /* Start in target */ 00015 int tEnd; /* End in target */ 00016 struct gfRange *components; /* Components of range. */ 00017 int hitCount; /* Number of hits. */ 00018 int frame; /* Reading frame (just for translated alignments) */ 00019 struct trans3 *t3; /* Translated frame or NULL. */ 00020 int tTotalSize; /* Size of entire target sequence, not just loaded parts. Not set until late in the game. */ 00021 char tStrand; /* Just for PCR. */ 00022 }; 00023 00024 void gfRangeFree(struct gfRange **pEl); 00025 /* Free a single dynamically allocated gfRange such as created 00026 * with gfRangeLoad(). */ 00027 00028 void gfRangeFreeList(struct gfRange **pList); 00029 /* Free a list of dynamically allocated gfRange's */ 00030 00031 int gfRangeCmpTarget(const void *va, const void *vb); 00032 /* Compare to sort based on target position. */ 00033 00034 struct gfRange *gfRangesBundle(struct gfRange *exonList, int maxIntron); 00035 /* Bundle a bunch of 'exons' into plausable 'genes'. It's 00036 * not necessary to be precise here. The main thing is to 00037 * group together exons that are close to each other in the 00038 * same target sequence. */ 00039 00040 struct ssFfItem *gfRangesToFfItem(struct gfRange *rangeList, aaSeq *qSeq); 00041 /* Convert ranges to ssFfItem's. */ 00042 00043 struct ssBundle *ffSeedExtInMem(struct genoFind *gf, struct dnaSeq *qSeq, Bits *qMaskBits, 00044 int qOffset, struct lm *lm, int minScore, boolean isRc); 00045 /* Do seed and extend type alignment */ 00046 00047 void dumpBuns(struct ssBundle *bunList); /* uglyf */ 00048 void dumpFf(struct ffAli *left, DNA *needle, DNA *hay);/* uglyf */ 00049 00050 void gfiExpandRange(struct gfRange *range, int qSize, int tSize, 00051 boolean respectFrame, boolean isRc, int expansion); 00052 /* Expand range to cover an additional 500 bases on either side. */ 00053 00054 struct dnaSeq *gfiExpandAndLoadCached(struct gfRange *range, 00055 struct hash *tFileCache, char *tSeqDir, int querySize, 00056 int *retTotalSeqSize, boolean respectFrame, boolean isRc, int expansion); 00057 /* Expand range to cover an additional expansion bases on either side. 00058 * Load up target sequence and return. (Done together because don't 00059 * know target size before loading.) */ 00060 00061 void gfiGetSeqName(char *spec, char *name, char *file); 00062 /* Extract sequence name and optionally file name from spec, 00063 * which includes nib and 2bit files. (The file may be NULL 00064 * if you don't care.) */
1.5.2