AlphaGenomeR authenticates every request to the AlphaGenome API with a personal API key. You pass that key directly toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BDB-Genomics/AlphaGenomeR/llms.txt
Use this file to discover all available pages before exploring further.
alphagenome_query() via the access_token parameter — no OAuth flow, no session management. Without a valid key the package stops immediately with a clear error.
Get an API key
API keys are issued by Google DeepMind through the AlphaGenome Science Page. Access is free for non-commercial research.Visit the AlphaGenome Science Page
Go to https://deepmind.google/science/alphagenome/ and click the link to request API access.
Complete the access request
Fill in your institution and intended research use. Google DeepMind reviews requests for non-commercial eligibility.
The AlphaGenome API is available for non-commercial research purposes only. Commercial use is not permitted under the terms of access.
Use your API key
Pass the key as theaccess_token argument to alphagenome_query():
access_token is a required parameter. If it is missing, alphagenome_query() stops immediately:
Store the key securely
Hardcoding secrets in scripts is a security risk, especially when sharing code or committing to version control. Use an environment variable instead.Set the environment variable
Add the following line to your Then restart your R session, or call
~/.Renviron file so R loads it automatically at startup:readRenviron("~/.Renviron") to reload without restarting.Error handling
| Condition | Error message |
|---|---|
access_token argument is missing | API key is not provided. |
genomic_region argument is missing | Genomic region is not provided. |
| AlphaGenome Python package not installed | The 'alphagenome' Python package is not installed. Please run: pip install alphagenome |
Sys.getenv("ALPHAGENOME_API_KEY") returns an empty string because the variable was not set, alphagenome_query() will receive an empty access_token and the API itself will reject the request. Validate before calling if you want a cleaner error: