-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comments to the tests of getDegTx
- Loading branch information
1 parent
46816e3
commit bd1ff44
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
# Filter out lowly expressed transcripts and test if the number of rows in getDegTx output matches expected transcript count | ||
rse_tx_low <- covComb_tx_deg[rowMeans(assays(covComb_tx_deg)$tpm) < 1, ] | ||
test_that("length for number of rows is the same a length sig_transcripts", { | ||
expect_equal(length(rownames(getDegTx(covComb_tx_deg))), length(select_transcripts("cell_component"))) | ||
}) | ||
|
||
# Test if number of columns in getDegTx output matches number of columns in original dataset | ||
test_that("length for number of columns is the same a length sig_transcripts", { | ||
expect_equal(length(colnames(getDegTx(covComb_tx_deg))), length(colnames(covComb_tx_deg))) | ||
}) | ||
|
||
# Test if getDegTx returns an object of the same class as its input | ||
test_that("output is an RSE", { | ||
expect_equal(class(getDegTx(covComb_tx_deg)), class(covComb_tx_deg)) | ||
}) | ||
|
||
# Test for a warning when getDegTx is used on a dataset with lowly expressed transcripts | ||
test_that("test warning output for lowly expressed transcripts", { | ||
expect_warning(getDegTx(rse_tx_low)) | ||
}) | ||
|