From f9df6abacb4eb2c06b59e6b6e6466139ba06e17d Mon Sep 17 00:00:00 2001 From: Alison Meynert Date: Fri, 10 Apr 2026 13:58:29 -0700 Subject: [PATCH 1/4] feat: register all new tools in main.py Register compute_haplotype_statistics, compute_haplotypes, compute_variation_ratios, create_fasta_and_index, create_gnomad_sites_vcf, extract_gnomad_afs, remap_divref, and rewrite_fasta in the defopt tool list. All 18 parametrized tests pass. Co-Authored-By: Claude Sonnet 4.6 --- divref/divref/main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/divref/divref/main.py b/divref/divref/main.py index 0e7127b..8ac18a5 100644 --- a/divref/divref/main.py +++ b/divref/divref/main.py @@ -5,10 +5,26 @@ import defopt +from divref.tools.compute_haplotype_statistics import compute_haplotype_statistics +from divref.tools.compute_haplotypes import compute_haplotypes +from divref.tools.compute_variation_ratios import compute_variation_ratios +from divref.tools.create_fasta_and_index import create_fasta_and_index +from divref.tools.create_gnomad_sites_vcf import create_gnomad_sites_vcf +from divref.tools.extract_gnomad_afs import extract_gnomad_afs from divref.tools.hello import hello +from divref.tools.remap_divref import remap_divref +from divref.tools.rewrite_fasta import rewrite_fasta _tools: List[Callable[..., None]] = [ + compute_haplotype_statistics, + compute_haplotypes, + compute_variation_ratios, + create_fasta_and_index, + create_gnomad_sites_vcf, + extract_gnomad_afs, hello, + remap_divref, + rewrite_fasta, ] From c947dd2d6d716c90b61e34749f86b458587e2fa4 Mon Sep 17 00:00:00 2001 From: Alison Meynert Date: Fri, 10 Apr 2026 14:13:05 -0700 Subject: [PATCH 2/4] chore: remove hello.py tool Co-Authored-By: Claude Sonnet 4.6 --- divref/divref/main.py | 2 -- divref/divref/tools/hello.py | 11 ----------- 2 files changed, 13 deletions(-) delete mode 100644 divref/divref/tools/hello.py diff --git a/divref/divref/main.py b/divref/divref/main.py index 8ac18a5..f7f9979 100644 --- a/divref/divref/main.py +++ b/divref/divref/main.py @@ -11,7 +11,6 @@ from divref.tools.create_fasta_and_index import create_fasta_and_index from divref.tools.create_gnomad_sites_vcf import create_gnomad_sites_vcf from divref.tools.extract_gnomad_afs import extract_gnomad_afs -from divref.tools.hello import hello from divref.tools.remap_divref import remap_divref from divref.tools.rewrite_fasta import rewrite_fasta @@ -22,7 +21,6 @@ create_fasta_and_index, create_gnomad_sites_vcf, extract_gnomad_afs, - hello, remap_divref, rewrite_fasta, ] diff --git a/divref/divref/tools/hello.py b/divref/divref/tools/hello.py deleted file mode 100644 index 775129f..0000000 --- a/divref/divref/tools/hello.py +++ /dev/null @@ -1,11 +0,0 @@ -def hello( - *, - name: str = "World", -) -> None: - """ - Print a greeting. - - Args: - name: The person to greet. - """ - print(f"Hello, {name}!") From 66f71b2d3a245df7b0b0d38cc26d1709dc6d5794 Mon Sep 17 00:00:00 2001 From: Alison Meynert Date: Fri, 10 Apr 2026 14:13:32 -0700 Subject: [PATCH 3/4] chore: update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0e5e367..2943aae 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,4 @@ !.pixi/config.toml # claude -**/claude +**/.claude From 0f92c31cd8853ee33c3cdb735d1250c5e78e282f Mon Sep 17 00:00:00 2001 From: Alison Meynert Date: Fri, 10 Apr 2026 14:13:43 -0700 Subject: [PATCH 4/4] feat: update README with description --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 31a1b86..e89110e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,13 @@ # Snakemake workflow implementation to create DivRef-style resource +This workflow is inspired by the [DivRef](https://github.com/e9genomics/human-diversity-reference) repository which is used to generate a bundle of FASTA sequences and a corresponding DuckDB index of common human variation. + +The original implementation is via a set of standalone Python scripts and a Makefile. +This implementation: +1. Wraps the Python scripts in a toolkit with added typing, improved parameterization, and added unit testing. +2. Adds a Snakemake workflow and associated configuration to drive the resource generation process. + ## Set up Environment The environment for this analysis is managed using `pixi`.