hicpro2bedpe: Convert HiC-Pro results to BEDPE format

Description Usage Arguments Details Value Examples

View source: R/hicpro2bedpe.R

Description

Convert HiC-Pro results to BEDPE format

Usage

1
hicpro2bedpe(mat, bed)

Arguments

mat

The 3 column sparse upper triangular matrix from HiC-Pro.

bed

The BED file containing the mappings for for the matrix.

Details

HiC-Pro will produce a .matrix file and a .bed file as the final aligned product of the alignment process. These files should be read into R using read.table() or similar and then entered as the mat and bed inputs to this function. The function will convert the data into a format useable for HiCcompare. The cis matrices in the results can be directly input into create.hic.table() as sparse matrices.

Value

A list with two items. Item 1, "cis" contains the intra-chromosomal contact matrices, one per chromosome. Item 2, "trans" contains the inter-chromsomal contact matrix.

Examples

1
2
3
4
5
6
7
8
## Not run: 
 # read in data
 mat <- read.table("hic_1000000.matrix")
 bed <- read.table("hic_1000000_abs.bed")
 # convert to BEDPE
 dat <- hicpro2bedpe(mat, bed)

## End(Not run)

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