TUNE MIN_DISTANCE AND MIN_N PARAMETERS

Share:

Description

This function evaluates the number of regions identified for various settings of min_distance and n_min (see DMRforPairs). It also summarizes the number of probes available inclusion using a specific setting of recode and the number of probes that is covered by the detected regions.

Usage

1
tune_parameters(parameters,classes_gene,classes_island,targetID, chr, position,m.v,beta.v,recode=1,sep=";",gs,do.parallel=0)

Arguments

parameters

A data frame with two columns: [1] min_distance and [2] min_n. The number of regions / probes will be evaluated for each pair of parameters (per row).

classes_gene

Please see DMRforPairs

classes_island

Please see DMRforPairs

targetID

Please see DMRforPairs

chr

Please see DMRforPairs

position

Please see DMRforPairs

m.v

Please see DMRforPairs

beta.v

Please see DMRforPairs

recode

Please see DMRforPairs. (Default=1)

sep

Please see DMRforPairs. (Default=";")

gs

Please see DMRforPairs

do.parallel

Tuning of the parameters requires a significant amount of compute time and power. Parallelization if offered to do this more efficiently. 0=no parallelization, -1=use all available cores, n>1 use n cores (default=0)

Details

This function requires a significant amount of compute time/power. Parallelization is highly recommended. When parallelization is enabled, no progress indicator is displayed by R.

Value

A data frame is returned with the folowing columns

min_distance

The setting of min_distance. Also see DMRforPairs

min_n

The setting for min_n. Also see DMRforPairs

n.regions

The number of regions identified in your data using the before mentioned combination of settings and the setting of recode.

n.valid.probes

The number of probes that were assigned to one or more classes in the merge_classes function. This is constant for a specific data set as long as the recode parameter is the same.

n.probes.included

The number of probes included in the identified regions.

Author(s)

Martin Rijlaarsdam

See Also

regionfinder, DMRforPairs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(DMRforPairs_data)
CL.methy=CL.methy[which(CL.methy$position<=1.07E+8 & 
                        CL.methy$position>=1.06E+8),]
#just two relevant values for the parameters 
#min_distance (100 & 300) and min_n (4 & 8)
parameters=expand.grid(min_distance = c(200), min_n = c(4,5))
results_parameters=	tune_parameters(parameters,
					classes_gene=CL.methy$class.gene.related, 
					classes_island=CL.methy$class.island.related, 
					targetID=CL.methy$targetID, 
					chr=CL.methy$chromosome, 
					position=CL.methy$position, 
					m.v=CL.methy[,c(7:8)], 
					beta.v=CL.methy[,c(11:12)],
					recode=1,
					gs=CL.methy$gene.symbol,
					do.parallel=0)
results_parameters