get_contacts_matrix: Make a contact matrix from HiC data

Description Usage Arguments Value Examples

View source: R/get_contacts_matrix.R

Description

This function takes a HiC-BAM file and creates a contact map as a sparse_ matrix with dimnames corresponding to the genomic bins

Usage

1
2
get_contacts_matrix(inbam, resolution, region = NULL, pos, whole = F,
  filtin = 0, filtex = 783)

Arguments

inbam

HiC-BAM file

resolution

Desired resolution (bin size)

region

Region of interest following the format chr|chr:start-end. If NULL, take the entire genome

pos

A vector with the genomic position IDs to be included in the output. It can be the column of the output from make_bins

whole

Logical indicating if the entire available genome should be retrieved (rectangular contact map) or only the region of interest indicated with region (square contact map). It should be consistent tih pos argument

filtin

Integer value indicating the required bits for the HiC-BAM FLAG (include the corresponding contacts in the output)

filtex

Integer value indicating the excluded bits for the HiC-BAM FLAG (exclude the corresponding contacts in the output)

Value

A named sparse_matrix containing the number of contacts per pair of genomic bins at the requested region

Examples

1
plot(0)

qenvio/hicutils documentation built on May 26, 2019, 11:35 a.m.