shuffleHiC: Shuffle a symmetric matrix

View source: R/shuffleHiC.R

shuffleHiCR Documentation

Shuffle a symmetric matrix

Description

ShuffleHiC shuffles a matrix from 'select_subset()“ diagonal-wise. That is, every diagonal in the matrix is shuffled independently.

Usage

shuffleHiC(MAT, symmetric = T)

Arguments

MAT

A Hi-C matrix: can be produced by 'select_subset()'.

symmetric

In some special cases you might not want to get a symmetric matrix back. Set this argument on FALSE.

Value

A shuffled version of the input: either a list with the shuffled 'z' (when using 'select_subset') or a shuffled matrix.

Examples

## Not run: 
## Shuffle a region on chromosome 1
HiCregion <- select_subset(EXP, chrom = "chr1", start = 15e6, end = 20e6)
HiCregion_shuffled <- shuffleHiC(HiCregion)

# plot observed/expected
image(HiCregion$z / HiCregion_shuffled$z)

## End(Not run)

robinweide/GENOVA documentation built on March 14, 2024, 11:16 p.m.