Skip to content

Add analysis/replicate.sh — single-command driver for the primary analysis#1

Open
ppavlidis wants to merge 1 commit into
mainfrom
add-original-analysis-replicate-sh
Open

Add analysis/replicate.sh — single-command driver for the primary analysis#1
ppavlidis wants to merge 1 commit into
mainfrom
add-original-analysis-replicate-sh

Conversation

@ppavlidis
Copy link
Copy Markdown

Summary

Adds analysis/replicate.sh, a single-command driver for the original-submission pipeline. It mirrors the layout of revisions/replicate.sh (phases, DRY_RUN, PHASES filter, Keychain-based key resolution) but drives the scripts under analysis/strains/ (00–04) and analysis/cell_lines/ (00–07), preceded by the shared analysis/_downloads/download.R.

  • Phases: keysdownloadsstrainscells.
  • OPENAI_API_KEY resolves from the macOS Keychain, then a pre-set env var, then ~/openai/access_key.txt (the existing inst/gpt.py already supports the file path).
  • The 02 / 05 R scripts that submit OpenAI Batch jobs already block on completion via R/run_batches.R, so the bash driver does not need its own poll loop.
  • Kept deliberately separate from revisions/replicate.sh so the original and revision-round drivers do not drift.

Test plan

  • DRY_RUN=1 ./analysis/replicate.sh prints the full ordered command list across all four phases.
  • Live run on a fresh checkout (Keychain entry present) reproduces data-raw/strain_data/main_frame.rds and data-raw/cell_line_data/cell_line_inputs_second_pass.rds from a cold start.

🤖 Generated with Claude Code

…lysis

Mirrors the revisions/replicate.sh layout (phases + DRY_RUN + PHASES filter)
but drives the original-submission pipeline under analysis/strains/ (00–04)
and analysis/cell_lines/ (00–07), via the shared analysis/_downloads/
download. OPENAI_API_KEY is resolved from the macOS Keychain with
~/openai/access_key.txt and pre-set env var as fallbacks (inst/gpt.py
already supports the file path). The 02 / 05 R scripts that issue OpenAI
Batch jobs already block on completion via R/run_batches.R, so the bash
driver does not need a poll loop of its own.

Smoke-tested under DRY_RUN=1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ppavlidis ppavlidis requested a review from oganm May 25, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant