Skip to content

Commit ee3db08

Browse files
Added check to max number of tissues
1 parent 9589349 commit ee3db08

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

R/teGeneRetrieval.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ teGeneRetrieval <- function(expressionData, foldChangeThreshold = 5,
5353
numeric value greater than
5454
or equal to 1.")
5555
maxNumberOfTissues <- ensurer::ensure_that(maxNumberOfTissues,
56-
!is.null(.) && is.numeric(.) && (. >= 2),
57-
err_desc = "maxNumberOfTissues should be an
56+
!is.null(.) && is.numeric(.) && (. >= 2)
57+
&& (. <= ncol(expressionData)),
58+
err_desc = "maxNumberOfTissues should be an
5859
integer value greater than or
59-
equal to 2.")
60+
equal to 2 and less than the number
61+
of tissues in the expression data.")
6062

6163
expressedGeneThreshold <- ensurer::ensure_that(expressedGeneThreshold,
6264
!is.null(.) && is.numeric(.) && (. >= 0),

0 commit comments

Comments
 (0)