Skip to content

feat: annotate indel hits with edit type and query position (Indel Positions column)#27

Open
Roman-Young wants to merge 1 commit into
IEDB:masterfrom
Roman-Young:feature/indel-positions
Open

feat: annotate indel hits with edit type and query position (Indel Positions column)#27
Roman-Young wants to merge 1 commit into
IEDB:masterfrom
Roman-Young:feature/indel-positions

Conversation

@Roman-Young

Copy link
Copy Markdown
Contributor

Summary

Adds an Indel Positions output column for indel searches, annotating each hit with the edit type, residue, and 1-based query position as we discussed in our meeting.

Format

  • <d/i>: <residue>[<pos or range>] — e.g. d: A[6] (deletion of A at query position 6), i: X[6] (insertion of X before query position 6). Exact matches report [].
  • The deletion residue comes from the query; the insertion residue from the matched protein substring.
  • In a repeat the exact position is ambiguous (indistinguishable residues), so the inclusive range of all valid positions is reported — e.g. d: A[2,4]. (We chose a range over listing all possible starting positions).

Implementation

  • Computed purely in Python in _to_dataframe from (query, matched)
  • Follows the existing one-column-per-mode pattern: Indel Positions in indel mode, Mutated Positions otherwise, in the same schema slot. Mismatch/exact output is unchanged.

Scope

1-indel only (single-residue edits), matching the currently supported max_indels=1. Will be naturally extended to 2-indels soon.

Testing

  • Added hand-verified unit tests plus deletion/insertion end-to-end tests to ensure the output correctly matches the indel found.
  • Full suite green (44 tests).

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