Learn R Programming

DMRforPairs (version 1.8.0)

testregion: METHYLATION DIFFERENECE & TESTING FOR 1 REGIONID

Description

Serves as a wrapper for calc_stats. calc_stats is a generic function using row numbers of adjacent probes which are to be queried for their difference in methylation levels between samples. testregion() identifies the row numbers of probes included in a specific regionID x and then calls calc_stats. It returns the difference in methylation level for region x and (if appropriate) the results of formal tests that evaluate this difference.

Usage

testregion(x,probes,m,b,n,dMth,do.format=FALSE)

Arguments

x
region ID, see output regionfinder.
probes
see output of regionfinder (regions$perprobe).
m
see output of regionfinder (regions$valid.m).
b
see output of regionfinder (regions$valid.beta).
n
total number of samples.
dMth
see min_dM parameter of DMRforPairs
do.format
If TRUE, the function returns a formatted data frame with statistics regarding the region. If FALSE, it returns a basic vector. This is more computationally efficient if testregion is used in a loop (like in DMRforPairs).

Value

Data frame or vector (depending on the setting of do.format) with statistics and test results concerning region x. For specification, please see calc_stats.

Details

This function is rarely called by the user directly.

See Also

calc_stats

Examples

Run this code
#testregion() is an integrated part of the DMRforPairs() wrapper and is 
#not usually called by the user directly. Please see this function for 
#an example.

Run the code above in your browser using DataLab