From 96d69e0d1fefb26fd7e81073170df3548811128a Mon Sep 17 00:00:00 2001 From: mikelove Date: Mon, 27 Feb 2023 22:34:09 -0500 Subject: [PATCH] no factors allowed --- R/constructors.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/constructors.R b/R/constructors.R index 882584e..1746cf2 100644 --- a/R/constructors.R +++ b/R/constructors.R @@ -71,6 +71,8 @@ stageRTx <- function(pScreen, pConfirmation, pScreenAdjusted=FALSE, tx2gene){ stop("not all transcript names in pConfirmation match with a transcript ID from the tx2gene object.") if(any(is.na(match(names(pScreen),tx2gene[,2])))) stop("not all gene names in pScreen match with a gene ID from the tx2gene object.") + if(class(tx2gene[,1]) == "factor" | class(tx2gene[,2]) == "factor") + stop("columns of tx2gene should be character, not factor") stageR <- new("stageRTx") stageR@pScreen <- pScreen stageR@pConfirmation <- pConfirmation