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/inc/linefile.h src/inc/linefile.h index 8594aeb..f837014 100644 --- src/inc/linefile.h +++ src/inc/linefile.h @@ -1,41 +1,35 @@ /* lineFile - stuff to rapidly read text files and parse them into * lines. * * This file is copyright 2002 Jim Kent, but license is hereby * granted for all use - public, private or commercial. */ #ifndef LINEFILE_H #define LINEFILE_H #include "dystring.h" #include "udc.h" -#ifdef USE_TABIX -#ifdef USE_HTS #define tabix_t tbx_t #define ti_iter_t hts_itr_t #define ti_open hts_open #define ti_index_load tbx_index_load #define ti_close tbx_destroy #define ti_get_tid tbx_name2id #define ti_queryi tbx_itr_queryi #define ti_iter_destroy tbx_itr_destroy -#else -#include "tabix.h" -#endif -#endif #define LF_BOGUS_FILE_PREFIX "somefile." enum nlType { nlt_undet, /* undetermined */ nlt_unix, /* lf */ nlt_dos, /* crlf */ nlt_mac /* cr */ }; struct metaOutput /* struct to store list of file handles to output meta data to * meta data is text after # */ { struct metaOutput *next; /* next file handle */ @@ -52,41 +46,34 @@ int bufSize; /* Size of buffer. */ off_t bufOffsetInFile; /* Offset in file of first buffer byte. */ int bytesInBuf; /* Bytes read into buffer. */ int reserved; /* Reserved (zero for now). */ int lineIx; /* Current line. */ int lineStart; /* Offset of line in buffer. */ int lineEnd; /* End of line in buffer. */ bool zTerm; /* Replace '\n' with zero? */ enum nlType nlType; /* type of line endings: dos, unix, mac or undet */ bool reuse; /* Set if reusing input. */ char *buf; /* Buffer. */ struct pipeline *pl; /* pipeline if reading compressed */ struct metaOutput *metaOutput; /* list of FILE handles to write metaData to */ bool isMetaUnique; /* if set, do not repeat comments in output */ struct hash *metaLines; /* save lines to suppress repetition */ -#ifdef USE_TABIX -#ifdef USE_HTS void *htsFile; /* HTS file handle */ void *tabix; /* A tabix-compressed file and its binary index file (.tbi) */ void *tabixIter; /* An iterator to get decompressed indexed lines of text */ void *kline; /* A buffer used for reading from htsfile. */ -#else - tabix_t *tabix; /* A tabix-compressed file and its binary index file (.tbi) */ - ti_iter_t tabixIter; /* An iterator to get decompressed indexed lines of text */ -#endif -#endif struct udcFile *udcFile; /* udc file if using caching */ struct dyString *fullLine; // Filled with full line when a lineFileNextFull is called struct dyString *rawLines; // Filled with raw lines used to create the full line boolean fullLineReuse; // If TRUE, next call to lineFileNextFull will get // already built fullLine void *dataForCallBack; // ptr to data needed for callbacks void(*checkSupport)(struct lineFile *lf, char *where); // check if operation supported boolean(*nextCallBack)(struct lineFile *lf, char **retStart, int *retSize); // next line callback void(*closeCallBack)(struct lineFile *lf); // close callback }; char *getFileNameFromHdrSig(char *m); /* Check if header has signature of supported compression stream, and return a phoney filename for it, or NULL if no sig found. */