Repository navigation
Rebuild Supplementary Figure 1 as one bar per GPCR family - #11
Merged
Merged
Conversation
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]>
Contributor
There was a problem hiding this comment.
🟡 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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
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).GUILD_FIGURES_DATA_DIRlike the other figure notebooks. The old default pointed atplip_interactions_top25.tsv, which is not in the repo. The README documents the inputs.New file:
plip_families.pyPDB id to (family, protein) for the 133 case-study targets, taken from Supplementary Table 1. The table lists
6d9h,7ld4,6u1n,7t11and7ul2under two proteins each and omits7v6a,8dzsand8fx5; the module resolves these from the ligand and UniProt mapping (see its docstring). It is a.pyrather than a TSV because*.tsvis gitignored.Review points
7t11(SSTR2) and7ul2(NTR1) are inferred, not confirmed.6d9h/7ld4(adenosine A1) and6u1n(M2) are well supported.EXCLUDE_PROTEINSset (7v6a,8fx5,8wrz,8wu1,8dzs;8wu1is 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.Test plan
GUILD_FIGURES_DATA_DIRpointing at the fullplip_interactions.tsv(98,538 poses, 106 structures): 26 families, 102 structures, PNG/PDF/SVG written.ruff/blackwere not installed in the environment, so they were not run.🤖 Generated with Claude Code