Get p.value from Wilcoxon test based on methylation rate in two probes. This function doesn't respect tiles or tiles.common column. This function is using in find_DMR and can be used sepparately.

test_wilcoxon(data)

Arguments

data

There are two options: 1. dataframe with specific columns: chr, poz, prob, no, meth, unmeth, meth.rate. This dataframe is result of function preprocessing. 2. dataframe with specific columns: chr, poz, prob, no, meth, unmeth, meth.rate, tiles and possible tiles.common columns. This dataframe is result of function create_tiles_min_gap or create_tiles_fixed_length.

Value

p.value from Wilcoxon test or na values if something goes wrong

Examples

data('schizophrenia') control <- schizophrenia %>% filter(category == 'control') %>% dplyr::select(-category) disease <- schizophrenia %>% filter(category == 'disease') %>% dplyr::select(-category) data <- preprocessing(control, disease) data.tiles <- create_tiles_max_gap(data, gaps.length = 100) data.test <- data.tiles %>% filter(tiles == 10) test_wilcoxon(data.test)
#> Warning: cannot compute exact p-value with ties
#> p.value #> 1 0.1735682
# or by some self-defined regions: data.test.2 <- data.tiles %>% filter(chr == 'chr1', poz > 80000, poz < 100000) test_wilcoxon(data.test.2)
#> p.value #> 1 7.480529e-11