{ "cells": [ { "cell_type": "markdown", "id": "fc1b8581", "metadata": { "language": "markdown" }, "source": [ "# TCRen potential & contact-statistics analysis\n", "\n", "Reproduces the core TCRen-manuscript analyses from the committed contact data\n", "(`data/contact_maps_PDB.csv` + `data/summary_PDB_structures.csv`):\n", "\n", "- the TCRen potential (re-derived) and its agreement with the published values;\n", "- the Miyazawa-Jernigan and Keskin reference potentials;\n", "- the distribution of TCR-peptide contacts per structure and per TCR region;\n", "- how contacts distribute over peptide and CDR3 positions as a function of length." ] }, { "cell_type": "code", "execution_count": 1, "id": "20a57c9e", "metadata": { "execution": { "iopub.execute_input": "2026-06-12T07:24:11.181863Z", "iopub.status.busy": "2026-06-12T07:24:11.181788Z", "iopub.status.idle": "2026-06-12T07:24:11.917509Z", "shell.execute_reply": "2026-06-12T07:24:11.917273Z" }, "language": "python" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "python 3.12.12 | polars 1.39.3 | tcren 0.1.0\n" ] }, { "data": { "text/html": [ "
| pdb.id | chain.type.from | region.type.from | residue.aa.from | residue.aa.to | peptide_pos | peptide_len | cdr3_len |
|---|---|---|---|---|---|---|---|
| str | str | str | str | str | i64 | u32 | u32 |
| "5m01" | "TRA" | "CDR3" | "Y" | "K" | 0 | 9 | 12 |
| "5m01" | "TRA" | "CDR3" | "Y" | "K" | 0 | 9 | 12 |
| "5m01" | "TRA" | "CDR3" | "Y" | "A" | 1 | 9 | 12 |
| "5m01" | "TRA" | "CDR3" | "Y" | "A" | 1 | 9 | 12 |
| "5m01" | "TRA" | "CDR3" | "G" | "A" | 3 | 9 | 12 |