{
  "filename": "NQO2_GO_decision_table.png",
  "iteration": 3,
  "description": "Render and auto-save the GO decision table figure as provenance",
  "timestamp": "2026-07-18 13:47:21",
  "code": "\nimport pandas as pd, matplotlib, os\nmatplotlib.use(\"Agg\"); import matplotlib.pyplot as plt\nprint(\"cwd:\", os.getcwd(), \"| writable:\", os.access(os.getcwd(), os.W_OK))\n\ngo_tbl = pd.DataFrame([\n [\"GO:0003955\",\"NAD(P)H dehydrogenase (quinone) activity\",\"IBA\",\"GO_REF:0000033\",\"REMOVE / NOT\",\n  \"Substrate-incorrect (NQO2 uses NRH); paralog carry-over; not ancestor of GO:0001512\"],\n [\"GO:0001512\",\"dihydronicotinamide riboside quinone reductase activity\",\"IDA(+IEA)\",\"PMID:18254726\",\"RETAIN\",\n  \"Matches NQO2 EC 1.10.5.1; already experimentally supported\"],\n], columns=[\"GO_ID\",\"Label\",\"Evidence\",\"Reference\",\"Action\",\"Rationale\"])\n\nfig,ax=plt.subplots(figsize=(12.5,2.0)); ax.axis(\"off\")\nt=ax.table(cellText=go_tbl.values, colLabels=go_tbl.columns, loc=\"center\", cellLoc=\"left\")\nt.auto_set_font_size(False); t.set_fontsize(8); t.scale(1,1.7)\nfor j in range(len(go_tbl.columns)): t[0,j].set_facecolor(\"#20303f\"); t[0,j].set_text_props(color=\"w\",weight=\"bold\")\nax.set_title(\"NQO2 (P16083) GO MF decision: REMOVE IBA GO:0003955 (NAD(P)H), RETAIN GO:0001512 (NRH)  |  structural basis: NQO1 has 43 extra C-term residues\",\n             fontsize=8.5, weight=\"bold\")\nplt.tight_layout()\nfor p in [\"NQO2_GO_decision_table.png\", os.path.join(os.getcwd(),\"NQO2_GO_decision_table.png\")]:\n    try: plt.savefig(p, dpi=150, bbox_inches=\"tight\"); print(\"saved:\",p); break\n    except Exception as e: print(\"fail\",p,repr(e))\nprint(go_tbl.to_string(index=False))\n"
}