The same regions are observations that maximum difference position is gaps.length argument
create_tiles_max_gap(data, gaps.length)
data | dataframe with specific columns: chr, poz, prob, no, meth, unmeth, meth.rate. This dataframe is result of function preprocessing. |
---|---|
gaps.length | integer number that specifies maximum difference position between the same methylation regions |
data.frame from parameter data with extra column tiles that is region id number within chromosomes
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_max_gap(data, gaps.length = 100))#> chr poz prob no meth unmeth meth.rate tiles #> chr1.1 chr1 81412 x 35 29 6 0.8285714 1 #> chr1.2 chr1 81412 y 76 66 10 0.8684211 1 #> chr1.3 chr1 81442 x 35 29 6 0.8285714 1 #> chr1.4 chr1 81442 y 76 66 10 0.8684211 1 #> chr1.5 chr1 81546 x 35 29 6 0.8285714 2 #> chr1.6 chr1 81546 y 76 66 10 0.8684211 2