Skip to content

Commit

Permalink
Improve ResidueRepresentations docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
yutanagano committed Aug 20, 2024
1 parent dc12a66 commit 8f1a0a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sceptr/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ class ResidueRepresentations:
>>> import sceptr
>>> res_reps = sceptr.calc_residue_representations(tcrs)
>>> print(res_reps)
ResidueRepresentations[num_tcrs: 4, rep_dim: 64]
Now, we can iterate through the residue-level representation subarray corresponding to each TCR, and filter out/obtain the representations for the beta chain CDR3 sequence.
>>> cdr3b_reps = []
>>> for reps, mask in zip(res_reps.representation_array, res_reps.compartment_mask):
... # reps.shape == (M, D)
... # mask.shape == (M,)
... cdr3b_rep = reps[mask == 6] # collect only the residue representations for the beta CDR3 sequence
... cdr3b_reps.append(cdr3b_rep)
Expand Down

0 comments on commit 8f1a0a0

Please sign in to comment.