Learn R Programming

chromoR (version 1.0)

correctCIM: Corrects a chromosomal interactions map (CIM)

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

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)

References

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

See Also

See Also correctPairCIM, compareCIM

Examples

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

Run the code above in your browser using DataLab