Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cram/cram.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CRAM_ALL_H
#define CRAM_ALL_H

#include "cram/cram_samtools.h"
#include "header.h"
#include "cram_samtools.h"
#include "../header.h"
#include "cram_structs.h"
#include "cram_io.h"
#include "cram_encode.h"
Expand All @@ -56,6 +56,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// This contains duplicated portions from cram_io.h and cram_structs.h,
// so we want to ensure that the prototypes match.
#include "htslib/cram.h"
#include "../htslib/cram.h"

#endif
2 changes: 1 addition & 1 deletion cram/cram_codecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>
#include <errno.h>

#include "cram/cram.h"
#include "cram.h"

/*
* ---------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions cram/cram_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>
#include <inttypes.h>

#include "cram/cram.h"
#include "cram/os.h"
#include "htslib/hts.h"
#include "cram.h"
#include "os.h"
#include "../htslib/hts.h"

//Whether CIGAR has just M or uses = and X to indicate match and mismatch
//#define USE_X
Expand Down
10 changes: 5 additions & 5 deletions cram/cram_encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <math.h>
#include <inttypes.h>

#include "cram/cram.h"
#include "cram/os.h"
#include "sam_internal.h" // for nibble2base
#include "htslib/hts.h"
#include "htslib/hts_endian.h"
#include "cram.h"
#include "os.h"
#include "../sam_internal.h" // for nibble2base
#include "../htslib/hts.h"
#include "../htslib/hts_endian.h"

KHASH_MAP_INIT_STR(m_s2u64, uint64_t)

Expand Down
4 changes: 2 additions & 2 deletions cram/cram_external.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define HTS_BUILDING_LIBRARY // Enables HTSLIB_EXPORT, see htslib/hts_defs.h
#include <config.h>

#include "htslib/hfile.h"
#include "cram/cram.h"
#include "../htslib/hfile.h"
#include "cram.h"

/*
*-----------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions cram/cram_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/stat.h>
#include <math.h>

#include "htslib/bgzf.h"
#include "htslib/hfile.h"
#include "hts_internal.h"
#include "cram/cram.h"
#include "cram/os.h"
#include "../htslib/bgzf.h"
#include "../htslib/hfile.h"
#include "../hts_internal.h"
#include "cram.h"
#include "os.h"

#if 0
static void dump_index_(cram_index *e, int level) {
Expand Down
20 changes: 10 additions & 10 deletions cram/cram_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef HAVE_LZMA_H
#include <lzma.h>
#else
#include "os/lzma_stub.h"
#include "../os/lzma_stub.h"
#endif
#endif
#include <sys/types.h>
Expand All @@ -70,11 +70,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define crc32(a,b,c) libdeflate_crc32((a),(b),(c))
#endif

#include "cram/cram.h"
#include "cram/os.h"
#include "htslib/hts.h"
#include "cram/open_trace_file.h"
#include "cram/rANS_static.h"
#include "cram.h"
#include "os.h"
#include "../htslib/hts.h"
#include "open_trace_file.h"
#include "rANS_static.h"

//#define REF_DEBUG

Expand All @@ -87,10 +87,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define RP(...)
#endif

#include "htslib/hfile.h"
#include "htslib/bgzf.h"
#include "htslib/faidx.h"
#include "hts_internal.h"
#include "../htslib/hfile.h"
#include "../htslib/bgzf.h"
#include "../htslib/faidx.h"
#include "../hts_internal.h"

#ifndef PATH_MAX
#define PATH_MAX FILENAME_MAX
Expand Down
3 changes: 2 additions & 1 deletion cram/cram_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CRAM_IO_H

#include <stdint.h>
#include <cram/misc.h>

#include "misc.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions cram/cram_samtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h>
#include <stdlib.h>

#include "cram/cram.h"
#include "htslib/sam.h"
#include "cram.h"
#include "../htslib/sam.h"
#include "../sam_internal.h"

/*---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cram/cram_samtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#define bam_reg2bin(beg,end) hts_reg2bin((beg),(end),14,5)

#include "htslib/sam.h"
#include "../htslib/sam.h"

enum cigar_op {
BAM_CMATCH_=BAM_CMATCH,
Expand Down
4 changes: 2 additions & 2 deletions cram/cram_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <math.h>
#include <inttypes.h>

#include "cram/cram.h"
#include "cram/os.h"
#include "cram.h"
#include "os.h"

cram_stats *cram_stats_create(void) {
return calloc(1, sizeof(cram_stats));
Expand Down
10 changes: 5 additions & 5 deletions cram/cram_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>
#include <sys/types.h>

#include "htslib/thread_pool.h"
#include "htslib/cram.h"
#include "cram/string_alloc.h"
#include "cram/mFILE.h"
#include "htslib/khash.h"
#include "../htslib/thread_pool.h"
#include "../htslib/cram.h"
#include "string_alloc.h"
#include "mFILE.h"
#include "../htslib/khash.h"

#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions cram/mFILE.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <unistd.h>
#include <stdarg.h>

#include "htslib/hts_log.h"
#include "cram/os.h"
#include "cram/mFILE.h"
#include "../htslib/hts_log.h"
#include "os.h"
#include "mFILE.h"

#ifdef HAVE_MMAP
#include <sys/mman.h>
Expand Down
13 changes: 7 additions & 6 deletions cram/open_trace_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "cram/os.h"

#include "os.h"
#ifndef PATH_MAX
# define PATH_MAX 1024
#endif

#include "cram/open_trace_file.h"
#include "cram/misc.h"
#include "htslib/hfile.h"
#include "htslib/hts_log.h"
#include "htslib/hts.h"
#include "open_trace_file.h"
#include "misc.h"
#include "../htslib/hfile.h"
#include "../htslib/hts_log.h"
#include "../htslib/hts.h"

/*
* Returns whether the path refers to a regular file.
Expand Down
2 changes: 1 addition & 1 deletion cram/open_trace_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef OPEN_TRACE_FILE_H
#define OPEN_TRACE_FILE_H

#include "cram/mFILE.h"
#include "mFILE.h"

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 2 additions & 1 deletion cram/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <limits.h>
#include <stdint.h>
#include "htslib/hts_endian.h"

#include "../htslib/hts_endian.h"

#ifdef __cplusplus
extern "C" {
Expand Down
4 changes: 2 additions & 2 deletions cram/pooled_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdio.h>
#include <stdint.h>

#include "cram/pooled_alloc.h"
#include "cram/misc.h"
#include "pooled_alloc.h"
#include "misc.h"

//#define DISABLE_POOLED_ALLOC
//#define TEST_MAIN
Expand Down
4 changes: 2 additions & 2 deletions cram/rANS_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
#include <sys/time.h>
#include <limits.h>

#include "cram/rANS_static.h"
#include "cram/rANS_byte.h"
#include "rANS_static.h"
#include "rANS_byte.h"

#define TF_SHIFT 12
#define TOTFREQ (1<<TF_SHIFT)
Expand Down
2 changes: 1 addition & 1 deletion cram/string_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#include <stdio.h>

#include "cram/string_alloc.h"
#include "string_alloc.h"

#define MIN_STR_SIZE 1024

Expand Down
5 changes: 3 additions & 2 deletions htslib/khash.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ int main() {
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <htslib/kstring.h>
#include <htslib/kroundup.h>

#include "kstring.h"
#include "kroundup.h"

/* compiler specific configuration */

