diff --git a/R/DEqual.R b/R/DEqual.R index 81c7db6..5736cb8 100644 --- a/R/DEqual.R +++ b/R/DEqual.R @@ -62,11 +62,6 @@ DEqual <- function(DE) { stop("'DE' and degradation t-statistics rownames mismatch error.") } - # Check if all rownames start with "ENST" - if (!all(grepl("^ENST", rownames(DE)))) { - stop("Some rownames do not start with 'ENST'.") - } - ## Locate common transcripts is_gencode = all(grepl("^ENST.*?\\.", rownames(DE))) is_ensembl = all(grepl("^ENST", rownames(DE)) & !grepl("\\.", rownames(DE))) diff --git a/tests/testthat/test-DEqual.R b/tests/testthat/test-DEqual.R index fe6df4f..de3a523 100644 --- a/tests/testthat/test-DEqual.R +++ b/tests/testthat/test-DEqual.R @@ -41,7 +41,7 @@ test_that("DEqual correctly processes random_de", { rownames(altered_random_de)[1] <- "INVALID0001" # Change the first rowname to an invalid one # Expect an error when rownames do not start with "ENST" - expect_error(DEqual(altered_random_de), "Error: Some rownames do not start with 'ENST'.") + expect_error(DEqual(altered_random_de), "The rownames of the input dataframe should be either GENCODE or ENSEMBL transcript IDs.") }) # Test: None of the DE rownames are in degradation_tstats rownames