Repo cleanup: fix seed bug, portable paths, docs - #1
Open
trvrb wants to merge 5 commits into
Open
Conversation
No environment spec existed. environment.yml pins the Python side (msprime, tsinfer, tsdate, tskit, treetime, augur, bio2zarr); install_packages.R covers the R/GAIA + plotting side; .gitignore excludes generated pipeline artifacts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
sweep/base/make_dfs.ipynb: sim() read a module-level seed=50 for every simulation, so the per-combo seed from sim_sweep_parallel() was ignored. Thread seed through run_cell -> simulate_one -> sim(), matching make_dfs_5reps.ipynb. Add top overview/known-issues markdown cells to make_dfs, make_dfs_5reps, and make_geo_dfs documenting purpose, params, outputs, and stale-output caveats. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace active setwd()/root.dir/absolute read.csv() calls with here::here(...) so the .Rmd files knit from any checkout, and tidy the commented ones (which pointed at a non-existent sweep_height_long/ dir). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change snake/Snakefile's height to (distance/2)/mu to match ctrl/Snakefile and t.time(u) on the sim/inf side; the old (total_branch_length - distance)/mu was not comparable, since total_branch_length() is the sum of all branches, not tree height. (control/all.py, a broken superseded Snakefile, was also removed.) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Rewrite the top-level, sweep/, and migration/ READMEs (project motivation, pipelines, params, setup) and fix their dead links (stagger/island dirs that don't exist, empty () links). Add sub-READMEs for control/, merge_trees/, and clades/, and a KNOWN_ISSUES.md consolidating fixed vs open caveats (stale outputs, gene-conversion follow-up, confounded GAIA-vs-DTA comparison, sweep-vs-in_terminal divergence, height formula, etc). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member
Author
|
@nmmahmed --- take this or leave it as you see fit. This was me pointing Claude Code at your repo and asking it to clean things up and to document. Reviewing Claude's PR, things I'd flag:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Via Claude
Summary
Repository cleanup pass — no scientific reimplementation. Fixes a few high-impact bugs, makes the repo reproducible and navigable, and writes real documentation. No pipelines were re-run (msprime/R are cluster-scale and unavailable locally), so results-changing fixes are made in code and the now-stale committed outputs are flagged, not deleted. See
KNOWN_ISSUES.md.Fixes
sweep/base/make_dfs.ipynb):sim()read a module-levelseed = 50for every simulation, so the per-combo seed fromsim_sweep_parallel()was ignored (no independent draws across the grid). Now threadedrun_cell → simulate_one → sim(), matching the already-correctmake_dfs_5reps.ipynb./home/nahmed/...paths: all activesetwd()/root.dir/absoluteread.csv()in the.Rmdfiles now usehere::here(...); commented ones (pointing at a non-existentsweep_height_long/) tidied.migration/sweep/control/all.py(broken early-draft Snakefile — Python insideshell:blocks, mismatched I/O).ctrl/Snakefileandsnake/Snakefileto(distance/2)/mu(comparable tot.time(u)on the sim/inf side); the old(total_branch_length - distance)/muwas not.Reproducibility + docs
environment.yml,install_packages.R,.gitignore.sweep//migration/READMEs (fixed deadstagger/islandand empty()links); added sub-READMEs forcontrol/,merge_trees/,clades/.KNOWN_ISSUES.mdconsolidating fixed vs. open caveats (stale outputs to regenerate; confounded GAIA-vs-DTA comparison;sweep/vsin_terminal/divergence; unseeded sample counts; perfect-separation in logistic fits; etc.).Notes for review
make_dfs.ipynbdiff is large becauseNotebookEditnormalized the 3 edited cells'sourceto a single string and reset theirexecution_count; no cells/outputs were lost and the notebook validates.all.pydeletion landed in the scaffolding commit (it was pre-staged viagit rm); functionally fine.Test plan
setwd/root.dir//home/nahmedpaths remainenvironment.ymlis valid YAML; all README relative links resolve🤖 Generated with Claude Code