Skip to main content

AlphaGenome data extraction for GWASLab panel plots

Project description

gwaslab-alphagenome

Data-only bridge between AlphaGenome and GWASLab. Fetches predictions and converts them to GWASLab track bundles. No plotting — use gl.plot_panels in GWASLab.

Install

pip install gwaslab gwaslab-alphagenome
export ALPHA_GENOME_API_KEY=your_key

Usage

import gwaslab as gl
import gwaslab_alphagenome as glag

region = (1, 156538803, 157538803)  # hg38

panels = [
    gl.Panel(
        "ag_tracks",
        region=region,
        ag_spec=glag.Spec("RNA_SEQ", ontology_terms=["UBERON:0002048"]),
        filled=True,
    ),
    gl.Panel(
        "ag_tracks",
        region=region,
        ag_spec=glag.Spec("ATAC", ontology_terms=["UBERON:0002048"]),
    ),
]

fig, axes = gl.plot_panels(panels, region=region, save="locus.png")

gl.plot_panels calls glag.extract_batch() automatically when panels use ag_spec=.

LD reference + variant effect (linked SNP)

ctx = glag.resolve_variant(mysumstats.data, region_ref="rs429358", build="38")

panels = [
    gl.Panel("ag_overlay", region=region, variant_context=ctx,
             ag_spec=glag.Spec("RNA_SEQ", mode="overlay", ontology_terms=["UBERON:0002107"])),
    mysumstats.Panel("region", region=region, region_ref=ctx.region_ref,
                     vcf_path="ld.vcf.gz", build="38"),
]
gl.plot_panels(panels, region=region, variant_positions=[ctx.pos])

API

Function Role
glag.Spec(...) Describe output type, mode, ontology
glag.resolve_variant(sumstats, region_ref) Link GWAS lead SNP to overlay fetch
glag.extract_batch(region, specs, ...) Batched fetch + bundle conversion
glag.extract(region, spec, ...) Single-spec extract

Requirements

  • hg38 harmonized sumstats for variant-linked plots
  • ALPHA_GENOME_API_KEY environment variable

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gwaslab_alphagenome-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gwaslab_alphagenome-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file gwaslab_alphagenome-0.1.0.tar.gz.

File metadata

  • Download URL: gwaslab_alphagenome-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for gwaslab_alphagenome-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f5b0fee87949318ad11797b2b4181ea1c22247ac0df6d4db48aa9c0494e2f5e3
MD5 80ff81160151411635343c726c65b081
BLAKE2b-256 8564c6bd7bd25e9c5a2c4d2b3e6660bcbf96f2dbd0d47b6b850131a4f4e826af

See more details on using hashes here.

File details

Details for the file gwaslab_alphagenome-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gwaslab_alphagenome-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84bb08b8b171223edf70c5cf7e085a0a6d603488dbfbe4f596d5011e84fc8414
MD5 d3f9457855d2c9e68501314e1a66d0aa
BLAKE2b-256 781f537bd8064580aad421fe8a50a0f7fca79a189e9675b3bfed918723cc484c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page