Skip to content

refactor: classify isotype before EU-numbered Fc allotype detection - #8

Merged
partrita merged 3 commits into
mainfrom
feat/eu-fc-allotype
Aug 20, 2026
Merged

refactor: classify isotype before EU-numbered Fc allotype detection#8
partrita merged 3 commits into
mainfrom
feat/eu-fc-allotype

Conversation

@partrita

Copy link
Copy Markdown
Owner

변경 요약

constant-domain 분석 순서를 다음과 같이 명확하게 분리했습니다.

  1. Isotype 우선 판정: CH1/N-terminal constant-region signature를 사용해 IgG/IgA/IgM/IgE/IgD 또는 Kappa/Lambda를 먼저 결정합니다.
  2. Subclass 판정: 선택된 isotype 안에서만 C-gene reference를 비교하여 IgG1/2/3/4 등의 subclass를 결정합니다.
  3. EU numbering 기반 allotype 판정: 선택된 subclass의 C-domain을 reference sequence와 global alignment한 뒤, allotype marker의 eu_position을 canonical 좌표로 사용해 query 위치를 찾습니다. Fc(CH2/CH3)의 G1m/G2m/G3m/G4m marker도 더 이상 raw subclass_offset으로 직접 찾지 않습니다.

주요 구현

  • src/abcat/cdomain.py
    • isotype/subclass 매칭 로직 분리
    • explicit EU reference origin 추가
      • IgG1/2/3/4: EU 118
      • IgE: EU 99
      • IGKC: EU 109
    • allotype 결과의 matched_residuesEU_214, EU_356 같은 canonical 좌표를 사용
    • legacy subclass_offset은 allotype lookup에서 사용하지 않음
    • marker를 관찰할 수 없는 경우 absent와 구분해 inconclusive 반환
  • tests/test_cdomain_eu.py
    • isotype → subclass 순서 검증
    • legacy subclass_offset를 제거해도 EU position만으로 G1m17이 올바르게 검출되는지 검증

기존 G1m17/G1m1 및 engineered antibody 테스트와 호환되도록 기존 marker 데이터 형식은 유지했습니다.

@partrita
partrita merged commit 5e0c151 into main Aug 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant