Skip to content

Commit 86f4514

Browse files
committed
Document shared TCRBLOSUM distance offset
1 parent 8a7640e commit 86f4514

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/scirpy/ir_dist/metrics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,9 @@ def __init__(
13461346
else:
13471347
raise ValueError("`chain_type` must be 'VJ' or 'VDJ' when `base_matrix='tcrblosum'`.")
13481348

1349+
# Use one `distance_offset` across alpha and beta matrices so equal substitution scores
1350+
# map to equal distances for both chain types. This keeps VJ and VDJ distances on a
1351+
# shared scale for clonotype clustering.
13491352
off_diagonal = ~np.eye(len(self.matrix_alphabet), dtype=bool)
13501353
max_score = int(
13511354
max(

0 commit comments

Comments
 (0)