Formula: SNP-distance + linkage threshold
Details
Pairwise SNP distances are computed on the aligned sequences and isolates are joined into a cluster whenever ANY pair is within the threshold – single linkage, which is what makes the result a transitive closure rather than a set of cliques. A threshold of zero leaves every distinct sequence on its own; a threshold at least as large as the diameter collapses everything into one cluster.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Cluseq(V)
#> $estimate
#> [1] 1
#>
#> $z
#> [1] 0 0 0 0 0 0 0 0
#>
#> $counts
#> [1] 8
#>
#> $n_clusters
#> [1] 1
#>
#> $distances
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 0 1 1 1 1 1 1 1
#> [2,] 1 0 1 1 1 1 1 1
#> [3,] 1 1 0 1 1 1 1 1
#> [4,] 1 1 1 0 1 1 1 1
#> [5,] 1 1 1 1 0 1 1 1
#> [6,] 1 1 1 1 1 0 1 1
#> [7,] 1 1 1 1 1 1 0 1
#> [8,] 1 1 1 1 1 1 1 0
#>
#> $max_distance
#> [1] 1
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "SNP-distance single-linkage sequence clustering"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
