From a787c7eccb672122a13d4118387eddcf5a478fe4 Mon Sep 17 00:00:00 2001 From: KrystynaGrzesiak Date: Mon, 19 Aug 2024 14:41:24 +0200 Subject: [PATCH] fixes index --- R/motifs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/motifs.R b/R/motifs.R index cf4036e..22f1174 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -127,7 +127,7 @@ add_motifs <- function(motifs, sequence, max_attempts = 20) { for(i in 1:length(motifs)) { mask <- rep(FALSE, sequence_len) - motif <- motifs[[j]] + motif <- motifs[[i]] motif_ids <- motifs_positions[i]:(motifs_positions[i] + length(motif) - 1) motif_ids <- setdiff(motif_ids, motif_ids[motif == "_"])