From 3db74d953550773e1d4e3b1833583246598ca6cb Mon Sep 17 00:00:00 2001 From: Ines Scheller Date: Thu, 2 May 2024 15:10:15 +0200 Subject: [PATCH] fix error when intron not on same chr as any genes in the txdb (issue #74) --- R/resultAnnotations.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/resultAnnotations.R b/R/resultAnnotations.R index 7ab9b61d..c9701616 100644 --- a/R/resultAnnotations.R +++ b/R/resultAnnotations.R @@ -815,7 +815,7 @@ checkIntergenic <- function(junctions_gr, i, refseq.genes){ # check if distance to nearest is > 1000 -> intergenic # otherwise up/downstream dist = min(distance(test_junction, refseq.genes), na.rm = TRUE) - if(dist > 0){ + if(is.finite(dist) && dist > 0){ # find nearest and compare starts if(start(refseq.genes[nearest(junctions_gr[i], refseq.genes)]) > start){