8185f1465a5fb067b3be590f6ecdc26c9bb1af62 kent Tue Mar 5 10:29:41 2013 -0800 Polishing code a little with no functional change. diff --git src/inc/bbiFile.h src/inc/bbiFile.h index d050c7b..c66b23e 100644 --- src/inc/bbiFile.h +++ src/inc/bbiFile.h @@ -344,32 +344,41 @@ void bbiWriteFloat(FILE *f, float val); /* Write out floating point val to file. Mostly to convert from double... */ struct hash *bbiChromSizesFromFile(char *fileName); /* Read two column file into hash keyed by chrom. */ bits64 bbiTotalSummarySize(struct bbiSummary *list); /* Return size on disk of all summaries. */ void bbiChromUsageFree(struct bbiChromUsage **pUsage); /* free a single bbiChromUsage structure */ void bbiChromUsageFreeList(struct bbiChromUsage **pList); /* free a list of bbiChromUsage structures */ +struct bbNamedFileChunk +/* A name associated with an offset into a possibly large file. Used for extra + * indexes in bigBed files. */ + { + char *name; /* Name of chunk. */ + bits64 offset; /* Start in file. */ + bits64 size; /* Size in file. */ + }; + struct bbExIndexMaker -/* A helper structure to make indexes beyond primary one */ +/* A helper structure to make indexes beyond primary one. Just used for bigBeds */ { bits16 indexCount; /* Number of extra indexes. */ /* Kind of wish next four fields, all of which are arrays indexed * by the same thing, were a single array of a structure instead. */ bits16 *indexFields; /* array of field ids, one for each extra index. */ int *maxFieldSize; /* array of maximum sizes seen for this field. */ struct bbNamedFileChunk **chunkArrayArray; /* where we keep name/start/size triples */ bits64 *fileOffsets; /* array of file offsets where indexes starts. */ int recordCount; /* number of records in file. */ }; struct bbiChromUsage *bbiChromUsageFromBedFile(struct lineFile *lf, struct hash *chromSizesHash, struct bbExIndexMaker *eim, int *retMinDiff, double *retAveSize, bits64 *retBedCount); /* Go through bed file and collect chromosomes and statistics. If eim parameter is non-NULL * collect max field sizes there too. */