checkDataObject {MetaIntegrator} | R Documentation |
Check for errors in objects used for analysis
Description
Given an object to check, its objectType and the objectStage, the function checkDataObject
looks for errors within Meta, Dataset, MetaAnalyis, or MetaFilter objects.
It returns TRUE if the object passed error checking, FALSE otherwise, and it prints warning messages explaining failed checks.
Usage
checkDataObject(object, objectType, objectStage="")
Arguments
object |
the object to be checked |
objectType |
one type of "Meta", "Dataset", "MetaAnalysis", "MetaFilter" |
objectStage |
if a |
Details
For metaAnalysisObject
and filterObject
, it makes sure that each entry within the object is 1) not NULL and 2) the correct type.
For datasetObjects
, it makes sure that:
1) the entries are not null (except $class
, which is permitted to be NULL)
2) the entries are the correct type and
3) the sample names (within $pheno
, $expr
, and $class
) match
4) the probeIDs (within $expr
and $keys
) match.
For metaObject
, it recursively checks the Dataset, MetaAnalysis, and MetaFilter objects contained within the metaObject
.
The objectStage
defines what entries a metaObject
contains. Thus, "Pre-Analysis" metaObjects
only contain $originalData
.
"Pre-Filter" metaObjects
contain $originalData
, $metaAnalysis
, and $leaveOneOutAnalysis
.
"Post-Filter" metaObjects
contain $originalData
, $metaAnalysis
, $leaveOneOutAnalysis
, and $filterResults
.
Value
TRUE if passed error checking, FALSE otherwise Prints warning messages explaining the portion of the error checking failed
Author(s)
Erika Bongen
Examples
# check a datasetObject
checkDataObject(tinyMetaObject$originalData$Whole.Blood.Study.1, "Dataset")
# check a metaObject before running the meta-analysis
checkDataObject(tinyMetaObject, "Meta", "Pre-Analysis")
# check a metaObject after running the meta-analysis with runMetaAnalysis()
checkDataObject(tinyMetaObject, "Meta", "Pre-Filter")
# check a metaObject after filtering the meta-analysis results with filterGenes()
checkDataObject(tinyMetaObject, "Meta", "Post-Filter")
# check a metaAnalysisObject
checkDataObject(tinyMetaObject$metaAnalysis, "MetaAnalysis")
# check a filterObject
checkDataObject(tinyMetaObject$filterResults[[1]], "MetaFilter")