Wednesday, February 4, 2026

Repost: OpenAI Codex App: Vibe-updating my old qqman R package to ggplot2 with plan+execute.

Reposted from the original at https://blog.stephenturner.us/p/openai-codex-app-qqman.

Earlier this week I reposted a Bluesky post from Ethan Mollick. I’m on the same page here — there are problems for sure, but these tools have irreversibly changed the practice of software development (and IMHO, for the better on balance).

Claude Code has gotten everyone excited recently (including me), even going so far as to make it into the popular press (see the Atlantic article on CC). Codex has been around for a while, but this looks like OpenAI’s attempt to challenge CC’s position.

The new Codex desktop app

This week OpenAI launched a dedicated Codex desktop app positioned as a focused UI for running multiple agents in parallel, keeping changes isolated via built-in worktrees, and extending behavior with skills and scheduled automations. Like the demo I highlighted in my previous post on Claude Code, Codex uses worktrees to isolate tasks/PRs as primitives for conflict resolution, has a plan mode (/plan) to force upfront decomposition and questions, can use skills as reusable bundles that can connect to external services, and has automations for recurring background jobs.

Download it at openai.com/codex. It’s free to use for some unspecified time. Or works with your Plus/Enterprise/Edu/whatever account.

Demo: updating qqman to use ggplot2

My most highly cited paper is about some R code I wrote 15 years ago, and later turned into a package, for creating Manhattan Plots from GWAS data. The paper in JOSS has been cited ~1000 times, and the preprint another ~2100 times.

Turner, S. D. (2018). qqman: an R package for visualizing GWAS results using Q-Q and manhattan plots. Journal of Open Source Software, 3(25), 731. https://doi.org/10.21105/joss.00731.

I wrote the original code using ggplot2, then refactored everything to use base R, because at the time, at least with how I wrote the package, plotting millions of points with ggplot2 as agonizingly slow.

I’ve gotten lots of feature requests for qqman, and I don’t have time to respond to them unfortunately. Many of these feature requests would be easy to implement if the package did in fact use ggplot2, since it’s been so long since I’ve done anything in base R that I’ve forgotten how to do pretty much anything.

So I fired up the Codex app, put it into “plan” mode, and asked for help. Along the way it asks me questions about my preferences.

Here’s a screenshot of the plan (truncated).

#YOLO, implement the plan.

When I rebuilt the package, there were a few of those “no visible global binding for global variable…” notes that I had to fix, but otherwise everything worked. Everything now uses ggplot2. The function returns a ggplot object. Column names are no longer as strict. It’s fast. It uses ggrepel to label points so that they don’t overlap. Documentation was updated. The README was updated. The vignettes were updated. It went off and did this in about 5 minutes.

Here’s one of the plots that comes out of this.

I’m not going to update the package, because I still don’t have time to maintain it or respond to feature requests. But that shouldn’t stop you if there’s something you want to do with qqman or any other open-source R/Python package that the package doesn’t currently do.

 

 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Creative Commons License
Getting Genetics Done by Stephen Turner is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.