Summarize regions by minimum, maximum, mean, standard deviation of methylation rate in two probes and methylation diff rate withib two probes and estimated quantile basen od methylation diff rate

get_stats(data)

Arguments

data

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

data.frame which is summing-up regions specifed by tiles and tiles.common columns in data

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) head(get_stats(data.tiles))
#> # A tibble: 6 x 14 #> # Groups: chr, start, end [6] #> chr start end meth.cov meth.max_x meth.max_y meth.mean_x meth.mean_y #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 chr1 81412 81442 2 0.8285714 0.8684211 0.8285714 0.8684211 #> 2 chr1 81546 81546 1 0.8285714 0.8684211 0.8285714 0.8684211 #> 3 chr1 81698 81863 4 0.8285714 0.8684211 0.8285714 0.8684211 #> 4 chr1 81984 82025 3 0.8285714 0.8684211 0.8252101 0.8672515 #> 5 chr1 82254 82254 1 0.8235294 0.8552632 0.8235294 0.8552632 #> 6 chr1 82603 82625 2 0.7272727 0.8846154 0.7272727 0.8846154 #> # ... with 6 more variables: meth.min_x <dbl>, meth.min_y <dbl>, #> # meth.sd_x <dbl>, meth.sd_y <dbl>, meth.diff <dbl>, quantile <dbl>