Expand Down
2 changes: 1 addition & 1 deletion htslib/khash_str2int.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. */
#ifndef HTSLIB_KHASH_STR2INT_H
#define HTSLIB_KHASH_STR2INT_H

#include <htslib/khash.h>
#include "khash.h"

KHASH_MAP_INIT_STR(str2int, int)

Expand Down
2 changes: 1 addition & 1 deletion test/fieldarith.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DEALINGS IN THE SOFTWARE. */

#include <stdio.h>

#include "htslib/sam.h"
#include "../htslib/sam.h"

int ntests = 0;
int nfailures = 0;
Expand Down
9 changes: 5 additions & 4 deletions test/fuzz/hts_open_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ DEALINGS IN THE SOFTWARE. */
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "htslib/hfile.h"
#include "htslib/hts.h"
#include "htslib/sam.h"
#include "htslib/vcf.h"

#include "../../htslib/hfile.h"
#include "../../htslib/hts.h"
#include "../../htslib/sam.h"
#include "../../htslib/vcf.h"

static void hts_close_or_abort(htsFile* file) {
if (hts_close(file) != 0) {
Expand Down
6 changes: 3 additions & 3 deletions test/hfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ DEALINGS IN THE SOFTWARE. */

#include <sys/stat.h>

#include "htslib/hfile.h"
#include "htslib/hts_defs.h"
#include "htslib/kstring.h"
#include "../htslib/hfile.h"
#include "../htslib/hts_defs.h"
#include "../htslib/kstring.h"

void HTS_NORETURN fail(const char *format, ...)
{
Expand Down
3 changes: 2 additions & 1 deletion test/hts_endian.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ DEALINGS IN THE SOFTWARE. */
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include "htslib/hts_endian.h"

#include "../htslib/hts_endian.h"

typedef struct {
uint8_t u8[2];
Expand Down
5 changes: 3 additions & 2 deletions test/pileup.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ samtools mpileup -B -Q 0 in.bam | perl -lane \
#include <errno.h>
#include <ctype.h>
#include <unistd.h>
#include "htslib/sam.h"
#include "htslib/kstring.h"

#include "../htslib/sam.h"
#include "../htslib/kstring.h"

#define MIN(a,b) ((a)<(b)?(a):(b))

Expand Down
10 changes: 5 additions & 5 deletions test/sam.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ DEALINGS IN THE SOFTWARE. */
#include <unistd.h>

// Suppress message for faidx_fetch_nseq(), which we're intentionally testing
#include "htslib/hts_defs.h"
#include "../htslib/hts_defs.h"
#undef HTS_DEPRECATED
#define HTS_DEPRECATED(message)

#include "htslib/sam.h"
#include "htslib/faidx.h"
#include "htslib/khash.h"
#include "htslib/hts_log.h"
#include "../htslib/sam.h"
#include "../htslib/faidx.h"
#include "../htslib/khash.h"
#include "../htslib/hts_log.h"

KHASH_SET_INIT_STR(keep)
typedef khash_t(keep) *keephash_t;
Expand Down
3 changes: 2 additions & 1 deletion test/test-bcf-sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
#include <stdio.h>
#include <stdarg.h>
#include <inttypes.h>
#include <htslib/synced_bcf_reader.h>

#include "../htslib/synced_bcf_reader.h"

void error(const char *format, ...)
{
Expand Down
4 changes: 3 additions & 1 deletion test/test-bcf-translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
*/

#include <config.h>

#include <stdio.h>
#include <htslib/vcf.h>

#include "../htslib/vcf.h"

void error(const char *format, ...)
{
Expand Down
Loading