From da8d017b925b7affa5f5d075c146f57c6b981131 Mon Sep 17 00:00:00 2001 From: Qile0317 Date: Wed, 4 Feb 2026 10:34:47 -0800 Subject: [PATCH] fix expanded sequence check --- R/Ibex_matrix.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/Ibex_matrix.R b/R/Ibex_matrix.R index 3b23b7d..3e4922e 100644 --- a/R/Ibex_matrix.R +++ b/R/Ibex_matrix.R @@ -102,9 +102,9 @@ Ibex_matrix <- function(input.data, # Determine dictionary for sequence encoding if (expanded.sequences) { #Quick Check to see if there are - corresponding to CDR1-CDR2-CDR3 - if (all(grepl("-", BCR[,"cdr3_aa"]))) { + if (!all(grepl("-", BCR[,"cdr3_aa"]))) { stop("Expanded sequences are not properly formated, please use - combineExpandedBCR().") + combineExpandedBCR() or ensure each element is CDRs 1, 2, and 3 joined by `-`") } BCR[,"cdr3_aa"] <- gsub("-", "_", BCR[,"cdr3_aa"]) dictionary <- c(amino.acids, "_")