This function calculates different dissmilarity/distance indices of sequences.

1 2 3 | ```
sequences.distance(sequences = NULL, groups = NULL,
method = c("levenshtein", "cosine", "q-gram", "jaccard", "ja-wi",
"dam-le", "hamming", "osa", "lcs"), divLength = FALSE)
``` |

`sequences` |
Vector containing sequences |

`groups` |
Vector containing names of different samples (if present) |

`method` |
Dissmilariy method (see details) |

`divLength` |
Divide sequences into subsets of the same sequence length? (default: FALSE) |

This function calculates dissmiliarity/distance indices based on sequences. Levenshtein, cosine, q-gram, Jaccard, Jaro-Winker (`ja-wi`

), Damerau-Levenshtein (`dam-le`

), Hamming, Optimal string alignment (`osa`

) and longest common substring (`lcs`

) distance can be chosen. For details see `stringdist-metrics`

.

Output is a distance matrix containing dissimilarity indices/distances between sequences.

Julia Bischof

van der Loo M (2014). The stringdist package for approximate string matching. The R Journal, 6, pp. 111-122. https://CRAN.R-project.org/package=stringdist

`dist.PCoA`

, `plotDistPCoA`

, `geneUsage.distance`

1 2 3 4 5 6 7 8 9 | ```
## Not run:
data(clones.ind)
data(clones.allind)
dist1<-sequences.distance(sequences = clones.ind$unique_CDR3_sequences_AA,
method = "levenshtein", divLength=TRUE)
dist2<-sequences.distance(sequences = clones.allind$unique_CDR3_sequences_AA,
groups = clones.allind$individuals, method = "cosine", divLength=FALSE)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.