Preprocessing data for methylation by selecting data from two given samples if methylation probe exists in both samples on the same chromosome and position.

preprocessing(sample.1, sample.2)

Arguments

sample.1

a data frame with methylation data

sample.2

a data frame with methylation data

Value

data.frame with methylation values on common positions and chromosomes from sample.1 and sample.2

Examples

# data from package data('schizophrenia') control <- schizophrenia %>% filter(category == 'control') %>% dplyr::select(-category) disease <- schizophrenia %>% filter(category == 'disease') %>% dplyr::select(-category) data <- preprocessing(control, disease) head(data)
#> chr poz prob no meth unmeth meth.rate #> 1 chr1 81412 x 35 29 6 0.8285714 #> 2 chr1 81412 y 76 66 10 0.8684211 #> 3 chr1 81442 x 35 29 6 0.8285714 #> 4 chr1 81442 y 76 66 10 0.8684211 #> 5 chr1 81546 x 35 29 6 0.8285714 #> 6 chr1 81546 y 76 66 10 0.8684211