get_top: Get n top region

Description Usage Arguments Value Examples

View source: R/get_top.R

Description

Get n top region from result of find_DMR function.

Usage

1

Arguments

data

dataframe from output of find_DMR function with given method

n

number of regions to return

stats

data.frame with basic statisics about region. This is result of running get_stats function

Value

data.frame with n top region with their basic statistics

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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.tiles.small <- data.tiles %>% filter(tiles < 30)
stats <- get_stats(data.tiles.small)
dmr <- find_DMR(data.tiles.small, c('Wilcoxon', 'Ttest', 'KS', 'Reg.Log', 'Reg.Mixed', 'Reg.Corr.Mixed'))
get_top(find_DMR$Wilcoxon, 3, stats)
get_top(find_DMR$Reg.Log, 3, stats)

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