tcrdist3 icon indicating copy to clipboard operation
tcrdist3 copied to clipboard

A to P change in CDR3 but no effect on distance

Open andreas-wilm opened this issue 9 months ago • 2 comments

Hi @kmayerb,

I came across a case, where two TCRs differ by an A to P change in their CDR3, but their distance is 0. How come?

>>> import pandas as pd
>>> from tcrdist.repertoire import TCRrep
>>> df = pd.DataFrame([
    ['TRAV13-1*01', 'TRAJ15*01', 'CAPTNQAGTALIF', 1],
    ['TRAV13-1*01', 'TRAJ15*01', 'CAATNQAGTALIF', 1]],
    columns=['v_a_gene', 'j_a_gene', 'cdr3_a_aa', 'count'])
>>> tr = TCRrep(cell_df = df, 
    organism = 'human', 
    chains = ['alpha'], 
    db_file = 'alphabeta_gammadelta_db.tsv')
>>> tr.pw_alpha, tr.pw_cdr3_a_aa
(array([[0., 0.],
        [0., 0.]]),
 array([[0, 0],
        [0, 0]], dtype=int16))

Many thanks, Andreas

PS: Tested with version 0.2.2

andreas-wilm avatar Jun 03 '24 16:06 andreas-wilm