checkDataObject: Check for errors in objects used for analysis

Description Usage Arguments Details Value Author(s) Examples

View source: R/checkDataObject.R

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

1
checkDataObject(object, objectType, objectStage="")

Arguments

object

the object to be checked

objectType

one type of "Meta", "Dataset", "MetaAnalysis", "MetaFilter"

objectStage

if a metaObject, one of "Pre-Analysis", "Pre-Filter", or "Post-Filter". Otherwise: ""

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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")

Example output

Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE
[1] TRUE

MetaIntegrator documentation built on March 26, 2020, 6:29 p.m.