testregion: METHYLATION DIFFERENECE & TESTING FOR 1 REGIONID

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/functions.R

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

1
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).

Details

This function is rarely called by the user directly.

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.

Author(s)

Martin Rijlaarsdam, m.a.rijlaarsdam@gmail.com

See Also

calc_stats

Examples

1
2
3
#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.

DMRforPairs documentation built on Nov. 8, 2020, 4:52 p.m.