Skip to main content
`Ctrl`+`K`

# Sequence distance metrics (`skbio.sequence.distance`)

This module provides functions for computing distances between biological sequences. These functions can be used directly on two `Sequence` objects, or supplied to other parts of the scikit-bio API that accept a sequence distance metric as input, such as `align_dists`, `Sequence.distance`, and `PairwiseMatrix.from_iterable`.

## Generic distance metrics

`hamming` | Compute the Hamming distance between two sequences.
`pdist` | Calculate the p-distance between two aligned sequences.
`logdet` | Calculate the LogDet distance between two aligned sequences.
`paralin` | Calculate paralinear distance between two aligned sequences.
`kmer_distance` | Compute the k-mer distance between a pair of sequences.

## Nucleotide distance metrics

`jc69` | Calculate the JC69 distance between two aligned nucleotide sequences.
`f81` | Calculate the F81 distance between two aligned nucleotide sequences.
`k2p` | Calculate the K2P distance between two aligned nucleotide sequences.
`f84` | Calculate the F84 distance between two aligned nucleotide sequences.
`tn93` | Calculate the TN93 distance between two aligned nucleotide sequences.