a7ae401a6e1af3910b508aaa73a235b3cef426f9 kent Sun Apr 7 12:20:15 2013 -0700 Adding some more bed3 routines - for the minimalists. diff --git src/inc/basicBed.h src/inc/basicBed.h index c8c4bd8..7c2e3ec 100644 --- src/inc/basicBed.h +++ src/inc/basicBed.h @@ -42,30 +42,42 @@ #define BB_MAX_CHROM_STRING 32 /* Maximum string length for chromosome length */ struct bed3 /* Browser extensible data - first three fields */ { struct bed3 *next; /* Next in singly linked list. */ char *chrom; /* Human chromosome or FPC contig */ unsigned chromStart; /* Start position in chromosome */ unsigned chromEnd; /* End position in chromosome */ }; struct bed3 *bed3New(char *chrom, int start, int end); /* Make new bed3. */ +void bed3Free(struct bed3 **pBed); +/* Free up bed3 */ + +void bed3FreeList(struct bed3 **pList); +/* Free a list of dynamically allocated bed3's */ + +struct bed3 *bed3LoadAll(char *fileName); +/* Load three columns from file as bed3. */ + +long long bed3TotalSize(struct bed3 *bedList); +/* Return sum of chromEnd-chromStart. */ + struct bed4 /* Browser extensible data - first four fields */ { struct bed4 *next; /* Next in singly linked list. */ char *chrom; /* Human chromosome or FPC contig */ unsigned chromStart; /* Start position in chromosome */ unsigned chromEnd; /* End position in chromosome */ char *name; /* Name of item */ }; void bedStaticLoad(char **row, struct bed *ret); /* Load a row from bed table into ret. The contents of ret will * be replaced at the next call to this function. */