do_pca: PCA analysis of Hi-C contact maps.

Description Usage Arguments Value See Also Examples

Description

Performs PCA on Hi-C contact map as described in Liebermann-Aiden et al 2009. More specifically it runs following routines on dense matrix:

Usage

1
do_pca(dense.mtx, ...)

Arguments

dense.mtx

numeric matrix - Hi-C contact map

...

optional arguments passed to prcomp

Value

PCA object returned by prcomp function.

See Also

prcomp for how is PCA performed, Lieberman-Aiden E. et al., 2009 "Comprehensive mapping of long-range interactions reveals folding principles of the human genome." for compartment detection in Hi-C contact maps.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# load Hi-C contact maps from npz file
# get sample npz file name
mtx.fname <- system.file("extdata", "MSC-HindIII-1_40kb-raw.npz", package = "DIADEM", mustWork = TRUE)
mtx.sparse.list <- read_npz(mtx.fname, sparse.format = TRUE)
# get matrix for selected chromosome
mtx <- mtx.sparse.list[["18"]]
# do PCA
pca <- do_pca(mtx)
print(pca)
# it is also possible to visualize results
pairs(pca)

rz6/CopulaHiC documentation built on Dec. 31, 2019, 9:19 a.m.