c6b3a109267bc4a933b2d5937270c8eedd070f45
angie
  Fri Oct 12 16:52:10 2012 -0700
Feature #6336 (redistribution of samtools + tabix + KNETFILE_HOOKS patches):I made a combined, pre-patched package on github:
https://github.com/AngieHinrichs/samtabix
and modified common.mk to autodetect the /hive installation and use samtabix
preferentially to separate installations of samtools and tabix.
linefile.c is keeping some patch-specific function aliases for backwards
compatibility with tabix.

diff --git src/lib/linefile.c src/lib/linefile.c
index 91720c8..f092331 100644
--- src/lib/linefile.c
+++ src/lib/linefile.c
@@ -185,30 +185,36 @@
 struct lineFile *lineFileOnString(char *name, bool zTerm, char *s)
 /* Wrap a line file object around string in memory. This buffer
  * have zeroes written into it and be freed when the line file
  * is closed. */
 {
 struct lineFile *lf;
 AllocVar(lf);
 lf->fileName = cloneString(name);
 lf->fd = -1;
 lf->bufSize = lf->bytesInBuf = strlen(s);
 lf->zTerm = zTerm;
 lf->buf = s;
 return lf;
 }
 
+#if (defined USE_SAMTABIX || (defined USE_TABIX && !defined KNETFILE_HOOKS))
+// UCSC aliases for backwards compatibility with independently patched & linked samtools and tabix:
+#define ti_bgzf_tell bgzf_tell
+#define ti_bgzf_read bgzf_read
+#endif
+
 struct lineFile *lineFileTabixMayOpen(char *fileOrUrl, bool zTerm)
 /* Wrap a line file around a data file that has been compressed and indexed
  * by the tabix command line program.  The index file <fileOrUrl>.tbi must be
  * readable in addition to fileOrUrl. If there's a problem, warn & return NULL.
  * This works only if kent/src has been compiled with USE_TABIX=1 and linked
  * with the tabix C library. */
 {
 #ifdef USE_TABIX
 int tbiNameSize = strlen(fileOrUrl) + strlen(".tbi") + 1;
 char *tbiName = needMem(tbiNameSize);
 safef(tbiName, tbiNameSize, "%s.tbi", fileOrUrl);
 tabix_t *tabix = ti_open(fileOrUrl, tbiName);
 if (tabix == NULL)
     {
     warn("Unable to open \"%s\"", fileOrUrl);