Skip to content

Commit bd208d0

Browse files
authored
chothia numbering support (#175)
update get_numbering_dict() function in netam/netam/oe_plot.py - Update docstring to document checks parameter options (imgt, chothia, None) - Add elif checks == "chothia": validation block, empty for now but with comment for future cases
1 parent b157b35 commit bd208d0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

netam/oe_plot.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,10 @@ def get_numbering_dict(anarci_path, pcp_df=None, verbose=False, checks="imgt"):
11951195
pcp_df (pd.Dataframe): PCP file to filter for relevant clonal families and check ANARCI sequence lengths.
11961196
verbose (bool): whether to print (sample ID, family ID) info when clonal family is excluded.
11971197
checks (str): perform checks and updates for a specified numbering scheme.
1198-
Currently, 'imgt' is the only input that has an effect.
1198+
Options:
1199+
- 'imgt': Validates IMGT-specific insertions and CDR annotations
1200+
- 'chothia': Skips validation (can add Chothia-specific checks later)
1201+
- None or empty string: Skips all validation
11991202
12001203
Returns:
12011204
Two dictionaries where the keys are 2-tuples of (sample_id, family).
@@ -1282,6 +1285,16 @@ def get_numbering_dict(anarci_path, pcp_df=None, verbose=False, checks="imgt"):
12821285
if exclude:
12831286
continue
12841287

1288+
elif checks == "chothia":
1289+
# Chothia-specific validation checks not yet implemented.
1290+
# Chothia CDR boundaries differ between heavy and light chains:
1291+
# - Heavy: CDR1 (26-32), CDR2 (52-56), CDR3 (95-102)
1292+
# - Light: CDR1 (24-34), CDR2 (50-56), CDR3 (89-97)
1293+
# Will need chain-specific is_chothia_cdr() function or
1294+
# pass chain type to validation logic.
1295+
# See issue #185 for implementation plan.
1296+
pass
1297+
12851298
numbering_dict[(sample_id, family)] = numbering
12861299

12871300
# keep track of which site numbers are used

0 commit comments

Comments
 (0)