56e6b83f725ff84cb71c0ce66aca02a5e1f519c8
kent
  Sun Mar 20 13:23:34 2011 -0700
Adding utility to calculate average bigWig value for a bed file.
diff --git src/inc/basicBed.h src/inc/basicBed.h
index a2e636c..69efc8f 100644
--- src/inc/basicBed.h
+++ src/inc/basicBed.h
@@ -153,30 +153,34 @@
 struct bed *bedLoadN(char *row[], int wordCount);
 /* Convert a row of strings to a bed. */
 
 struct bed *bedLoadNAllChrom(char *fileName, int numFields, char* chrom);
 /* Load bed entries from a tab-separated file that have the given chrom.
  * Dispose of this with bedFreeList(). */
 
 struct bed *bedLoadNAll(char *fileName, int numFields);
 /* Load all bed from a tab-separated file.
  * Dispose of this with bedFreeList(). */
 
 struct bed *bedLoadAll(char *fileName);
 /* Determines how many fields are in a bedFile and load all beds from
  * a tab-separated file.  Dispose of this with bedFreeList(). */
 
+void bedLoadAllReturnFieldCount(char *fileName, struct bed **retList, int *retFieldCount);
+/* Load bed of unknown size and return number of fields as well as list of bed items.
+ * Ensures that all lines in bed file have same field count. */
+
 void bedOutputN(struct bed *el, int wordCount, FILE *f, char sep, char lastSep);
 /* Write a bed of wordCount fields. */
 
 void bedOutputNitemRgb(struct bed *el, int wordCount, FILE *f,
 	char sep, char lastSep);
 /* Write a bed of wordCount fields, interpret column 9 as RGB. */
 
 #define bedTabOutNitemRgb(el,wordCount, f) bedOutputNitemRgb(el,wordCount,f,'\t','\n')
 /* Print out bed as a line in a tab-separated file. Interpret
    column 9 as RGB */
 
 #define bedTabOutN(el,wordCount, f) bedOutputN(el,wordCount,f,'\t','\n')
 /* Print out bed as a line in a tab-separated file. */
 
 #define bedCommaOutN(el,wordCount, f) bedOutputN(el,wordCount,f,',',',')