Checks to ensure that the values for x
, design
, and contrast
are
appropriate for the GSEA methods
being used. If they are kosher, then
"normalized" versions of these objects are returned in an (aptly) named list,
otheerwise an error is thrown.
validateInputs(
x,
design = NULL,
contrast = NULL,
methods = NULL,
xmeta. = NULL,
require.x.rownames = TRUE,
...
)
The expression object to use
A design matrix, if the GSEA method(s) require it
A contrast vector (if the GSEA method(s) require it)
A character vector of the GSEA methods that these inputs will be used for.
hack for supportin data.frame inputs.
Leave this alone, should always be TRUE
but
have it in this package for dev/testing purposes.
other variables that called methods can check if they want
A list with "normalized" versions of $x
, $design
, and $contrast
for downstream use.
This function is strange in that we both want to verify the objects, and
return them in some canonical form, so it is normal for the caller to then
use the values for x
, design
, and contrast
that are returned from this
call, and not the original values for these objects themselves
I know that the validation/checking logic is a bit painful (and repetitive) here. I will (perhaps) clean that up some day.
dge.stats <- exampleDgeResult()
ranks <- setNames(dge.stats$t, dge.stats$feature_id)
gdb <- exampleGeneSetDb()
ok <- validateInputs(ranks, gdb, methods = c("cameraPR", "fgsea"))
# need full expressionset & design for romer
null <- failWith(NULL, validateInputs(ranks, gdb, methods = "romer"))