sparse2full: Transform a sparse upper triangular matrix to a full Hi-C...

Description Usage Arguments Value Examples

View source: R/matrix_transformations.R

Description

sparse2full will transform a sparse upper triangular Hi-C matrix to a full Hi-C chromatin contact matrix. If you are entering a simple sparse matrix, i.e. there are only 3 columns leave hic.table = FALSE and column.name = NA. If you wish to transform a Hi-C matrix in hic.table object format into a full matrix then set hic.table = TRUE. You will then need to specify the column name that you wish to be entered as the values for the cells in the full matrix using the column.name option.

Usage

1
sparse2full(sparse.mat, hic.table = FALSE, column.name = NA)

Arguments

sparse.mat

A matrix in sparse upper triangular format.

hic.table

Logical, is your sparse.mat a hic.table?

column.name

Character, Required if hic.table set to TRUE; The column name of the hic.table that you want placed into the cells of the full matrix. i.e. IF1, or p.value.

Value

A full Hi-C contact Matrix.

Examples

1
2
data('NHEK.chr22')
full.mat <- sparse2full(NHEK.chr22)

HiCcompare documentation built on Nov. 8, 2020, 8:26 p.m.