loadData: Load and Normalize Hi-C Data

View source: R/loadData.R

loadDataR Documentation

Load and Normalize Hi-C Data

Description

This function loads data necessary for the analysis and outputs them in a suitable format for performTest and 2Dclust.

Usage

loadData(files, index, chromosome, normalize = TRUE)

Arguments

files

character vector. Paths to Hi-C matrices in bed format.

index

character. A path to an index file in bed format.

chromosome

character or integer. Chromosome to select.

normalize

logical. Whether or not to normalize the output (with MA method). Set to TRUE by default.

Value

An InteractionSet corresponding to all interactions present in at least one of the input matrices and corresponding counts across all matrices.

Author(s)

Élise Jorge elise.jorge@inrae.fr
Sylvain Foissac sylvain.foissac@inrae.fr
Pierre Neuvial pierre.neuvial@math.univ-toulouse.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr

Examples

replicates <- 1:2
cond <- "90"
allBegins <- interaction(expand.grid(replicates, cond), sep = "-")
allBegins <- as.character(allBegins)
chromosome <- 1
nbChr <- 1
allMat <- sapply(allBegins, function(ab) {
  matFile <- paste0("Rep", ab, "-chr", chromosome, "_200000.bed")
  })
index <- system.file("extdata", "index.200000.longest18chr.abs.bed",
                    package = "hicream")
                    format <- rep("HiC-Pro", length(replicates) * length(cond) * nbChr)
binsize <- 200000
files <- system.file("extdata", unlist(allMat), package = "hicream")
exData <- loadData(files, index, chromosome, normalize = TRUE)

hicream documentation built on Aug. 8, 2025, 7:26 p.m.