Skip to content

Commit

Permalink
Update to the latest modfication 0.5.9rc1-2. Update ChangeLog
Browse files Browse the repository at this point in the history
  • Loading branch information
Heng Li committed Jan 14, 2011
1 parent 007c3eb commit 5e30884
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 7 deletions.
49 changes: 49 additions & 0 deletions ChangeLog
@@ -1,3 +1,52 @@
------------------------------------------------------------------------
r1605 | lh3 | 2010-12-29 20:20:20 -0500 (Wed, 29 Dec 2010) | 3 lines
Changed paths:
M /branches/prog/bwa/bwtsw2_aux.c
M /branches/prog/bwa/main.c

* bwa-0.5.9rc1-2 (r1605)
* fixed a typo/bug in bwasw

------------------------------------------------------------------------
r1587 | lh3 | 2010-12-21 18:48:30 -0500 (Tue, 21 Dec 2010) | 2 lines
Changed paths:
M /branches/prog/bwa/bwa.1

a typo in the manual

------------------------------------------------------------------------
r1586 | lh3 | 2010-12-21 18:47:48 -0500 (Tue, 21 Dec 2010) | 3 lines
Changed paths:
M /branches/prog/bwa/bwape.c
M /branches/prog/bwa/bwase.c
M /branches/prog/bwa/bwtaln.c
M /branches/prog/bwa/bwtsw2_main.c
M /branches/prog/bwa/main.c
M /branches/prog/bwa/utils.c
M /branches/prog/bwa/utils.h

* bwa-0.5.9rc1-1 (r1586)
* a few patches by John

------------------------------------------------------------------------
r1562 | lh3 | 2010-12-10 01:02:06 -0500 (Fri, 10 Dec 2010) | 2 lines
Changed paths:
M /branches/prog/bwa/bwa.1
M /branches/prog/bwa/bwape.c
M /branches/prog/bwa/bwase.c

documentation on specifying @RG

------------------------------------------------------------------------
r1561 | lh3 | 2010-12-10 00:45:40 -0500 (Fri, 10 Dec 2010) | 2 lines
Changed paths:
M /branches/prog/bwa/ChangeLog
M /branches/prog/bwa/NEWS
M /branches/prog/bwa/bwa.1
M /branches/prog/bwa/main.c

Release bwa-0.5.9rc1 (r1561)

------------------------------------------------------------------------
r1560 | lh3 | 2010-12-10 00:29:08 -0500 (Fri, 10 Dec 2010) | 3 lines
Changed paths:
Expand Down
2 changes: 1 addition & 1 deletion bwa.1
Expand Up @@ -40,7 +40,7 @@ each individual read, and the
.B `samse/sampe'
command, which converts SA coordinates to chromosomal coordinate and
pairs reads (for `sampe'). The second algorithm is invoked by the
.B `dbtwsw'
.B `bwasw'
command. It works for single-end reads only.

.SH COMMANDS AND OPTIONS
Expand Down
4 changes: 3 additions & 1 deletion bwape.c
Expand Up @@ -45,6 +45,7 @@ int bwa_approx_mapQ(const bwa_seq_t *p, int mm);
void bwa_print_sam1(const bntseq_t *bns, bwa_seq_t *p, const bwa_seq_t *mate, int mode, int max_top2);
bntseq_t *bwa_open_nt(const char *prefix);
void bwa_print_sam_SQ(const bntseq_t *bns);
void bwa_print_sam_PG();

