getCompartments: Contact map compartments

View source: R/compartments.R

getCompartmentsR Documentation

Contact map compartments

Description

Computes eigen vectors for each chromosome using cis contacts and extract chromosome compartments.

Usage

getCompartments(
  x,
  resolution = NULL,
  genome = NULL,
  chromosomes = NULL,
  neigens = 3,
  sort_eigens = FALSE,
  BPPARAM = BiocParallel::bpparam()
)

Arguments

x

A HiCExperiment object over a full genome

resolution

Which resolution to use to compute eigen vectors

genome

a BSgenome of DNAStringSet object associated with the Hi-C contact matrix.

chromosomes

character or integer vector indicating which

neigens

Numver of eigen vectors to extract

sort_eigens

Can be FALSE or one of c('Spearman', 'Pearson')

BPPARAM

BiocParallel parallelization settings

Value

A HiCExperiment object with additional eigens metadata containing the normalized eigenvectors and a new "compartments" topologicalFeatures storing A and B compartments as a GRanges object.

Examples

library(HiContacts)
full_contacts_yeast <- contacts_yeast(full = TRUE)
comps <- getCompartments(full_contacts_yeast)
metadata(comps)$eigens

js2264/cooleR documentation built on Jan. 29, 2024, 10:47 p.m.