Science Skills

repository·main·Indexed 25 days ago

https://github.com/google-deepmind/science-skills

A collection of agent skills for specialized scientific research tasks in genomics, structural biology, and cheminformatics. It provides structured instructions and scripts to extend AI agent capabilities, including integration with Google Antigravity. Featured skills include alphagenome-single-variant-analysis for regulatory and splicing analysis and alphafold-database-fetch-and-analyze for retrieving AlphaFold predicted structures and PAE matrices via UniProt Accession IDs.

Tokens
124.4K
Snippets
286
Records
585
Agent score
83%

What's inside Science Skills

  1. Reactome Analysis Service API Reference Overview

    main

    The Reactome Analysis Service provides endpoints for biological pathway analysis, identifier mapping, and species comparison. The base URL for all requests is https://reactome.org/AnalysisService.

    API Categories

    • Database: Retrieve database name and version.
    • Identifier: Analyze single identifiers across species or with projection to Homo sapiens.
    • Identifiers - Batch Analysis: Perform overrepresentation or expression analysis on multiple identifiers via POST (body), file upload, or URL.
    • Token - Result Retrieval: Use a token to retrieve, filter, or summarize analysis results.
    • Download: Export results in JSON, gzipped JSON, or CSV formats.
    • Mapping: Map identifiers across different species.
    • Import: Re-import previously exported JSON data.
    • Report: Download PDF reports.
    • Species Comparison: Compare Homo sapiens to other species.
  2. Perform 3D structural protein searches with Foldseek

    main

    The foldseek-structural-search skill allows you to perform 3D structural searches of proteins against various databases (such as PDB, AlphaFold, CATH, and MGnify) using the Foldseek web server API.

    Critical Requirement: This tool only works with physical 3D coordinate files. You must provide a path to a .cif, .mmcif, or .pdb file. It cannot search using protein sequences, gene names, or UniProt IDs. If you only have a sequence, you must first download the structure (e.g., using an AlphaFold fetch tool).

    Supported Databases: When specifying databases, you must choose from the following allowed list:

    • afdb50
    • afdb-swissprot
    • pdb100
    • BFVD
    • mgnify_esm30
    • cath50
    • gmgcl_id
    • bfmd
    • afdb-proteome
  3. Achieve precision using the `.exact` suffix

    main

    When searching for specific product names, drug names, or categorical terms, always append .exact to the field name. Without this, the API tokenizes multi-word values, leading to noisy partial matches.

    Example: Precise Brand Name Search

    uv run scripts/openfda_query.py search --category drug --endpoint label \
      --search 'openfda.brand_name.exact:"ADVIL"' \
      --limit 5 --output /tmp/advil_label.json

    Note on Variants: Many brand names include suffixes (e.g., "TYLENOL Extra Strength"). If an .exact search returns 0 results, try searching without .exact to identify the available variants, then re-query using the full exact name found.

    Aggregation: The .exact suffix is also required when using --count_field to ensure you are aggregating whole phrases rather than individual words.

    uv run scripts/openfda_query.py search --category drug --endpoint label \
      --search 'openfda.brand_name.exact:"ADVIL"' \
      --limit 5 --output /tmp/advil_label.json
  4. Handling Ensembl API rate limits and custom queries

    main
    If you are performing custom queries outside of the provided ensembl_api.py wrapper, you must respect the Ensembl REST API rate limits (maximum 15 requests per second). You must handle 429 Too Many Requests errors gracefully, for example by implementing exponential backoff. For a full list of available endpoints and parameters for custom implementations, refer to references/ensembl_rest_api_reference.md.
  5. Restoration constraints and complexity warnings

    main

    When performing text restoration, observe the following constraints and performance considerations:

    Constraints:

    • Minimum length: Input must be at least 25 characters (pad with - if shorter).
    • Invalid sequences: No consecutive ##. No adjacent ?# or #?.
    • Spaces: Spaces inside ? sequences count toward the total character count.
    • Multiple gaps: If the text contains #, specify how many characters to restore using --restore_max_len. If multiple damaged regions exist, it is recommended to restore them section by section for higher quality and speed.

    Complexity Warnings:

    • Restoration Complexity: If the input contains more than 10 ? characters, or uses # with --restore_max_len > 10, the process will be slow (roughly ~10s per additional ? on high-end CPUs).
    • Multi-window Splitting: If the input exceeds 750 characters, it will be split into multiple overlapping windows, which is significantly slower.
  6. Handle pagination and batching in ENCODE SCREEN GraphQL API

    main

    When using the ENCODE SCREEN GraphQL API (https://factorbook.api.wenglab.org/graphql), keep the following in mind:

    • Pagination/Limits: If a query is too large, it may return an error. To avoid this, split your requests by dividing coordinates or accessions into smaller chunks.
    • Composability: While multiple queries can be batched in a single request, it is often more efficient to use the provided Python script abstractions unless a highly specific custom GraphQL query is required.
  7. Use shorthand aliases for `--fields`

    main

    To keep API responses small and efficient, use shorthand aliases with the --fields parameter. This allows you to request specific data points without providing full JSON paths.

    Common Shorthand Aliases

    Data PointShorthand AliasFull JSON Path
    NCT IDNCTIdprotocolSection.identificationModule.nctId
    Short TitleBriefTitleprotocolSection.identificationModule.briefTitle
    Recruitment StatusOverallStatusprotocolSection.statusModule.overallStatus
    Short DescriptionBriefSummaryprotocolSection.descriptionModule.briefSummary
    Arms & InterventionsArmsInterventionsModuleprotocolSection.armsInterventionsModule.interventions
    Eligibility CriteriaEligibilityCriteriaprotocolSection.eligibilityModule.eligibilityCriteria
    Standard AgesStdAgeprotocolSection.eligibilityModule.stdAges

    Consult references/studies_schema.md for a complete list of available field paths.

  8. Standard sequence retrieval workflow cascade

    main

    When attempting to find a protein sequence, follow this priority order for maximum efficiency:

    1. Direct accession: fetch-protein (GenPept/RefSeq)
    2. CDS translation: cds-translate (nucleotide/CDS accession)
    3. PubMed-linked: pubmed-proteins (PMID + gene name)
    4. Locus lookup: locus-protein (locus tag + organism)
    5. Gene + organism: gene-protein (gene name + organism)
    6. Patent search: patent-search (patent number or keywords)
    7. Organism + length: organism-length (last resort)
  9. Paginate ChEMBL API results

    main

    All list endpoints support pagination using --limit and --offset.

    # First page: 2 results starting at offset 0
    uv run scripts/chembl_api.py molecule --limit 2 --offset 0 --output /tmp/page1.json
    
    # Second page: next 2 results starting at offset 2
    uv run scripts/chembl_api.py molecule --limit 2 --offset 2 --output /tmp/page2.json

    The response includes a page_meta object containing total_count, limit, offset, next, and previous links. Use successive --offset values to page through large result sets.

    uv run scripts/chembl_api.py molecule --limit 2 --offset 0 --output /tmp/page1.json
  10. When to use AlphaFold Database: Fetch and Analyze

    main

    This skill is designed to retrieve and analyze AlphaFold predicted structures (mmCIF) and Predicted Aligned Error (PAE) matrices for a specific UniProt Accession ID.

    Use this skill when:

    • You have a specific UniProt Accession ID.
    • You need structural confidence metrics (pLDDT).
    • You need domain boundary analysis or disorder assessment.

    Do NOT use this skill when:

    • The user only provides a protein name, gene name, or amino acid sequence (ask for a UniProt ID first).
    • The user wants to search for structural homologs (use Foldseek instead).
    • The user wants to run AlphaFold predictions on a custom sequence.
    • The user needs experimental PDB structures (use RCSB PDB instead).
  11. When to use the ClinVar Database skill

    main

    Use the ClinVar skill when you need to access the 'clinical ground truth' for human genomic variations, specifically for:

    • Finding current clinical significance (e.g., Pathogenic, Benign, VUS) and star ratings (review status).
    • Fetching clinician notes, assertion criteria, or rationales.
    • Retrieving preferred condition names and associated HPO terms.
    • Finding variant controls (e.g., searching for all Pathogenic variants in a specific gene).
    • Identifying conflicting interpretations and the organizations submitting them.

    Do NOT use ClinVar for:

    • Global population allele frequencies (use gnomAD).
    • Protein biological roles or inheritance patterns (use OMIM).
    • Predicting mechanistic effects of novel mutations (use AlphaGenome).
    • Patient surveillance schedules (use GeneReviews).
    • 3D structural models (use PDB / AlphaFold).