pe_opt_t *bwa_init_pe_opt()
{
Expand Down Expand Up @@ -689,6 +690,7 @@ void bwa_sai2sam_pe_core(const char *prefix, char *const fn_sa[2], char *const f

// core loop
bwa_print_sam_SQ(bns);
bwa_print_sam_PG();
while ((seqs[0] = bwa_read_seq(ks[0], 0x40000, &n_seqs, opt.mode & BWA_MODE_COMPREAD, opt.trim_qual)) != 0) {
int cnt_chg;
isize_info_t ii;
Expand Down Expand Up @@ -763,7 +765,7 @@ int bwa_sai2sam_pe(int argc, char *argv[])
case 'n': popt->n_multi = atoi(optarg); break;
case 'N': popt->N_multi = atoi(optarg); break;
case 'c': popt->ap_prior = atof(optarg); break;
case 'f': freopen(optarg, "w", stdout); break;
case 'f': xreopen(optarg, "w", stdout); break;
case 'A': popt->force_isize = 1; break;
default: return 1;
}
Expand Down
5 changes: 4 additions & 1 deletion bwase.c
Expand Up @@ -14,6 +14,8 @@
int g_log_n[256];
char *bwa_rg_line, *bwa_rg_id;

void bwa_print_sam_PG();

void bwa_aln2seq_core(int n_aln, const bwt_aln1_t *aln, bwa_seq_t *s, int set_main, int n_multi)
{
int i, cnt, best;
Expand Down Expand Up @@ -604,6 +606,7 @@ void bwa_sai2sam_se_core(const char *prefix, const char *fn_sa, const char *fn_f
if (!(opt.mode & BWA_MODE_COMPREAD)) // in color space; initialize ntpac
ntbns = bwa_open_nt(prefix);
bwa_print_sam_SQ(bns);
bwa_print_sam_PG();
// set ks
ks = bwa_open_reads(opt.mode, fn_fa);
// core loop
Expand Down Expand Up @@ -662,7 +665,7 @@ int bwa_sai2sam_se(int argc, char *argv[])
}
break;
case 'n': n_occ = atoi(optarg); break;
case 'f': freopen(optarg, "w", stdout); break;
case 'f': xreopen(optarg, "w", stdout); break;
default: return 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion bwtaln.c
Expand Up @@ -268,7 +268,7 @@ int bwa_aln(int argc, char *argv[])
case 'q': opt->trim_qual = atoi(optarg); break;
case 'c': opt->mode &= ~BWA_MODE_COMPREAD; break;
case 'N': opt->mode |= BWA_MODE_NONSTOP; opt->max_top2 = 0x7fffffff; break;
case 'f': freopen(optarg, "wb", stdout); break;
case 'f': xreopen(optarg, "wb", stdout); break;
case 'b': opt->mode |= BWA_MODE_BAM; break;
case '0': opt->mode |= BWA_MODE_BAM_SE; break;
case '1': opt->mode |= BWA_MODE_BAM_READ1; break;
Expand Down
2 changes: 1 addition & 1 deletion bwtsw2_aux.c
Expand Up @@ -290,7 +290,7 @@ static void flag_fr(bwtsw2_t *b[2])
for (i = 0; i < b[0]->n; ++i) {
bsw2hit_t *p = b[0]->hits + i;
for (j = 0; j < b[1]->n; ++j) {
bsw2hit_t *q = b[1]->hits + i;
bsw2hit_t *q = b[1]->hits + j;
if (q->beg == p->beg && q->end == p->end && q->k == p->k && q->len == p->len && q->G == p->G) {
q->flag |= 0x30000; p->flag |= 0x30000;
break;
Expand Down
3 changes: 2 additions & 1 deletion bwtsw2_main.c
Expand Up @@ -5,6 +5,7 @@
#include <math.h>
#include "bwt.h"
#include "bwtsw2.h"
#include "utils.h"

int bwa_bwtsw2(int argc, char *argv[])
{
Expand Down Expand Up @@ -32,7 +33,7 @@ int bwa_bwtsw2(int argc, char *argv[])
case 'c': opt->coef = atof(optarg); break;
case 'N': opt->t_seeds = atoi(optarg); break;
case 'H': opt->hard_clip = 1; break;
case 'f': freopen(optarg, "w", stdout);
case 'f': xreopen(optarg, "w", stdout); break;
}
}
opt->qr = opt->q + opt->r;
Expand Down
7 changes: 6 additions & 1 deletion main.c
Expand Up @@ -3,7 +3,7 @@
#include "main.h"

#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.5.9rc1 (r1561)"
#define PACKAGE_VERSION "0.5.9rc1-2 (r1605)"
#endif

static int usage()
Expand Down Expand Up @@ -31,6 +31,11 @@ static int usage()
return 1;
}

void bwa_print_sam_PG()
{
printf("@PG\tID:bwa\tPN:bwa\tVN:%s\n", PACKAGE_VERSION);
}

int main(int argc, char *argv[])
{
if (argc < 2) return usage();
Expand Down
10 changes: 10 additions & 0 deletions utils.c
Expand Up @@ -43,6 +43,16 @@ FILE *err_xopen_core(const char *func, const char *fn, const char *mode)
}
return fp;
}
FILE *err_xreopen_core(const char *func, const char *fn, const char *mode, FILE *fp)
{
if (freopen(fn, mode, fp) == 0) {
fprintf(stderr, "[%s] fail to open file '%s': ", func, fn);
perror(NULL);
fprintf(stderr, "Abort!\n");
abort();
}
return fp;
}
gzFile err_xzopen_core(const char *func, const char *fn, const char *mode)
{
gzFile fp;
Expand Down
2 changes: 2 additions & 0 deletions utils.h
Expand Up @@ -33,6 +33,7 @@

#define err_fatal_simple(msg) err_fatal_simple_core(__func__, msg)
#define xopen(fn, mode) err_xopen_core(__func__, fn, mode)
#define xreopen(fn, mode, fp) err_xreopen_core(__func__, fn, mode, fp)
#define xzopen(fn, mode) err_xzopen_core(__func__, fn, mode)
#define xassert(cond, msg) if ((cond) == 0) err_fatal_simple_core(__func__, msg)

Expand All @@ -43,6 +44,7 @@ extern "C" {
void err_fatal(const char *header, const char *fmt, ...);
void err_fatal_simple_core(const char *func, const char *msg);
FILE *err_xopen_core(const char *func, const char *fn, const char *mode);
FILE *err_xreopen_core(const char *func, const char *fn, const char *mode, FILE *fp);
gzFile err_xzopen_core(const char *func, const char *fn, const char *mode);

#ifdef __cplusplus
Expand Down

0 comments on commit 5e30884

Please sign in to comment.