inc/gdf.h

Go to the documentation of this file.
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 /* gdf - Intronerator Gene Description File. */
00007 
00008 #ifndef GDF_H
00009 #define GDF_H
00010 
00011 #ifndef DNAUTIL_H
00012 #include "dnautil.h"
00013 #endif
00014 
00015 struct gdfDataPoint
00016 /* This stores data at each exon/intron boundary. */
00017     {
00018     int start;
00019     };
00020 
00021 struct gdfGene
00022 /* One structure of these for each gene (each isoform of each gene
00023  * actually. */
00024     {
00025     struct gdfGene *next;
00026     char *name;
00027     int dataCount;
00028     struct gdfDataPoint *dataPoints;
00029     char strand;
00030     UBYTE chromIx;
00031     };
00032 
00033 struct gdfGene *newGdfGene(char *name, int nameSize, int exonCount, char strand, UBYTE chromIx);
00034 /* Return a new gene. */
00035 
00036 void gdfFreeGene(struct gdfGene *gene);
00037 /* Free a gene. */
00038 
00039 void gdfFreeGeneList(struct gdfGene **pList);
00040 /* Free a whole list of genes. */
00041 
00042 struct gdfGene *gdfReadOneGene(FILE *f);
00043 /* Read one entry from a Gdf file.  Assumes that the file pointer
00044  * is in the right place. */
00045 
00046 void gdfGeneExtents(struct gdfGene *gene, long *pMin, long *pMax);
00047 /* Figure out first and last base in gene. */
00048 
00049 void gdfOffsetGene(struct gdfGene *gene, int offset);
00050 /* Add offset to each point in gene */
00051 
00052 void gdfRcGene(struct gdfGene *gene, int size);
00053 /* Flip gene to other strand. Assumes dataPoints are already
00054  * moved into range from 0-size */
00055 
00056 void gdfUpcExons(struct gdfGene *gene, int geneOffset, DNA *dna, int dnaSize, int dnaOffset);
00057 /* Uppercase exons in DNA. */
00058 
00059 
00060 #endif /* GDF_H */
00061 

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