feat(fine-mapping): GWAS Catalog fine-mapping manifest generator#1270
Open
project-defiant wants to merge 4 commits into
Open
feat(fine-mapping): GWAS Catalog fine-mapping manifest generator#1270project-defiant wants to merge 4 commits into
project-defiant wants to merge 4 commits into
Conversation
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.
Summary
Adds a
FineMappingManifestdataset and aGWASCatalogFineMappingManifestGeneratorstep that joins the fine-mapping planner output with the GWAS Catalog study index to produce a single TSV manifest file — the input required by the downstream MultiSuSiE Nextflow pipeline.What's new
FineMappingManifestdataset (src/gentropy/dataset/fine_mapping.py) — newDataset-derived class with columnsrunId,studyId,route,summarystatsLocation,majorAncestry,traitFromSourceMappedIds(comma-joined, sorted, deduped).GWASCatalogFineMappingManifestGeneratorstep (src/gentropy/finemapping_manifest.py) — filters the study index to GWAS Catalog studies with sumstats + LD population structure, resolvesmajorAncestryviaLDAnnotator._get_major_population, joins with the planner output, and writes a single TSV viatoPandas().to_csv(). Optionalsummary_statistics_globoverridessummarystatsLocationwith live GCS paths.src/gentropy/config.py) —GWASCatalogFineMappingManifestConfigregistered asstep=gwas_catalog_finemapping_manifest.tests/gentropy/step/) — 2 orchestration (mocked) + 2 integration (real Spark): TSV content, schema, ancestry derivation, trait dedup/sort, missing-study warning.constraint.py,constraint_set.py) —HasAllowedMajorAncestrynow guards against null/emptyldPopulationStructurebefore indexing;_compute_major_ancestryusesLDAnnotator._get_major_populationdirectly;traitSetisarray_sort(array_distinct(...))for stable ordering.Real-data run (GWAS Catalog, release 26.06 sumstats susie study index — 214,716 studies)
The manifest was generated against the full GWAS Catalog study index using the planner output from the preceding step.
Fine-mapping plan (
gs://gwas_catalog_multi_ancestry_fine_mapping/plan/):runId)Manifest (
gs://gwas_catalog_multi_ancestry_fine_mapping/manifest.tsv):gs://gwas_catalog_inputs/harmonised_summary_statistics/GCST*A test manifest (4 triplet runs, 12 rows, traits EFO_0004309 / EFO_0004541 / EFO_0004611 / EFO_0004833) has been uploaded to
gs://ot_orchestration/tests/multi_ancestry_fine_mapping/manifest.tsvfor pipeline integration testing.