Skip to content

Use gnomAD Toolbox for variant frequencies - #65

Draft
bradwbradw with Copilot wants to merge 6 commits into
mainfrom
copilot/move-graphql-api-requests-to-gnomad-toolbox
Draft

Use gnomAD Toolbox for variant frequencies#65
bradwbradw with Copilot wants to merge 6 commits into
mainfrom
copilot/move-graphql-api-requests-to-gnomad-toolbox

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Replace unreliable client-side gnomAD GraphQL requests with backend gnomAD Toolbox retrieval while retaining locally stored frequency data as an outage fallback.

  • Backend retrieval

    • Add gnomad-toolbox dependency.
    • Query the gnomAD v4.1 joint dataset per variant.
    • Map all existing frequency fields: af_tot, ac_tot, an_tot, hom_tot, and hemi_tot.
    • Preserve the existing gnomadFrequencies response shape, including id and nested variant.
  • Fallback behavior

    • Fall back to GenomicGnomadFrequency when Toolbox/Hail access fails.
    • Add an API error note when local data is returned.
  • Frontend

    • Consume gnomadFrequencies from the variant endpoint.
    • Remove the direct GraphQL request and artificial loading delay.
gnomadFrequencies = {
    "id": variant.id,
    "variant": VariantSerializer(variant).data,
    **get_gnomad_toolbox_frequencies(variant.variant_id),
}

Co-authored-by: bradwbradw <4715252+bradwbradw@users.noreply.github.com>
Copilot AI changed the title [WIP] Move from GraphQL API requests to gnomAD toolbox Use gnomAD Toolbox for variant frequencies Sep 4, 2026
Copilot AI requested a review from bradwbradw September 4, 2026 03:46
Copilot AI and others added 4 commits September 5, 2026 00:58
Co-authored-by: bradwbradw <4715252+bradwbradw@users.noreply.github.com>
Co-authored-by: bradwbradw <4715252+bradwbradw@users.noreply.github.com>
Co-authored-by: bradwbradw <4715252+bradwbradw@users.noreply.github.com>
Co-authored-by: bradwbradw <4715252+bradwbradw@users.noreply.github.com>
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.

move from graphql API requests to gnomAD toolbox

2 participants