30% OFF Pro PlanClaim Now
API Documentation Background
🧬Developer Documentation

AlphaGenome API

Complete Developer Guide

Integrate powerful DNA sequence analysis and variant effect prediction into your applications with our Python SDK and REST API.

11Output Types
PythonSDK
RESTAPI

Quick Start

Get up and running with AlphaGenome in minutes

1

Install SDK

Install the Python package using pip

pip install dr7-alphagenome
2

Set API Key

Configure your authentication credentials

export DR7_API_KEY=your_key
3

Run Prediction

Make your first prediction from command line

alphagenome predict seq.fa
Full Python ExamplePython
from dr7_alphagenome import AlphaGenome

# Initialize the client
client = AlphaGenome(api_key="your_api_key")

# Predict from DNA sequence
sequence = "ATCGATCG..." * 125000  # 1Mb sequence
results = client.predict(
    sequence=sequence,
    modalities=["CAGE", "ATAC", "ChIP"],
    cell_types=["K562", "HepG2"]
)

# Get variant effect predictions
variant_effect = client.score_variant(
    chromosome="chr1",
    position=12345,
    ref="A",
    alt="G"
)

print(f"Variant effect score: {variant_effect.score}")
print(f"Affected tracks: {variant_effect.top_affected_tracks}")

Core API Capabilities

Powerful endpoints for comprehensive genomics analysis

🧬

Sequence Prediction

POST /v1/alphagenome/predict

Predict functional effects from raw DNA sequences. Returns predictions across 5,930 tracks covering gene expression, chromatin accessibility, and more.

Parameters:

  • β€’sequence: DNA sequence (up to 1Mb)
  • β€’modalities: List of output types (CAGE, ATAC, etc.)
  • β€’cell_types: Target cell types/tissues
  • β€’output_format: json, bigwig, or bedgraph
πŸ”¬

Variant Scoring

POST /v1/alphagenome/variant

Score the functional impact of genetic variants. Compare reference and alternate allele predictions to quantify variant effects.

Parameters:

  • β€’chromosome: Chromosome name (chr1-chr22, chrX, chrY)
  • β€’position: Genomic position (hg38)
  • β€’ref: Reference allele
  • β€’alt: Alternate allele
  • β€’window_size: Context window (default 100kb)
πŸ“Š

Batch Processing

POST /v1/alphagenome/batch

Process multiple sequences or variants in a single request. Ideal for VCF files or genome-wide studies.

Parameters:

  • β€’variants: List of variants or VCF file
  • β€’parallel: Enable parallel processing
  • β€’callback_url: Webhook for completion notification
  • β€’output_format: Output file format
πŸ—ΊοΈ

Region Query

GET /v1/alphagenome/region

Query predictions for a specific genomic region. Useful for visualizing predictions in a genomic browser.

Parameters:

  • β€’chromosome: Target chromosome
  • β€’start: Start position
  • β€’end: End position (max 1Mb range)
  • β€’tracks: Specific tracks to return

Code Examples

Learn by example with these common use cases

Basic Sequence Prediction

from dr7_alphagenome import AlphaGenome

client = AlphaGenome()

# Load sequence from FASTA file
results = client.predict_from_fasta(
    "input.fa",
    modalities=["CAGE", "ATAC", "DNase", "H3K27ac"],
    output_format="bigwig"
)

# Results are saved as BigWig files for visualization
for track in results.tracks:
    print(f"Saved: {track.output_path}")

Variant Effect Scoring

from dr7_alphagenome import AlphaGenome

client = AlphaGenome()

# Score a single variant
effect = client.score_variant(
    chromosome="chr17",
    position=7674220,  # Near TP53 gene
    ref="G",
    alt="A",
    window_size=100000  # Context around variant
)

print(f"Overall effect score: {effect.score:.4f}")
print(f"Gene expression change: {effect.expression_delta:.4f}")
print("Top affected cell types:")
for ct in effect.top_cell_types[:5]:
    print(f"  {ct.name}: {ct.score:.4f}")

