C. Ambroise, M. Dang, and G. Govaert, Clustering of
spatial data by the em algorithm in Geostatistics for Environmental
Applications, A. Soares, J. Gomez-Hernandez, and R. Froidevaux, Eds.,
pp. 493-504. Kluwer Academic Publisher, 1997.
data(spatial) ## arrays with local spatial effects
## Plot of LogRatio measured on the array CGH
## Not run:
arrayPlot(edge,"LogRatio", main="Log2-Ratio measured on the array
CGH", zlim=c(-1,1), bar="v", mediancenter=TRUE)
## End(Not run)
## Spatial trend of the scaled log-ratios (the variable "ScaledLogRatio"
## equals to the log-ratio minus the median value of the corresponding chromosome arm)
edgeTrend <- arrayTrend(edge, variable="ScaledLogRatio",
span=0.03, degree=1, iterations=3, family="symmetric")
## Not run:
arrayPlot(edgeTrend, variable="Trend", main="Spatial trend of the array CGH", bar="v")
## End(Not run)
## Classification with spatial constraint of the spatial trend
edgeNem <- nem(edgeTrend, variable="Trend")
## Not run:
arrayPlot(edgeNem, variable="ZoneNem", main="Spatial zones identified by nem", bar="v")
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MANOR)
Loading required package: GLAD
######################################################################################
Have fun with GLAD
For smoothing it is possible to use either
the AWS algorithm (Polzehl and Spokoiny, 2002,
or the HaarSeg algorithm (Ben-Yaacov and Eldar, Bioinformatics, 2008,
If you use the package with AWS, please cite:
Hupe et al. (Bioinformatics, 2004, and Polzehl and Spokoiny (2002,
If you use the package with HaarSeg, please cite:
Hupe et al. (Bioinformatics, 2004, and (Ben-Yaacov and Eldar, Bioinformatics, 2008,
For fast computation it is recommanded to use
the daglad function with smoothfunc=haarseg
######################################################################################
New options are available in daglad: see help for details.
Attaching package: 'MANOR'
The following object is masked from 'package:base':
norm
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MANOR/nem.Rd_%03d_medium.png", width=480, height=480)
> ### Name: nem
> ### Title: Spatial Classification by EM algorithm
> ### Aliases: nem nem.default nem.arrayCGH
> ### Keywords: spatial models
>
> ### ** Examples
>
> data(spatial) ## arrays with local spatial effects
>
> ## Plot of LogRatio measured on the array CGH
> ## Not run:
> ##D arrayPlot(edge,"LogRatio", main="Log2-Ratio measured on the array
> ##D CGH", zlim=c(-1,1), bar="v", mediancenter=TRUE)
> ## End(Not run)
>
> ## Spatial trend of the scaled log-ratios (the variable "ScaledLogRatio"
> ## equals to the log-ratio minus the median value of the corresponding chromosome arm)
> edgeTrend <- arrayTrend(edge, variable="ScaledLogRatio",
+ span=0.03, degree=1, iterations=3, family="symmetric")
>
> ## Not run:
> ##D arrayPlot(edgeTrend, variable="Trend", main="Spatial trend of the array CGH", bar="v")
> ## End(Not run)
>
> ## Classification with spatial constraint of the spatial trend
> edgeNem <- nem(edgeTrend, variable="Trend")
************************************************
*** Spatial Classification with EM algorithm ***
************************************************
Data : nb points = 7392
grid size = 88 rows, 84 columns
Neighborhood system :
max neighb = 4
Default 1st-order neighbors (horizontal and vertical)
NEM parameters :
beta = 1.00 | nk = 5
Computing initial partition (sort variable 1) ...
criterion NEM = 22269.992 / Ps-Like = 7296.387 / Lmix = 9738.891
NEM converged after 443 iterations
> ## Not run:
> ##D arrayPlot(edgeNem, variable="ZoneNem", main="Spatial zones identified by nem", bar="v")
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>