Description Usage Arguments Details Value Author(s) References See Also Examples
This function finds changes points in a 1D Hi-C contact profile generated by taking the row sums of a pairwise chromosomal interactions map (CIM). It applies a wavelet change point algorithm [1] in order to find the location of change points (the segmentation of the profile).
1 | segmentCIM(y, minL = 1, maxL = 1)
|
y |
A 1D Hi-C contact profile (a vector generated by taking row sums of a pairwise chromosomal interactions map (CIM)). |
minL |
Optional: a positive integer specifying the minimum level at which the search should be carried out. Set to 1 by default |
maxL |
Optional: a positive integer specifying the maximum level at which the search should be carried out and set to 1 by default. Should not exceed 0.1 of the length of the input. If the algorithm cannot find change points at the minimum level, it will repeat the search at higher levels and stop at the first level where change points were found or when it has reached the maximum level. |
This function implemments a wavelet change point algorithm as described in [1] and based on its matlab implementation (http://homepages. ulb.ac.be/~majansen/software/index.html)
Returns a list including the following objects:
changePoints |
the location of change points (or NULL if none were found) |
L |
the level at which the change points were found (or the given maximal level if no change points were found) |
Yoli Shavit
website: http://www.cl.cam.ac.uk/~ys388/chromoR/ (including more examples and data sets)
[1] M. Jansen, Chemometrics and intelligent laboratory systems, 2007, 85, 159.
See Also as compareCIM
1 2 3 4 5 6 7 8 9 | data(imr90.1) # corrected contact map of imr90 (replicate 1) for chromosomes 1,2
data(seg)
#generate a 1D profile for cis CIM of chromosome 2
indices = which(seg$chr == "chr2")
i1 = indices[1]
iN = indices[length(indices)]
p = rowSums(imr90.1[i1:iN, i1:iN]) - diag(imr90.1[i1:iN, i1:iN])
res = segmentCIM(p)
res
|
Loading required package: haarfisz
Loading required package: wavethresh
Loading required package: MASS
WaveThresh: R wavelet software, release 4.6.8, installed
Copyright Guy Nason and others 1993-2016
Note: nlevels has been renamed to nlevelsWT
Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata:
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata:
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
nobs
The following object is masked from 'package:utils':
object.size
The following object is masked from 'package:base':
startsWith
$changePoints
[1] 9 81 85 131 197 214 218 229
$L
[1] 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.