From 2020700130a69c994b17e80d8fa0eb7e38fba790 Mon Sep 17 00:00:00 2001 From: "Tim Triche, Jr" Date: Mon, 6 Feb 2017 00:32:46 -0800 Subject: [PATCH] biscuit asm fixes I'll be damned if I'm 100% sure, but it seems that the assertion of unit width only applies to the epistate number (1 or 2) and the Waston/Crick strand (+/-), whereas cg and snp are fields 5 and 7 (4 and 6 in 0-based indexing) are the correct ones for that. At least, I think that's what's supposed to happen here. It does compile and run without issue, although with the epireads I feed it, no output is produced. --- src/asm_pairwise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asm_pairwise.c b/src/asm_pairwise.c index 6fd6536..914f65e 100644 --- a/src/asm_pairwise.c +++ b/src/asm_pairwise.c @@ -121,9 +121,9 @@ int main_asm(int argc, char *argv[]) { memset(cross, 0, 25*sizeof(int)); } + assert(strlen(in->fields[2]) == 1); assert(strlen(in->fields[3]) == 1); - assert(strlen(in->fields[4]) == 1); - unsigned char _snp = in->fields[3][0]; + unsigned char _snp = in->fields[6][0]; unsigned char _cg = in->fields[4][0]; cross[nt256char_to_nt256int8_table[_snp]*5 + nt256char_to_nt256int8_table[_cg]]++;