From e455deeacf43b3a8fa0e7b2e1b06e6198000a7a8 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Tue, 23 Jan 2024 16:10:49 +0100 Subject: [PATCH] Fix exception to distance constraints in `dprog.c` --- dprog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dprog.c b/dprog.c index e30598a..cc7a284 100644 --- a/dprog.c +++ b/dprog.c @@ -43,12 +43,12 @@ int dprog(struct _node *nod, int nn, struct _training *tinf, int flag) { /* Set up distance constraints for making connections, */ /* but make exceptions for giant ORFS. */ if(i < MAX_NODE_DIST) min = 0; else min = i-MAX_NODE_DIST; - if(nod[i].strand == -1 && nod[i].type != STOP && nod[min].ndx >= + if(nod[i].strand == -1 && nod[i].type != STOP && nod[min].ndx > nod[i].stop_val) - while(min >= 0 && nod[i].ndx != nod[i].stop_val) min--; - if(nod[i].strand == 1 && nod[i].type == STOP && nod[min].ndx >= + while(min >= 0 && nod[min].ndx != nod[i].stop_val) min--; + if(nod[i].strand == 1 && nod[i].type == STOP && nod[min].ndx > nod[i].stop_val) - while(min >= 0 && nod[i].ndx != nod[i].stop_val) min--; + while(min >= 0 && nod[min].ndx != nod[i].stop_val) min--; if(min < MAX_NODE_DIST) min = 0; else min = min-MAX_NODE_DIST; for(j = min; j < i; j++) {