00001 /***************************************************************************** 00002 * Copyright (C) 2000 Jim Kent. This source code may be freely used * 00003 * for personal, academic, and non-profit purposes. Commercial use * 00004 * permitted only by explicit agreement with Jim Kent (jim_kent@pacbell.net) * 00005 *****************************************************************************/ 00006 /* supStitch stitches together a bundle of ffAli alignments that share 00007 * a common query and target sequence into larger alignments if possible. 00008 * This is commonly used when the query sequence was broken up into 00009 * overlapping blocks in the initial alignment, and also to look for 00010 * introns larger than fuzzyFinder can handle. */ 00011 00012 #ifndef SUPSTITCH_H 00013 #define SUPSTITCH_H 00014 00015 #ifndef DNASEQ_H 00016 #include "dnaseq.h" 00017 #endif 00018 00019 #ifndef FUZZYFIND_H 00020 #include "fuzzyFind.h" 00021 #endif 00022 00023 #ifndef PATSPACE_H 00024 #include "patSpace.h" 00025 #endif 00026 00027 struct ssFfItem 00028 /* A list of fuzzy finder alignments. */ 00029 { 00030 struct ssFfItem *next; /* Next in list. */ 00031 struct ffAli *ff; /* Alignment (owned by ssFfItem) */ 00032 }; 00033 00034 void ssFfItemFree(struct ssFfItem **pEl); 00035 /* Free a single ssFfItem. */ 00036 00037 void ssFfItemFreeList(struct ssFfItem **pList); 00038 /* Free a list of ssFfItems. */ 00039 00040 struct ssBundle 00041 /* A bunch of alignments all with the same query sequence. This 00042 * is the input to the stitcher.*/ 00043 { 00044 struct ssBundle *next; /* Next in list. */ 00045 struct ssFfItem *ffList; /* Item list - memory owned by bundle. */ 00046 bioSeq *qSeq; /* Query sequence (not owned by bundle.) */ 00047 bioSeq *genoSeq; /* Genomic sequence (not owned by bundle.) */ 00048 int genoIx; /* Index of bac in associated PatSpace. */ 00049 int genoContigIx; /* Index of contig inside of seq. */ 00050 void *data; /* User defined data pointer. */ 00051 boolean isProt; /* True if it's a protein based bundle. */ 00052 struct trans3 *t3List; /* Sometimes set to three translated frames. */ 00053 boolean avoidFuzzyFindKludge; /* Temporary flag to avoid call to fuzzyFind. */ 00054 }; 00055 00056 void ssBundleFree(struct ssBundle **pEl); 00057 /* Free up one ssBundle */ 00058 00059 void ssBundleFreeList(struct ssBundle **pList); 00060 /* Free up list of ssBundles */ 00061 00062 00063 void ssStitch(struct ssBundle *bundle, enum ffStringency stringency, 00064 int minScore, int maxToReturn); 00065 /* Glue together mrnas in bundle as much as possible. 00066 * Updates bundle->ffList with stitched together version. */ 00067 00068 struct ssBundle *ssFindBundles(struct patSpace *ps, struct dnaSeq *cSeq, 00069 char *cName, enum ffStringency stringency, boolean avoidSelfSelf); 00070 /* Find patSpace alignments on cSeq and bundle them together. */ 00071 00072 #endif /* SUPSTITCH_H */ 00073
1.5.2