load_contacts: Construct a contacts-object.

View source: R/load_contacts.R

load_contactsR Documentation

Construct a contacts-object.

Description

Make an object which holds the most needed information of a HiC-experiment at a given resolution.

Usage

load_contacts(
  signal_path,
  indices_path = NULL,
  resolution = 10000,
  sample_name = NULL,
  centromeres = NULL,
  colour = NULL,
  z_norm = FALSE,
  scale_bp = 1e+09,
  scale_cis = FALSE,
  balancing = TRUE,
  legacy = FALSE,
  verbose = TRUE
)

Arguments

signal_path

Full path to an Hi-C file. This could be \*.matrix (for HiCpro), \*.cooler or \*.hic (for juicer).

indices_path

Full path the HiC-pro-like index-file. Required when 'signal_path' is \*.matrix.

resolution

Set the desired resolution of the matrix when using juicer-data.

sample_name

The name of the sample.

centromeres

One of the following:

  • NULL (default) for empirically estimating centromeres by searching for the largest stretch of empty bins.

  • A data.frame with three columns per chromosome: chromosome name, start-position and end-positions of centromeric regions.

  • FALSE to set no centromere information.

colour

colour associated with sample.

z_norm

Normalise the matrices per-chromosome with a Z-score.

scale_bp

Scale contacts to have genome-wide sum of 'scale_bp' reads (default: 1e9). Set to NULL to skip this.

scale_cis

Only scale with cis-contacts.

balancing

TRUE (default) will perform matrix balancing for .cooler and KR for.hic.

legacy

Get a pre-v1 object (mimics the output of construct.experiment.)

verbose

Do you want updates during the construction?

Value

An contacts-object, which is a named list of contacts, indices and attributes for a Hi-C matrix of a given sample at a given resolution.

Note

Some reference genomes have very small "random" or "patch" chromosomes, which can have zero contacts mapped to it (at certain resolutions). 'load_contacts' checks this and omits these chromosomes in the resulting experiment-object. The RMCHROM-flag will also be set to TRUE: this will help other GENOVA-functions to deal better with this problem. There is a slight performance-cost during the construction of the object, however.

Examples

## Not run: 
WT_10kb_hicpro <- load_contacts(signal_path = "WT_10kb_iced.matrix", 
                                indices_path = "WT_10kb_abs.bed", 
                                sample_name = "WT", 
                                colour = "black")
WT_10kb_cooler <- load_contacts("WT_10kb.cooler", 
                                balancing =T, 
                                sample_name = "WT", 
                                colour = "black")
WT_10kb_juicer <- load_contacts("WT_10kb_iced.hic", 
                                resolution = 10e3, 
                                balancing =T, 
                                sample_name = "WT", 
                                colour = "black")

## End(Not run)

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