Chromatin segmentation in R