11e45667d4e291b3038ccda729a1cdf5bcaf004a
braney
  Mon Jul 11 15:46:54 2016 -0700
incorporate htslib in kent src, remove USE_BAM, USE_SAMTABIX, USE_TABIX
defines, modify a bunch of makefiles to include kentSrc variable
pointing to top of the tree.

diff --git src/hg/hgc/bamClick.c src/hg/hgc/bamClick.c
index 2587052..b422978 100644
--- src/hg/hgc/bamClick.c
+++ src/hg/hgc/bamClick.c
@@ -1,21 +1,20 @@
 /* bamClick - handler for alignments in BAM format (produced by MAQ,
  * BWA and some other short-read alignment tools). */
 
 /* Copyright (C) 2014 The Regents of the University of California 
  * See README in this or parent directory for licensing information. */
-#ifdef USE_BAM
 
 #include "common.h"
 #include "hash.h"
 #include "hdb.h"
 #include "hgBam.h"
 #include "hgc.h"
 #include "knetUdc.h"
 #include "udc.h"
 
 
 #include "hgBam.h"
 #include "hgConfig.h"
 
 struct bamTrackData
     {
@@ -122,35 +121,31 @@
     int start = min(leftCore->pos, rightCore->pos);
     int end = max(leftCore->pos+leftLength, rightCore->pos+rightLength);
     char *itemName = bam1_qname(leftBam);
     printf("<B>Paired read name:</B> %s<BR>\n", itemName);
     printPosOnChrom(seqName, start, end, NULL, FALSE, itemName);
     puts("<P>");
     }
 showOverlap(leftBam, rightBam);
 printf("<TABLE><TR><TD valign=top><H4>Left end read</H4>\n");
 singleBamDetails(leftBam);
 printf("</TD><TD valign=top><H4>Right end read</H4>\n");
 singleBamDetails(rightBam);
 printf("</TD></TR></TABLE>\n");
 }
 
-#ifdef USE_HTS
 static int oneBam(const bam1_t *bam, void *data, bam_hdr_t *header)
-#else
-static int oneBam(const bam1_t *bam, void *data)
-#endif
 /* This is called on each record retrieved from a .bam file. */
 {
 const bam1_core_t *core = &bam->core;
 if (core->flag & BAM_FUNMAP)
     return 0;
 struct bamTrackData *btd = (struct bamTrackData *)data;
 if (sameString(bam1_qname(bam), btd->itemName))
     {
     if (btd->pairHash == NULL || (core->flag & BAM_FPAIRED) == 0)
 	{
 	if (core->pos == btd->itemStart)
 	    {
 	    printf("<B>Read name:</B> %s<BR>\n", btd->itemName);
 	    singleBamDetails(bam);
 	    }
@@ -233,16 +228,15 @@
     while ((hel = hashNext(&cookie)) != NULL)
 	{
 	bam1_t *bam = hel->val;
 	const bam1_core_t *core = &bam->core;
 	if (! (core->flag & BAM_FMUNMAP))
 	    printf("<B>Note: </B>unable to find paired end for %s "
 		   "within +-%d bases of viewing window %s<BR>\n",
 		   item, pairSearchRange, addCommasToPos(database, cartString(cart, "position")));
 	else
 	    printf("<B>Paired read name:</B> %s<BR>\n", item);
 	singleBamDetails(bam);
 	}
     }
 }
 
-#endif//def USE_BAM