{"id":27586,"library":"alphagenome","title":"AlphaGenome","description":"A Python SDK developed by Google DeepMind for interacting with and visualizing genomic models. Currently at version 0.6.1, it supports interval scoring, in-silico mutagenesis, variant normalization, and sequence logo plotting. Requires Python >=3.10 and has a rapid release cadence (minor versions every few weeks).","status":"active","version":"0.6.1","language":"python","source_language":"en","source_url":"https://github.com/google-deepmind/alphagenome","tags":["genomics","deepmind","bioinformatics","DNA","machine-learning","SDK"],"install":[{"cmd":"pip install alphagenome","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core dependency for array operations","package":"numpy","optional":false},{"reason":"Required for plotting (seqlogo, tracks)","package":"matplotlib","optional":false},{"reason":"Used for data handling and anndata tidying","package":"pandas","optional":false},{"reason":"Required only for tidy_anndata functionality","package":"anndata","optional":true}],"imports":[{"note":"AlphaGenome is the main class; importing top-level package won't give you the class directly.","wrong":"import alphagenome","symbol":"AlphaGenome","correct":"from alphagenome import AlphaGenome"},{"note":"Interval is a top-level export, not in a submodule.","wrong":"from alphagenome.core import Interval","symbol":"Interval","correct":"from alphagenome import Interval"},{"note":"Variant is exported from the top-level package.","wrong":null,"symbol":"Variant","correct":"from alphagenome import Variant"}],"quickstart":{"code":"from alphagenome import AlphaGenome, Interval, GRCh38\nimport os\n\n# Initialize the model (requires API key via environment variable)\napi_key = os.environ.get(\"ALPHAGENOME_API_KEY\", \"\")\nmodel = AlphaGenome(api_key=api_key)\n\n# Define an interval and get predictions\ninterval = Interval(chrom=\"chr1\", start=10000, end=20000)\ntracks = model.predict_sequence(interval, genome=GRCh38)\nprint(tracks)\n","lang":"python","description":"Initialize a model, predict tracks for a genomic interval."},"warnings":[{"fix":"Use intervals >= 10kb or set a larger width. Remove any hardcoded 2kb assumptions.","message":"In v0.5.0, support for 2kb DNA sequence lengths was removed. AlphaGenome performs poorly with very short sequences, so any code relying on intervals < ~10kb may break or produce unreliable results.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"After upgrading to v0.6.0, verify that filtering by strand works as expected for both tracks and junctions.","message":"In v0.6.0, `filter_by_strand` on Output dataclass now correctly filters splice junctions. Previously only tracks were filtered; if your code depended on the old behavior (unfiltered junctions), update filtering logic.","severity":"deprecated","affected_versions":"<0.6.0"},{"fix":"Set the environment variable before using AlphaGenome: os.environ['ALPHAGENOME_API_KEY'] = 'your_key'","message":"The API key must be set via environment variable `ALPHAGENOME_API_KEY` or passed directly; otherwise calls will fail with authentication errors. The SDK does not prompt for a key.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from alphagenome import AlphaGenome` instead of `import alphagenome`.","cause":"Importing the top-level package without using the correct import statement.","error":"AttributeError: module 'alphagenome' has no attribute 'AlphaGenome'"},{"fix":"Use `from alphagenome import Interval`. Note that the class is named 'Interval' (not 'Interval' with capital I).","cause":"Misspelled class name or incorrect import path.","error":"ImportError: cannot import name 'Interval' from 'alphagenome'"},{"fix":"Increase interval length to >=10000, or ensure your interval spans sufficient base pairs.","cause":"In v0.5.0+ intervals shorter than 10kb are not supported.","error":"ValueError: Interval length must be at least 10000"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}