--- license: cc-by-4.0 task_categories: - other tags: - biology - protein-structure - MHC - HLA - peptide - binding-affinity - rosetta - immunology pretty_name: pHLA Binding Affinity with Rosetta FlexPepDock Structures size_categories: - 10K10 nM | Drop both entries | | Two entries, both have PubMed IDs, values differ by <10 nM | Retain one entry (first occurrence) | | Two entries, both have PubMed IDs, values conflict (≥10 nM difference) | Flag both for manual review | | More than two entries | Drop entries lacking PubMed IDs first; if >2 remain, retain the entry closest to the median measurement value | | Any other ambiguous case | Flag for manual review | Entries that could not be unambiguously resolved were written to a separate `flagged_IEDB_data.csv` file for each allele and excluded from the cleaned dataset. These correspond to the `flagged = True` entries in `metadata.csv`. ### 3. Sequence-Level Filtering After deduplication, peptide sequences containing the `+` character (used by IEDB to denote non-canonical or modified amino acids) were excluded from the final FASTA output and downstream structure generation. ### 4. Outputs per Allele For each allele, the pipeline produced: - `{allele}_cleaned_IEDB_data.csv` — deduplicated, unflagged entries retained for structure modeling - `{allele}_flagged_IEDB_data.csv` — ambiguous entries excluded from modeling but retained for reference - `{allele}_IEDB_data.fasta` — peptide sequences in FASTA format for input to Rosetta FlexPepDock These per-allele files were generated in filesystem-safe allele directories (e.g., `HLA-A_01_01/` for `HLA-A*01:01`) within the working directory at the time of pipeline execution. ### 5. Manual Review Checkpoint By default, the pipeline pauses after generating per-allele cleaned and flagged CSVs to allow manual literature review of flagged entries before structure generation proceeds. In this dataset, flagged entries were reviewed and those confirmed as erroneous or unresolvable were excluded. The `--skipReview` flag bypasses this checkpoint when manual review is not required. --- ## Computational Methods 3D structures were generated using **Rosetta FlexPepDock** with 25 decoys per peptide–allele pair. Input structures were prepared by threading the peptide sequence of interest onto a template pHLA structure and performing flexible peptide docking. All decoy structures and their associated Rosetta energy scores are stored in per-peptide Rosetta silent files (`structures/{allele}/{peptide}.silent`). Scores are reported as `total_score` (Rosetta Energy Units, REU) and are embedded directly in the silent file alongside the decoy coordinates. Summary statistics (min, mean) across the 25-decoy ensemble are precomputed and included in `metadata.csv`. Individual decoy structures can be extracted from silent files using `extract_pdbs` from the Rosetta toolkit. --- ## Known Limitations and Caveats **Binding measurement caveats:** - IC50 values show large spikes at 20,000 nM and 70,000 nM, consistent with assay detection limits. These values should be treated as censored (i.e. greater than the reported value) rather than exact measurements. - Kd values show analogous saturation at 5,000 nM and 20,000 nM for the same reason. - IC50 and Kd are not directly comparable and have not been normalized or converted between each other. Both are retained with `measurement_type` indicating which was recorded. **Structure caveats:** - All 3D structures are computationally generated; no experimental validation has been performed. - RMSD values embedded in silent files are calculated relative to the threaded template input, not to any experimental reference structure, and should not be interpreted as a measure of model accuracy. - The best-scoring Rosetta decoy is not guaranteed to represent the native-like conformation. **Coverage caveats:** - Allele representation is highly uneven: `A*02:01` accounts for ~9,500 entries (~19% of the dataset), while several alleles have fewer than 10 entries. - The dataset covers HLA class I only (HLA-A and HLA-B). HLA-C and class II alleles are not included. - The `assay_pdb_id` column references experimental structures deposited in the PDB as recorded by IEDB; these structures are not included in this dataset. --- ## License This dataset is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). You are free to share and adapt the material for any purpose, provided appropriate credit is given. Experimental binding data is sourced from the [Immune Epitope Database (IEDB)](https://www.iedb.org), which is also available under CC BY 4.0. Please cite IEDB if you use this dataset: > Vita R, Mahajan S, Overton JA, et al. The Immune Epitope Database (IEDB): 2018 update. *Nucleic Acids Research*. 2019;47(D1):D339–D343. https://doi.org/10.1093/nar/gky1006 --- ## Usage Example ```python import pandas as pd from pathlib import Path # Load metadata df = pd.read_csv("metadata.csv") # Filter to unflagged IC50 entries below detection limit df_clean = df[ ~df["flagged"] & (df["measurement_type"] == "IC50") & (df["measurement_value"] < 20000) ] print(f"{len(df_clean)} clean IC50 entries") print(f"Alleles: {df_clean['allele'].nunique()}") print(f"Unique peptides: {df_clean['peptide'].nunique()}") # Locate the silent file for a specific peptide-allele pair silent_file = Path("structures/A0101/FHEFLSSKL.silent") print(f"Silent file exists: {silent_file.exists()}") # To extract individual PDB structures, use Rosetta's extract_pdbs: # extract_pdbs.linuxgccrelease -in:file:silent structures/A0101/FHEFLSSKL.silent ```