Skip to content

Rebuild Supplementary Figure 1 as one bar per GPCR family - #11

Merged
AJPreto merged 1 commit into
mainfrom
PLIP_image_rebuild
Oct 8, 2026
Merged

AJPreto merged 1 commit into
mainfrom
PLIP_image_rebuild

Conversation

@AJPreto

@AJPreto AJPreto commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Supplementary Figure 1 (plip_visualizations.ipynb) now shows one bar per GPCR family instead of the 25 structures with the highest total interaction count. That selection showed only the upper end of the distribution, and bars were labelled with bare PDB ids (reviewer comment on the figure).
  • Each structure's PLIP counts are averaged over its docked poses; a family's bar is the mean over its structures (equal weight per structure). Bars are labelled with the family name and structure count.
  • Segments are now drawn to scale. The old plot added gaps between segments and inflated tiny ones to a minimum width, so bar length did not equal the interaction count.
  • The input is read from GUILD_FIGURES_DATA_DIR like the other figure notebooks. The old default pointed at plip_interactions_top25.tsv, which is not in the repo. The README documents the inputs.

New file: plip_families.py

PDB id to (family, protein) for the 133 case-study targets, taken from Supplementary Table 1. The table lists 6d9h, 7ld4, 6u1n, 7t11 and 7ul2 under two proteins each and omits 7v6a, 8dzs and 8fx5; the module resolves these from the ligand and UniProt mapping (see its docstring). It is a .py rather than a TSV because *.tsv is gitignored.

Review points

  • 7t11 (SSTR2) and 7ul2 (NTR1) are inferred, not confirmed. 6d9h/7ld4 (adenosine A1) and 6u1n (M2) are well supported.
  • The notebook keeps the original EXCLUDE_PROTEINS set (7v6a, 8fx5, 8wrz, 8wu1, 8dzs; 8wu1 is not in the file). The result is 26 families and 102 structures, and the vasopressin/oxytocin family drops out entirely. The reason for the exclusion is not recorded anywhere I could find.
  • Supplementary Table 1 itself still needs correcting in the manuscript.

Test plan

  • Ran the notebook end to end with GUILD_FIGURES_DATA_DIR pointing at the full plip_interactions.tsv (98,538 poses, 106 structures): 26 families, 102 structures, PNG/PDF/SVG written.
  • ruff/black were not installed in the environment, so they were not run.

🤖 Generated with Claude Code

The PLIP interaction figure showed the 25 structures with the highest total
interaction count, which selects the upper end of the distribution and labelled
bars with bare PDB ids. It now shows one bar per GPCR family (mean over the
family's structures, equal weight per structure), labelled with the family name
and structure count.

- plip_visualizations.ipynb: family chart; segments drawn to scale (no
  inter-segment gaps or minimum widths); input read from
  GUILD_FIGURES_DATA_DIR like the other figure notebooks.
- plip_families.py: PDB id -> (family, protein) for the 133 case-study targets,
  from Supplementary Table 1, with the five PDB ids it lists twice and the three
  it omits resolved (see the module docstring).
- README: document the figure's inputs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The notebook contains misleading provenance and inaccessible low-contrast labels.

2 open findings
What changed in this PR

Rebuilds Supplementary Figure 1 to compare mean PLIP interactions across GPCR families.

Changes:

  • Aggregates pose counts by structure, then family.
  • Adds the PDB-to-family mapping.
  • Documents inputs, exclusions, and provenance.
File Description
notebooks/​analysis/​plip_visualizations.ipynb Generates the family-level figure.
notebooks/​analysis/​plip_families.py Defines PDB family mappings.
notebooks/​analysis/​README.md Documents figure inputs and methodology.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

" edgecolor=\"white\", linewidth=0.4, zorder=2)\n",
" if val >= LABEL_MIN:\n",
" ax.text(left + val / 2, y_pos[i], f\"{val:.1f}\", ha=\"center\", va=\"center\",\n",
" fontsize=6, color=\"white\", fontweight=\"bold\", zorder=3)\n",
"DATA_PATH = Path(\"plip_interactions_top25.tsv\")\n",
"OUT_DIR = Path(\"plip_figures\")\n",
"OUT_DIR.mkdir(exist_ok=True)\n",
"# Inputs are external (Zenodo deposit), not committed -- see notebooks/analysis/README.md.\n",
@AJPreto
AJPreto merged commit b1a07b5 into main Oct 8, 2026
3 checks passed
@AJPreto
AJPreto deleted the PLIP_image_rebuild branch October 8, 2026 11:22
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.

2 participants