Batch VCF Processing

from dr7_alphagenome import AlphaGenome

client = AlphaGenome()

# Score variants from VCF file
results = client.score_vcf(
    "variants.vcf",
    reference="hg38",
    output_file="scored_variants.tsv",
    include_tracks=["CAGE", "enhancer_activity"],
    parallel=True
)

print(f"Scored {results.total_variants} variants")
print(f"High-impact variants: {results.high_impact_count}")

# Filter for regulatory variants
regulatory = results.filter(
    min_score=0.5,
    affected_elements=["enhancer", "promoter"]
)
regulatory.to_dataframe().to_csv("regulatory_variants.csv")

REST API with curl

# REST API Example with curl

# Predict from sequence
curl -X POST https://api.dr7.ai/v1/alphagenome/predict \
  -H "Authorization: Bearer $DR7_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sequence": "ATCGATCG...",
    "modalities": ["CAGE", "ATAC"],
    "cell_types": ["K562"]
  }'

# Score variant
curl -X POST https://api.dr7.ai/v1/alphagenome/variant \
  -H "Authorization: Bearer $DR7_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chromosome": "chr1",
    "position": 12345,
    "ref": "A",
    "alt": "G"
  }'

Need Help with the API?

Ask our AI assistant for help with code examples, troubleshooting, or integration questions

AlphaGenome API Assistant API Technical Support

Experience Genomics AI

0/3 messages

AlphaGenome API Assistant

Ask me about API usage, code examples, troubleshooting, or integration questions

Best Practices

Optimize your AlphaGenome API usage

Sequence Length Optimization

Balance context length with processing time for optimal results.

  • βœ“Use 100kb-500kb windows for most applications
  • βœ“Full 1Mb context for long-range regulatory analysis
  • βœ“Smaller windows (50kb) for high-throughput variant scoring

Cell Type Selection

Choose relevant cell types to focus your analysis.

  • βœ“Select cell types matching your biological question
  • βœ“Use tissue-matched cell types for disease studies
  • βœ“Query available cell types with /v1/alphagenome/cell-types

Batch Processing Strategy

Efficiently process large datasets with batch endpoints.

  • βœ“Group variants by chromosome for efficient processing
  • βœ“Use async callbacks for large jobs (>1000 variants)
  • βœ“Consider output format based on downstream analysis

Error Handling

Build robust applications with proper error handling.

  • βœ“Implement exponential backoff for rate limits
  • βœ“Validate sequences before submission
  • βœ“Check variant positions against reference genome

Ready to Scale Your Genomics Analysis?

Get API access with higher rate limits, priority support, and advanced features.

100K+
Monthly API Requests
Priority
Technical Support
99.9%
Uptime SLA
Get API Access→

API FAQ

Common technical questions about the AlphaGenome API

What are the rate limits?

Free tier: 100 requests/day. Standard: 10,000 requests/day. Pro: 100,000 requests/day. Enterprise: Custom limits available. Rate limit headers are included in all API responses.

What input formats are supported?

The API accepts raw DNA sequences (A, T, C, G characters), FASTA format, genomic coordinates (hg38), and VCF files for batch variant scoring. Sequences can be up to 1Mb in length.

How do I handle long sequences?

For sequences longer than 1Mb, split them into overlapping windows and combine predictions. The SDK provides a sliding_window() helper function that handles this automatically.

What output formats are available?

JSON (default) for programmatic access, BigWig for genome browser visualization, BedGraph for text-based analysis, and TSV for tabular outputs. Batch jobs can also output compressed files.

How do I authenticate?

Use Bearer token authentication with your API key. Set the DR7_API_KEY environment variable or pass it directly to the client constructor. API keys can be managed in your Dr7.ai dashboard.

Is there a Python SDK available?

Yes! Install with 'pip install dr7-alphagenome'. The SDK provides a high-level interface for all API endpoints, automatic retries, streaming support, and helper functions for common workflows.