diff --git a/R/getDegTx.R b/R/getDegTx.R index 6d05575..9a65b17 100644 --- a/R/getDegTx.R +++ b/R/getDegTx.R @@ -37,16 +37,16 @@ getDegTx <- function(rse_tx, type = c("cell_component", "standard", "top1500"), type = arg_match(type) + # Validate rse_tx is a RangedSummarizedExperiment object + if (!is(rse_tx, "RangedSummarizedExperiment")) { + stop("'rse_tx' must be a RangedSummarizedExperiment object.", call. = FALSE) + } + # Check if assayname is in assayNames if (!assayname %in% assayNames(rse_tx)) { stop(sprintf("'%s' is not in assayNames(rse_tx).", assayname), call. = FALSE) } - # Validate rse_tx is a RangedSummarizedExperiment object - if (!is(rse_tx, "RangedSummarizedExperiment")) { - stop("rse_tx must be a RangedSummarizedExperiment object.", call. = FALSE) - } - # Check for validity and matching of tx names sig_transcripts = check_tx_names(rownames(rse_tx), sig_transcripts, 'rownames(rse_tx)', 'sig_transcripts')