From 6726294c78d2260bd74d58bc34f0dadabc9fa51b Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sun, 22 Mar 2009 17:44:59 +0000 Subject: [PATCH] Removed compilation errors and added new implementation of ecoComplementChar git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/branches/eric-test@194 60f365c0-8329-0410-b2a4-ec073aeeaa1d --- src/ecoprimer.c | 1 + src/libecoprimer/hashsequence.c | 7 +------ src/libecoprimer/taxstats.c | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ecoprimer.c b/src/ecoprimer.c index d63c211..ac3cda8 100644 --- a/src/ecoprimer.c +++ b/src/ecoprimer.c @@ -536,6 +536,7 @@ int main(int argc, char **argv) /*TR: Added*/ pairs = buildPrimerPairs(seqdb, seqdbsize, primers, &options); + // setoktaxforspecificity (&pairs); diff --git a/src/libecoprimer/hashsequence.c b/src/libecoprimer/hashsequence.c index 1b2033a..af89025 100644 --- a/src/libecoprimer/hashsequence.c +++ b/src/libecoprimer/hashsequence.c @@ -203,11 +203,6 @@ uint32_t ecoFindWord(pwordcount_t table,word_t word) char ecoComplementChar(char base) { - switch(base){ - case 'A': return T; - case 'C': return G; - case 'G': return C; - case 'T': return A; - } + return (base < 4)? !base & 3: 4; } diff --git a/src/libecoprimer/taxstats.c b/src/libecoprimer/taxstats.c index c058c69..60ed55c 100644 --- a/src/libecoprimer/taxstats.c +++ b/src/libecoprimer/taxstats.c @@ -149,7 +149,7 @@ static int cmpamp(const void *ampf1, const void* ampf2) } } - for (i = 0; i < pampf1->length; i++, j += incr;) + for (i = 0; i < pampf1->length; i++, j += incr) { cd1 = pampf1->amplifia[i]; if (incr == -1) @@ -157,8 +157,8 @@ static int cmpamp(const void *ampf1, const void* ampf2) else cd2 = pampf2->amplifia[j]; - if (cd1 < cd2) (chd)? return 1: return -1; - if (cd2 < cd1) (chd)? return -1: return 1; + if (cd1 < cd2) return chd ? 1: -1; + if (cd2 < cd1) return chd ? -1: 1; } return 0; }