From 67643e998da81ef8a46f3c7922ed6e59cf3dd544 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sat, 28 Jan 2023 22:10:21 +0100 Subject: [PATCH] Fix indexing error for reverse strand in `calc_orf_gc` --- node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node.c b/node.c index 7438dfb..075fef7 100644 --- a/node.c +++ b/node.c @@ -552,7 +552,7 @@ void calc_orf_gc(unsigned char *seq, unsigned char *rseq, int slen, struct is_gc(seq, nod[i].ndx-2); } else if(nod[i].strand == -1) { - for(j = last[fr]+3; j <= nod[i].ndx; j+=3) + for(j = last[fr]+1; j <= nod[i].ndx; j+=3) gc[fr] += is_gc(seq, j) + is_gc(seq, j+1) + is_gc(seq, j+2); gsize = (float)(abs(nod[i].stop_val-nod[i].ndx)+3.0); nod[i].gc_cont = gc[fr]/gsize;