This function provides two methods to construct the similarity graph.
getGraph(counts, mydist, K, graph.type = "mstree")
A K by 2 matrix, where K is the number of distinct values. It specifies the counts in the K distinct values for the two samples.
A K by K matrix, which is the distance matrix on the distinct values.
Set the value of k in "k-MST" or "k-NNL" to construct the similarity graph.
Specify the type of the constructing graph. The default value is "mstree", which means constructing the minimal spanning tree as the similarity graph. Set this value to "nnlink" to construct the similarity graph by the nearest neighbor link method.
An edge matrix representing a similarity graph on the distinct values with the number of edges in the similarity graph being the number of rows and 2 columns. Each row records the subject indices of the two ends of an edge in the similarity graph.