create_tiles_fixed_length: Create regions for testing methylation difference

Description Usage Arguments Value Examples

View source: R/create_tiles_fixed_length.R

Description

The same regions are observations where maximum difference between minimum and maximum position is tiles.length argument.

Usage

1
create_tiles_fixed_length(data, tiles.length, common = FALSE)

Arguments

data

dataframe with specific columns: chr, poz, prob, no, meth, unmeth, meth.rate. This dataframe is result of function preprocessing.

tiles.length

integer number that specifies maximum difference between minimum and maximum position in the same methylation regions. k-region in chromosome are observations for which position is between [k * tiles.length;(k + 1)* tiles.length -1]

common

logi value. If TRUE this function creates second regions group that k-region in chromosome are observations for which position is between [ k * tiles.length + tiles.length/2 ; (k + 1)* tiles.length -1 + tiles.length/2]

Value

data.frame from parameter data with extra column tiles that is region id number within chromosomes and extra column tiles.common if argument tiles.common is not null

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data('schizophrenia')
control <- schizophrenia %>% filter(category == 'control') %>%
dplyr::select(-category)

disease <- schizophrenia %>% filter(category == 'disease') %>%
 dplyr::select(-category)

data <- preprocessing(control, disease)
head(create_tiles_fixed_length(data, tiles.length = 1000, common = FALSE))
head(create_tiles_fixed_length(data, tiles.length = 1000, common = TRUE))

geneticsMiNIng/metR documentation built on May 28, 2019, 8:41 p.m.