ad3a176457ad1d21a0fedc47f349ec3484e751f1 angie Fri Feb 9 16:27:51 2018 -0800 Cleaning up some old ugliness about the size parameter to isAllDna and isAllNt. hgc's printSnpAlignment code that parsed snpNNN.fa was using lineSize as length but lineSize is length+1. Then isAllDna was written with "i<size-1" as the loop test instead of "i < size". I didn't fix that properly when I separated out isAllNt from isAllDna. Later, I (re?)discovered that isAllNt needed length+1 as its size and just added some FIXME comments. Thanks Brian R for prodding me to actually fix it. refs #20895 diff --git src/lib/iupac.c src/lib/iupac.c index 9289d51..1fe9d44 100644 --- src/lib/iupac.c +++ src/lib/iupac.c @@ -94,49 +94,36 @@ { char c; while ((c = *in++) != 0) { c = tolower(c); if (isIupacLower(c)) *out++ = c; } *out++ = 0; } boolean anyIupac(char *s) /* Return TRUE if there are any IUPAC ambiguity codes in s */ { dnaUtilOpen(); -int c; +char c; while ((c = *s++) != 0) { - switch (c) - { - case 'r': - case 'y': - case 's': - case 'w': - case 'k': - case 'm': - case 'b': - case 'd': - case 'h': - case 'v': - case 'n': + if (isIupacAmbiguous(c)) return TRUE; } - } return FALSE; } char iupacComplementBaseLower(char iupac) /* Return IUPAC complement for a single base */ { switch (iupac) { case 'a': return 't'; case 'c': return 'g'; case 'g': return 'c'; case 't':