+
Skip to content

Minor changes to allow compilation under FreeBSD #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Closed
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CC= gcc
CC= cc
#CC= clang --analyze
CFLAGS= -g -Wall -Wno-unused-function -O2
WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS
Expand Down
4 changes: 2 additions & 2 deletions bwa.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ uint32_t *bwa_gen_cigar2(const int8_t mat[25], int o_del, int e_del, int o_ins,
max_del = (int)((double)(((l_query+1)>>1) * mat[0] - o_del) / e_del + 1.);
max_gap = max_ins > max_del? max_ins : max_del;
max_gap = max_gap > 1? max_gap : 1;
w = (max_gap + abs(rlen - l_query) + 1) >> 1;
w = (max_gap + llabs(rlen - l_query) + 1) >> 1;
w = w < w_? w : w_;
min_w = abs(rlen - l_query) + 3;
min_w = llabs(rlen - l_query) + 3;
w = w > min_w? w : min_w;
// NW alignment
if (bwa_verbose >= 4) {
Expand Down
2 changes: 1 addition & 1 deletion bwase.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ bwa_cigar_t *bwa_refine_gapped_core(bwtint_t l_pac, const ubyte_t *pacseq, int l
assert(re <= l_pac);
rseq = bns_get_seq(l_pac, pacseq, rb, re, &rlen);
assert(re - rb == rlen);
ksw_global(len, seq, rlen, rseq, 5, mat, 5, 1, SW_BW > abs(rlen - len) * 1.5? SW_BW : abs(rlen - len) * 1.5, n_cigar, &cigar32);
ksw_global(len, seq, rlen, rseq, 5, mat, 5, 1, SW_BW > llabs(rlen - len) * 1.5? SW_BW : llabs(rlen - len) * 1.5, n_cigar, &cigar32);
assert(*n_cigar > 0);
if ((cigar32[*n_cigar - 1]&0xf) == 1) cigar32[*n_cigar - 1] = (cigar32[*n_cigar - 1]>>4<<4) | 3; // change endding ins to soft clipping
if ((cigar32[0]&0xf) == 1) cigar32[0] = (cigar32[0]>>4<<4) | 3; // change beginning ins to soft clipping
Expand Down
1 change: 1 addition & 0 deletions bwt_lite.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef BWT_LITE_H_
#define BWT_LITE_H_

#include <sys/types.h>
#include <stdint.h>

typedef struct {
Expand Down
1 change: 1 addition & 0 deletions bwtgap.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef BWTGAP_H_
#define BWTGAP_H_

#include <sys/types.h>
#include "bwt.h"
#include "bwtaln.h"

Expand Down
2 changes: 1 addition & 1 deletion bwtsw2_pair.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void bsw2_pair(const bsw2opt_t *opt, int64_t l_pac, const uint8_t *pac, int n, b
double diff;
G[0] = hits[i]->hits[0].G + a[1].G;
G[1] = hits[i+1]->hits[0].G + a[0].G;
diff = fabs(G[0] - G[1]) / (opt->a + opt->b) / ((hits[i]->hits[0].len + a[1].len + hits[i+1]->hits[0].len + a[0].len) / 2.);
diff = abs(G[0] - G[1]) / (opt->a + opt->b) / ((hits[i]->hits[0].len + a[1].len + hits[i+1]->hits[0].len + a[0].len) / 2.);
if (diff > 0.05) a[G[0] > G[1]? 0 : 1].G = 0;
}
if (a[0].G == 0 || a[1].G == 0) { // one proper pair only
Expand Down
1 change: 1 addition & 0 deletions kthread.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <limits.h>
#include <stdint.h>

/************
* kt_for() *
Expand Down
1 change: 1 addition & 0 deletions maxk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <getopt.h>
#include <unistd.h>
#include "bwa.h"
#include "bwamem.h"
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载