get_compartment: Calculate compartment scores using Juicer tools

View source: R/analysis.R

get_compartmentR Documentation

Calculate compartment scores using Juicer tools

Description

Calculate compartment scores using Juicer tools

Usage

get_compartment(
  hic_matrix,
  method = c("juicer", "lieberman", "obs_exp", "nonzero", "average", "fanc"),
  chrom = NULL,
  reference = NULL,
  oe = c("juicer", "ht", "as-is"),
  norm = c("NONE", "VC", "VC_SQRT", "KR", "SCALE"),
  ...
)

Arguments

hic_matrix

Either a ht_table object, or the path of the .hic name. If a file path, resol cannot be NULL since we can't infer resolution directly from the .hic file.

chrom

A character vector indicating which chromosomes to run. If NULL, will calculate compartment scores for all chromosomes. However, in this case, hic_matrx cannot be the .hic file name.

reference

A reference compartment track which is used to "orient" principal components. If NULL, no orienting will be performed. Can be the name of a pre-computed reference track, e.g. gc.GRCh38.500kbp (see data(package = "hictools")), or path to the bed file for the reference track, or a GRanges object.

oe

The method to compute observed/expected values. "juicer" indicates using using the values computed by Juicer tools. "ht" indicates using hictools for the calculation. "as-is" indicates observed values will be used as observed/expected ones, thus skipping the OE calculation. This may be useful when the input is cofrag matrix rather than standard Hi-C data. Won't take effect if method is "juicer".

norm

The norm used for calculating compartment scores. If hic_matrix is not a .hic file name, norm will be ignored.

resol

Resolution of the matrix. Must be a positive integer when the input is a Hi-C file.


haizi-zh/hictools documentation built on June 29, 2022, 4:32 a.m.