scirpy.ir_dist.metrics.IdentityDistanceCalculator
- class scirpy.ir_dist.metrics.IdentityDistanceCalculator(cutoff=0)
Calculates the Identity-distance between CDR3 sequences.
- The identity distance is defined as
0
, if sequences are identical1
, if sequences are not identical.
- Choosing a cutoff:
For this DistanceCalculator, per definition, the cutoff = 0. The
cutoff
argument is ignored.
- Parameters
Attributes
The sparse matrix dtype.
Methods
calc_dist_mat
(seqs[, seqs2])In this case, the offseted distance matrix is the identity matrix.
squarify
(triangular_matrix)Mirror a triangular matrix at the diagonal to make it a square matrix.