R/processCompartments.R

## automate compartment prediction by Sample_Group 
processCompartments <- function(x, exclude=c("chrX", "chrY"), ...) {
  chroms <- seqlevels(x)
  names(chroms) <- chroms
  chroms <- setdiff(chroms, exclude)
  comps <- GRangesList(lapply(chroms, function(y) compartments(x, chr=y)))
  metadata(x)$compartments <- comps
  invisible(x)
}
RamsinghLab/ozymandias documentation built on May 9, 2019, 9:21 a.m.