Function SNFc
performs SNF but first a normalization over all objects
is performed before taking the k neighbours of each object as a subset in
obtaining the kernel matrix. The function is based on the functions affinityMatrix
and snf
from the SNFtool package.
SNFc(List,type=c("data","dist","clusters"), distmeasure = c("tanimoto",
"tanimoto"),normalize=FALSE,method=NULL,NN = 20, mu = 0.5, T = 20, clust =
"agnes", linkage = "ward",alpha=0.625,StopRange=FALSE)
A list of matrices of the same type.It is assumed the rows are corresponding with the objects.
Type indicates whether the provided matrices in "List" are either data matrices, distance matrices or clustering results obtained from the data. If type="dist" the calculation of the distance matrices is skipped and if type="clusters" the single source clustering is skipped. Type should be one of "data", "dist" or"clusters".
A vector of the distance measures to be used on each data matrix. Should be of "tanimoto", "euclidean", "jaccard","hamming".
Logical. Indicates whether to normalize the distance matrices or not.
This is recommended if different distance types are used. More details
on standardization in Normalization
.
A method of normalization. Should be one of "Quantile","Fisher-Yates", "standardize","Range" or any of the first letters of these names.
The number of neighbours to be used in the procedure.
The parameter epsilon. The value is recommended to be between 0.3 and 0.8.
The number of iterations.
Choice of clustering function (character). Defaults to "agnes".
Choice of inter group dissimilarity (character). Defaults to "ward".
The parameter alpha to be used in the "flexible" linkage of the agnes function. Defaults to 0.625 and is only used if the linkage is set to "flexible"
Logical. Indicates whether the distance matrices with values not between zero and one should be standardized to have so.
If FALSE the range normalization is performed. See Normalization
. If TRUE, the distance matrices are not changed.
This is recommended if different types of data are used such that these are comparable.
The returned value is a list with two elements:
The fused similarity matrix
The distance matrix computed by subtracting FusedM from one
The resulting clustering
WANG, B., MEZLINI, M. A., DEMIR, F., FIUME, M., TU, Z., BRUDNO, M., HAIBE-KAINS, B., GOLDENBERG, A. (2014). Similarity Network Fusion for aggregating data types on a genomic scale. Nature. 11(3) pp. 333-337. WANG, B., MEZLINI, M. A., DEMIR, F., FIUME, M., TU, Z., BRUDNO, M., HAIBE-KAINS, B., GOLDENBERG, A. (2014). SNFtool: Similarity Network Fusion. R package version 2.2
# NOT RUN {
data(fingerprintMat)
data(targetMat)
L=list(fingerprintMat,targetMat)
MCF7_SNFc=SNFc(list(fingerprintMat,targetMat),type="data",distmeasure=c("tanimoto",
"tanimoto"),normalize=FALSE,method=NULL,NN=10,mu=0.5,T=20,clust="agnes",linkage="ward"
,alpha=0.625,StopRange=FALSE)
# }
Run the code above in your browser using DataLab