-
Notifications
You must be signed in to change notification settings - Fork 1
/
from_kent.h
49 lines (44 loc) · 1.89 KB
/
from_kent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "binRange.h"
#include "basicBed.h"
#include "bigWig.h"
#include "obscure.h"
#include "sqlNum.h"
#include "localmem.h"
#include "dystring.h"
#include "cirTree.h"
#include "sig.h"
#include "zlibFace.h"
#include "bPlusTree.h"
#include "bbiFile.h"
#include "bwgInternal.h"
/* define unitSize to be a larger storage class if your counts
* are overflowing. */
typedef unsigned int unitSize;
#define MAXCOUNT (unitSize)~0
#define MAXMESSAGE "Overflow of overlap counts. Max is %lu. Recompile with bigger unitSize or use -max option"
#define INCWOVERFLOW(countArray,x) if(countArray[x] == MAXCOUNT) {if(!doMax) errAbort(MAXMESSAGE,(unsigned long)MAXCOUNT);} else countArray[x]++
struct sectionItem
/* An item in a section of a bedGraph. */
{
bits32 start, end; /* Position in chromosome, half open. */
float val; /* Single precision value. */
};
void writeSections(struct bbiChromUsage *usageList, struct lineFile *lf,
int itemsPerSlot, struct bbiBoundsArray *bounds, int sectionCount, FILE *f,
int resTryCount, int resScales[], int resSizes[],
boolean doCompress, bits32 *retMaxSectionSize);
struct bbiSummary *bedGraphWriteReducedOnceReturnReducedTwice(struct bbiChromUsage *usageList,
int fieldCount, struct lineFile *lf, bits32 initialReduction, bits32 initialReductionCount,
int zoomIncrement, int blockSize, int itemsPerSlot, boolean doCompress,
struct lm *lm, FILE *f, bits64 *retDataStart, bits64 *retIndexStart,
struct bbiSummaryElement *totalSum);
void bedGraphToBigWig(char *inName, char *chromSizes, char *outName);
void outputCounts(unitSize *counts, char *chrom, unsigned size, FILE *f);
void bedItemOverlapCount(struct hash *chromHash, char *infile, char *outfile);
void bigWigFileCreate2(
char *inName, /* Input file in ascii wiggle format. */
struct hash *chromSizeHash, /* chrom size hash. */
char *outName);