correctCIM: Corrects a chromosomal interactions map (CIM)

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/VarianceStabCorrection.R

Description

This function applies a wavelet based correction to remove bias and noise, typical of Hi-C data, from a chromosomal interactions map (CIM).

Usage

1
correctCIM(m, seg, removeUncovered = FALSE)

Arguments

m

A CIM (matrix), where the cell m[i,j] is the interaction frequency between the genomic region i and the genomic region j.

seg

A data table definding a genome segmentation, giving the genomic coordinates of each row/col in the given CIM. The data table should include the following columns for each region: chromosome name, start position and end position.

removeUncovered

Optional: a boolean specifying whether regions that are uncovered (i.e. no interaction with other regions) should be removed before correction. set to FALSE by default.

Value

Returns a list with the following objects:

mCorrected

the corrected contat map

seg

a data table defining the genomic coordinates of each row/col in the corrected map (if removeUncoevered is set to FALSE, this would be the same as the input segmentation)

Author(s)

Yoli Shavit

References

http://www.cl.cam.ac.uk/~ys388/chromoR/ (including more examples and data sets)

See Also

See Also correctPairCIM, compareCIM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# correction
data(imr90.1.obs) #contact map of imr90 (replicate 1) 
                  #for chromosomes 1 and 2, before correction 
data(seg.imr90.obs) 
head(seg.imr90.obs)
res = correctCIM(imr90.1.obs, seg.imr90.obs, removeUncovered = TRUE)
# the corrected CIM - look at the first cell in the matrix.
# Note the difference in dimensions 
#(with respect to imr90.1.orig) since we set removeUncevered to TRUE
(res$mCorrected)[1,1]
dim(res$mCorrected)
# the coordinates for the corrected matrix 
head(res$seg)
nrow(res$seg)

chromoR documentation built on May 30, 2017, 5:08 a.m.