sync_indices: Synchronising indices across experiments.

View source: R/sync_indices.R

sync_indicesR Documentation

Synchronising indices across experiments.

Description

Particularly when Hi-C data is loaded from different sources, it occurs that the assigned bin indices don't match between datasets. This function re-indexes a list of experiments to a shared set of bin indices.

Usage

sync_indices(explist)

Arguments

explist

A list of GENOVA contacts objects of the same resolution.

Details

Chromosome naming conventions are expected to be equal among input, e.g. all contacts objects use "chr1", "chr2" etc. or all contacts objects use "1", "2" etc.

The first contacts object is used as a template. This should only matter when the different experiments have slightly different end-positions at e.g. chromosome ends, in which case the ends of the first contacts object is used..

Value

A list of GENOVA contacts objects

Examples

## Not run: 
# Data loaded from Hi-C Pro
exp1 <- load_contacts(signal_path = "exp1_10kb_iced.matrix",
                      indices_path = "exp1_10kb_abs.bed",
                      sample_name = "exp1")
# Data loaded from Juicer
exp2 <- load_contacts("exp2_10kb.cooler",
                      balancing = TRUE,
                      sample_name = "exp2")
synched <- sync_indices(list(exp1, exp2))

## End(Not run)

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