src/inc/metaWig.h 1.1
1.1 2010/06/03 16:51:56 kent
Moving metaWig stuff from wigCorrelate to library.
Index: src/inc/metaWig.h
===================================================================
RCS file: src/inc/metaWig.h
diff -N src/inc/metaWig.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/inc/metaWig.h 3 Jun 2010 16:51:56 -0000 1.1
@@ -0,0 +1,43 @@
+/* Interface class so that wigs and bigWigs look similar */
+
+#ifndef METAWIG_H
+#define METAWIG_H
+
+#ifndef BWGINTERNAL_H
+#include "bwgInternal.h"
+#endif
+
+enum metaWigType
+ {
+ mwtSections,
+ mwtBigWig,
+ };
+
+struct metaWig
+/* Interface class so that wigs and bigWigs look similar */
+ {
+ struct metaWig *next;
+ enum metaWigType type;
+
+ /* For type mwtSections */
+ struct bwgSection *sectionList;
+ struct hash *chromHash; /* Hash value is first section in that chrom */
+
+ /* For type mwtBigWig */
+ struct bbiFile *bwf;
+ };
+
+struct metaWig *metaWigOpen(char *fileName, struct lm *lm);
+/* Wrap self around file. Read all of it if it's wig, just header if bigWig. */
+
+void metaWigClose(struct metaWig **pMw);
+/* Close up metaWig file */
+
+struct slName *metaWigChromList(struct metaWig *mw);
+/* Return list of chromosomes covered in wig. */
+
+struct bbiInterval *metaIntervalsForChrom(struct metaWig *mw, char *chrom, struct lm *lm);
+/* Get sorted list of all intervals with data on chromosome. */
+
+#endif /* METAWIG_H */
+