Skip to content

Commit

Permalink
Switch order to check if rse_tx is an rse object first
Browse files Browse the repository at this point in the history
  • Loading branch information
HediaTnani committed Jan 16, 2024
1 parent 856e004 commit 497e176
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 497e176

Please sign in to comment.