Spaces:
Running on Zero
Count direct STRING links in the Studio gene preview
In CellGemma Studio, I opened Customize, selected CRISPR Knockdown, and checked the featured gene previews in Chrome. MYC showed 80 STRING links and DNMT1 showed 148. The API counts all rows in the bundled graph snippet, including links between two other genes. I counted 20 direct partners for each of the 12 featured targets. The displayed count changes for 18,403 of the 19,878 targets the endpoint accepts.
I changed the count to use distinct functional partners directly connected to the target and made the label explicit. All 12 featured previews now show 20 direct STRING links. The preview still draws at most ten. The returned partners, nodes, and edges match the original preview across all accepted targets in the bundled data.
python -m unittest discover -s tests fails on main and passes with the patch. The test covers both link orientations, repeated links, a self link, and links outside the target’s functional neighborhood. A separate pass over the bundled data reproduced the direct-partner counts.
🤖 Generated with Claude Code