Learn R Programming

hicream (version 0.0.4)

loadData: 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)

Value

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

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.

Author

Élise Jorge elise.jorge@inrae.fr
Sylvain Foissac sylvain.foissac@inrae.fr
Toby Dylan Hocking toby.hocking@r-project.org
Pierre Neuvial pierre.neuvial@math.univ-toulouse.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr

Examples

Run this code
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)

Run the code above in your browser using DataLab