From e2d0c996e9e8ad6fd2eb5cc161d7d4945babec63 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Thu, 10 Apr 2014 18:03:28 -0400 Subject: [PATCH] layout-477: output unit score, not the raw score --- bwamem_extra.c | 3 ++- main.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bwamem_extra.c b/bwamem_extra.c index 157026c..bc841dd 100644 --- a/bwamem_extra.c +++ b/bwamem_extra.c @@ -103,7 +103,8 @@ void mem_reg2ovlp(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, kputs(bns->anns[rid].name, &str); kputc('\t', &str); kputw(bns->anns[rid].len, &str); kputc('\t', &str); kputw(pos, &str); kputc('\t', &str); kputw(pos + (re - rb), &str); kputc('\t', &str); - kputw(p->truesc, &str); kputc('\n', &str); + ksprintf(&str, "%.3f", (double)p->truesc / opt->a / (qe - qb > re - rb? qe - qb : re - rb)); + kputc('\n', &str); } s->sam = str.s; } diff --git a/main.c b/main.c index e044844..2993fc0 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,7 @@ #include "utils.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.7.8+dev-r471" +#define PACKAGE_VERSION "0.7.8+layout-r477" #endif int bwa_fa2pac(int argc, char *argv[]);