src/hg/encode/validateFiles/validateFiles.c 1.38

1.38 2010/03/31 18:35:24 braney
make BAM testing conditional on USE_BAM
Index: src/hg/encode/validateFiles/validateFiles.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/validateFiles/validateFiles.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -b -B -U 4 -r1.37 -r1.38
--- src/hg/encode/validateFiles/validateFiles.c	29 Mar 2010 20:25:45 -0000	1.37
+++ src/hg/encode/validateFiles/validateFiles.c	31 Mar 2010 18:35:24 -0000	1.38
@@ -5,9 +5,11 @@
 #include "chromInfo.h"
 #include "jksql.h"
 #include "twoBit.h"
 #include "dnaseq.h"
+#ifdef USE_BAM
 #include "bamFile.h"
+#endif
 #include "bbiFile.h"
 #include "bigWig.h"
 
 static char const rcsid[] = "$Id$";
@@ -1060,15 +1062,8 @@
     }
 return errs;
 }
 
-int parseBamRecord(const bam1_t *bam, void *data)
-/* bam_fetch() calls this on each bam alignment retrieved.  Translate each bam 
- * into a linkedFeatures item, and add it to tg->items. */
-{
-return 0;
-}
-
 int validateBigWig(struct lineFile *lf, char *file)
 {
 if (chrHash == NULL)
     errAbort("bigWig validation requires the -chromInfo or -chromDb option\n");
@@ -1115,8 +1110,16 @@
 
 return errs;
 }
 
+#ifdef USE_BAM
+int parseBamRecord(const bam1_t *bam, void *data)
+/* bam_fetch() calls this on each bam alignment retrieved.  Translate each bam 
+ * into a linkedFeatures item, and add it to tg->items. */
+{
+return 0;
+}
+
 int validateBAM(struct lineFile *lf, char *file)
 {
 if (chrHash == NULL)
     errAbort("BAM validation requires the -chromInfo or -chromDb option\n");
@@ -1163,8 +1166,9 @@
     errAbort("Aborting... %d errors found in BAM file\n", errs);
 
 return errs;
 }
+#endif
 
 void validateFiles(int (*validate)(struct lineFile *lf, char *file), int numFiles, char *files[])
 /* validateFile - validate format of different track input files. */
 {
@@ -1274,9 +1278,11 @@
 hashAdd(funcs, "broadPeak",      &validateBroadPeak);
 hashAdd(funcs, "narrowPeak",     &validateNarrowPeak);
 hashAdd(funcs, "gappedPeak",     &validateGappedPeak);
 hashAdd(funcs, "bedGraph",       &validateBedGraph);
+#ifdef USE_BAM
 hashAdd(funcs, "BAM",            &validateBAM);
+#endif
 hashAdd(funcs, "bigWig",         &validateBigWig);
 //hashAdd(funcs, "test", &testFunc);
 if (!(func = hashFindVal(funcs, type)))
     errAbort("Cannot validate %s type files\n", type);