Skip to content

Commit

Permalink
Fix the error message
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Eagles <[email protected]>
  • Loading branch information
HediaTnani and Nick-Eagles committed Jan 9, 2024
1 parent 2fb709b commit c936b18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ getDegTx <- function(rse_tx, type = c("cell_component", "standard", "top1500"),

# Check if any gene in sig_transcripts is in rownames(rse_tx)
if (!any(sig_transcripts %in% rownames(rse_tx) | (gsub('\\..*', '', sig_transcripts) %in% rownames(rse_tx)))) {
stop("sig_transcripts and rownames(rse_tx) do not match")
stop("sig_transcripts and rownames of rse_tx object do not match")
}

# Check if all rownames start with "ENST"
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-getDegTx.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test_that("No sig_transcripts are in covComb_tx_deg rownames", {
# Check if any of the sig_transcripts are in covComb_tx_deg rownames
getDegTx(covComb_tx_deg,sig_transcripts = sig_transcripts)

}, "No sig_transcripts found in rownames(covComb_tx_deg)")
}, "sig_transcripts and rownames of rse_tx object do not match")
})

# Test whether getDegTx gives the same results with original and altered row names
Expand Down

0 comments on commit c936b18

Please sign in to comment.