validateExtractInfo: Validation of some parameters of the 'extractInfo' function

Description Usage Arguments Value Author(s) Examples

View source: R/methylInheritanceInternalMethods.R

Description

Validation of some parameters needed by the public extractInfo function.

Usage

1
validateExtractInfo(allResults, type, inter, position)

Arguments

allResults

a list as created by the runPermutation or the loadAllRDSResults functions.

type

One of the "sites" or "tiles" strings. Specifies the type of differentially methylated elements should be returned. For retrieving differentially methylated bases type = "sites"; for differentially methylated regions type = "tiles".

inter

One of the "i2" or "iAll" strings. Specifies the type of intersection should be returned. For retrieving intersection results between two consecutive generations inter = "i2"; for intersection results between three generations or more inter = "iAll".

position

a positive integer, the position in the list where the information will be extracted. The position must be an existing position inside allResults

Value

0 indicating that all parameters validations have been successful.

Author(s)

Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Load dataset
data(methylInheritanceResults)

## The function returns 0 when all paramaters are valid
methylInheritance:::validateExtractInfo(
    allResults = methylInheritanceResults, type = "sites",
    inter = "i2", 2)

## The function raises an error when at least one paramater is not valid
## Not run: methylInheritance:::validateExtractInfo(
    allResults = methylInheritanceResults, type = "sites",
    inter = "i2", 12)
## End(Not run)

adeschen/methylInheritance documentation built on April 21, 2021, 9:45 a.m.