Skip to content

MHC-I initial guess becomes all zeros for two-anchor inputs #7

Description

@jong3

Hi PMGen developers,

Thank you for releasing PMGen. We found a possible mismatch between the public MHC-I initial-guess implementation and Methods Section 2.3 of the paper.

We used the README-recommended command with the current master commit (f3f8c546ebb130fcb12b1bdc05c7081225f6fb54):

python run_PMGen.py \
  --mode wrapper \
  --run single \
  --df input.tsv \
  --output_dir output/ \
  --initial_guess

For standard MHC-I inputs with two anchors, AFfine/af2_util.py executes:

if len(full_anchors) == 2:
    all_positions *= 0.  # zero for mhc 1

This appears to zero the complete IG tensor, including all MHC and peptide-anchor coordinates.
Downstream, the IG is added to AlphaFold's default zero prev_pos, so an all-zero IG does not appear to encode anchor–MHC geometry.

However, Methods Section 2.3 states that all MHC coordinates and aligned peptide-anchor coordinates are retained, while only non-anchor peptide positions are masked.

We also noticed that the legacy parser indexes residues only by residue number, without chain ID:
resNo = int(line[22:26])
Because the standardized template chains M, B and P can share residue numbers, simply removing the global zeroing line may still cause chain-coordinate collisions.

Could you please clarify:

  1. Is the global zeroing intentional for two-anchor MHC-I inputs?
  2. Does the public code correspond to the MHC-I IG implementation used in the paper?
  3. What is the recommended code/configuration for retaining MHC and anchor coordinates as described in Methods Section 2.3?

References:

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions