### Quick Start Examples Source: https://github.com/google-deepmind/science-skills/blob/main/skills/human_protein_atlas_database/SKILL.md These examples demonstrate basic usage for resolving Ensembl IDs and retrieving subcellular locations. All commands write JSON output to disk, defaulting to `/tmp/hpa_output.json` if `--output` is omitted. ```bash # Map the ERBB2 gene symbol to its Ensembl ID uv run scripts/hpa_cli.py resolve-ensembl-id ERBB2 --output /tmp/erbb2_id.json # Get subcellular location by Ensembl ID uv run scripts/hpa_cli.py get-subcellular-location ENSG00000141736 --output /tmp/erbb2_location.json ``` -------------------------------- ### Quick Start: Search BRCA1 Variants Source: https://github.com/google-deepmind/science-skills/blob/main/skills/clinvar_database/SKILL.md Example of how to use the wrapper script to search for BRCA1 variants and save the results to a JSON file. ```bash uv run scripts/clinvar_api.py search --query "BRCA1[gene]" --output results.json ``` -------------------------------- ### Example Usage Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pubmed_database/SKILL.md Examples demonstrating how to use the PubMed API CLI for searching and fetching article abstracts, and processing the JSON output with `jq`. ```APIDOC ## Example Usage ```bash uv run scripts/pubmed_api.py ./search_results.json search_pubmed "BRCA1" --max_results 5 cat ./search_results.json | jq '.[]' -r uv run scripts/pubmed_api.py ./abstracts.json fetch_article_abstracts "35113657" cat ./abstracts.json | jq '.[0].title' -r ``` ``` -------------------------------- ### Install Science Skills Bundle Source: https://github.com/google-deepmind/science-skills/blob/main/README.md Use this command to install the Science Skills bundle via npx. This command adds the collection of agent skills for scientific research tasks. ```bash npx skills add google-deepmind/science-skills/ ``` -------------------------------- ### Check uv Installation Source: https://github.com/google-deepmind/science-skills/blob/main/skills/uv/SKILL.md Verify if the uv package manager is installed and accessible on your system. ```bash uv --version ``` -------------------------------- ### Check uv Installation (Default Location) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/uv/SKILL.md Check if uv is installed in the default location but not yet on the system's PATH. ```bash "$HOME/.local/bin/uv" --version ``` -------------------------------- ### Workflow Example: Downloading Compound Structures Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md This snippet shows how to download compound structures in SDF format. ```APIDOC ## Download Compound Structures ```bash uv run scripts/chembl_api.py molecule --output /tmp/molecule.sdf --id CHEMBL1185377 --dl_format sdf ``` ### Description This command downloads the structure file for the molecule with ChEMBL ID `CHEMBL1185377` in SDF format. The downloaded file will be saved as `/tmp/molecule.sdf`. This demonstrates how to retrieve structural data for compounds. ``` -------------------------------- ### Loading Structures Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/PYMOL_REFERENCE.md Examples of how to load molecular structures from various file formats into PyMOL. ```APIDOC ### Loading structures ```python cmd.load("data/structure.cif", "myprotein") cmd.load("data/structure.pdb", "myprotein") ``` ``` -------------------------------- ### FASTA Protein Sequence Input Example Source: https://github.com/google-deepmind/science-skills/blob/main/skills/protein_sequence_msa/SKILL.md Input must be a plain text file with two or more protein sequences in FASTA format. Each sequence header must start with a '>' symbol. ```plaintext >Sequence_1_Name MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQ QRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG >Sequence_2_Name MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQ QRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/google-deepmind/science-skills/blob/main/skills/uv/SKILL.md Installs the uv package manager using a curl script. This command should be run if uv is not detected on the system. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Quick Start: Map Gene Symbol and Get Median Expression Source: https://github.com/google-deepmind/science-skills/blob/main/skills/gtex_database/SKILL.md Example commands to quickly map a gene symbol to its GENCODE ID and then retrieve its median expression levels. Output files are saved in the /tmp/ directory. ```bash # Map the TNF gene symbol to its GENCODE ID uv run scripts/gtex_cli.py resolve-gencode-id TNF --output /tmp/tnf_id.json # Get median expression of a gene by GENCODE ID uv run scripts/gtex_cli.py get-median-expression ENSG00000232810.2 --output /tmp/tnf_expr.json ``` -------------------------------- ### Search PubMed Example Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pubmed_database/SKILL.md Example of how to search PubMed for a query and save the results to a JSON file. The results can then be processed with jq. ```bash uv run scripts/pubmed_api.py ./search_results.json search_pubmed "BRCA1" --max_results 5 ``` ```bash cat ./search_results.json | jq '.[]' -r ``` -------------------------------- ### Workflow Example: Verifying API Status Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md This snippet demonstrates how to verify if the ChEMBL API is available by running the `status` subcommand. ```APIDOC ## Verify API Status ```bash uv run scripts/chembl_api.py status --output /tmp/status.json ``` ### Description This command checks the availability of the ChEMBL API. It runs the `status` subcommand and saves the output to `/tmp/status.json`. This is often the first step in a workflow to ensure the API is operational before proceeding with other queries. ``` -------------------------------- ### Search for Molecules Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md Example of searching for molecules using the 'molecule' subcommand. Requires an output file and a search query. ```bash molecule --search "aspirin" --output /tmp/aspirin.json ``` -------------------------------- ### Multi-step Query: Search and Get Relations Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Perform a two-step query to find a term's OBO ID and then retrieve its relations. First, search for the term in a specific ontology, saving results to a temporary file. Then, use the retrieved OBO ID to get relations. ```bash search_ols.py --query "myocardial infarction" --ontology doid --exact --rows 1 --output /tmp/step1.json ``` ```bash get_term.py --obo_id DOID:5844 --relations parents --output /tmp/step2.json ``` -------------------------------- ### Paginated List Endpoint Example Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md Demonstrates how to use --limit and --offset for paginating results from list endpoints. ```APIDOC ## Paginated List Endpoint Example ### Description All list endpoints support `--limit` and `--offset` for pagination. The response includes `page_meta` with pagination details. ### Method `uv run scripts/chembl_api.py ` ### Parameters #### Query Parameters - **--limit** (integer) - Optional - The number of results per page. - **--offset** (integer) - Optional - The starting offset for the results. - **--output** (string) - Required - The path to save the output JSON file. ### Request Examples ```bash # 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 ``` ``` -------------------------------- ### Workflow Example: Searching for Targets Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md This snippet shows how to search for drug targets using the `target` subcommand and common options. ```APIDOC ## Search for Targets ```bash uv run scripts/chembl_api.py target --output /tmp/targets.json --search "BRCA1" ``` ### Description This command searches for targets related to "BRCA1" using the `target` subcommand. The results will be saved to `/tmp/targets.json`. This illustrates a typical search operation for a specific entity. ``` -------------------------------- ### Fetch Article Abstracts Example Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pubmed_database/SKILL.md Example of how to fetch article abstracts using their PubMed IDs and save them to a JSON file. The titles can then be extracted using jq. ```bash uv run scripts/pubmed_api.py ./abstracts.json fetch_article_abstracts "35113657" ``` ```bash cat ./abstracts.json | jq '.[0].title' -r ``` -------------------------------- ### Import http_client from science_skills_common Source: https://github.com/google-deepmind/science-skills/blob/main/skills/science_skills_common/SKILL.md Skills should import the http_client utility from the science_skills_common package. This package is automatically installed as a dependency. ```python from science_skills.science_skills_common import http_client ``` -------------------------------- ### Get References for an Article Source: https://github.com/google-deepmind/science-skills/blob/main/skills/literature_search_europepmc/SKILL.md Fetches the reference list (bibliography) for a given article. Specify the source database and article ID. ```bash uv run scripts/europepmc_api.py get_references MED 34265844 \ --page_size 100 --output references.json ``` -------------------------------- ### Workflow Example: Fetching Detailed Records Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md This snippet demonstrates how to fetch detailed information for a specific target using its ID. ```APIDOC ## Fetch Detailed Target Record ```bash uv run scripts/chembl_api.py target --output /tmp/target_details.json --id CHEMBL3893 ``` ### Description This command fetches the detailed record for a specific target identified by the ChEMBL ID `CHEMBL3893`. The detailed information will be saved to `/tmp/target_details.json`. This shows how to retrieve specific records once an ID is known. ``` -------------------------------- ### Workflow Example: Querying Bioactivity Data Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md This snippet illustrates how to query bioactivity data for a specific target, with options for normalization. ```APIDOC ## Query Bioactivity Data ```bash uv run scripts/chembl_api.py activity --output /tmp/activities.json --id CHEMBL3893 --normalize ``` ### Description This command queries the bioactivity data associated with the target `CHEMBL3893`. The `--normalize` option ensures that the activity values are converted to nM for consistent comparison across different studies. The results are saved to `/tmp/activities.json`. ``` -------------------------------- ### Mandatory Initialization Boilerplate Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/PYMOL_REFERENCE.md Every PyMOL script must start with this exact sequence. The order matters for correct initialization. ```APIDOC ## Mandatory Initialization Boilerplate Every PyMOL script **must** start with this exact sequence. The order matters — reversing the import and `finish_launching()` will crash. ```python import pymol pymol.pymol_argv = ["pymol", "-cq"] pymol.finish_launching() from pymol import cmd ``` - `-c` = command-line mode (no GUI) - `-q` = quiet (suppress startup messages) ``` -------------------------------- ### Mandatory PyMOL Initialization Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/PYMOL_REFERENCE.md This boilerplate code must start every PyMOL script. The order of import and finish_launching is critical for correct execution. ```python import pymol pymol.pymol_argv = ["pymol", "-cq"] pymol.finish_launching() from pymol import cmd ``` -------------------------------- ### Set up openFDA API Key Source: https://github.com/google-deepmind/science-skills/blob/main/skills/openfda_database/SKILL.md Use this command to securely add your openFDA API key to the .env file. This is recommended to increase daily request limits. ```bash printf "Enter openFDA API key (typing hidden): " && read -s key && echo && echo "FDA_API_KEY=$key" >> "ENV_FILE" && echo "Saved." ``` -------------------------------- ### Get Ontology Metadata Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve metadata for a specific ontology using its ID. For example, to get information about EFO. ```bash get_ontology.py --id ``` -------------------------------- ### Get Autocomplete Suggestions for Terms Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md This script provides autocomplete suggestions for partial ontology term names. Results are saved to a specified JSON file. ```bash uv run scripts/suggest_ols.py --query "diabet" --rows 5 \ --output /tmp/ols_suggest.json 2>/dev/null ``` -------------------------------- ### Get Canonical Transcription Start Site (TSS) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/SKILL.md Obtains the single coordinate for the Transcription Start Site (TSS) of a gene's canonical transcript. Accepts gene symbols or Ensembl IDs and handles strand orientation. ```bash uv run scripts/ensembl_api.py canonical-tss TP53 --output tp53_tss.json ``` ```bash uv run scripts/ensembl_api.py canonical-tss ENSG00000141510 --output tss.json ``` -------------------------------- ### Setup AlphaGenome DNA Client Source: https://github.com/google-deepmind/science-skills/blob/main/skills/alphagenome_single_variant_analysis/SKILL.md Initializes the AlphaGenome DNA client using an API key from environment variables. Ensure the ALPHAGENOME_API_KEY is set before running. ```python from alphagenome.models import dna_client from alphagenome.models import variant_scorers from alphagenome.data import genome import os import pandas as pd # Setup API Key and Client dna_model = dna_client.create(api_key=os.environ.get('ALPHAGENOME_API_KEY'), address='dns:///gdmscience.googleapis.com:443') ``` -------------------------------- ### Minimal PyMOL Script for Rendering Structures Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/SKILL.md This script demonstrates the basic setup and commands for loading a structure, applying basic coloring, and saving a PNG image and session file. Ensure structure files are downloaded and accessible. Always call cmd.quit() at the end. ```python # /// script # requires-python = ">=3.10, <3.13" # dependencies = [ # "pymol-open-source-whl", # ] # /// import os import sys # Set environment variable for headless rendering os.environ["PYOPENGL_PLATFORM"] = "osmesa" import pymol # pytype: disable=import-error pymol.pymol_argv = ["pymol", "-cq"] pymol.finish_launching() from pymol import cmd # pytype: disable=import-error cmd.load("AF-P00520-F1-model_v4.cif", "structure") cmd.show("cartoon") cmd.color("green", "ss h") cmd.color("yellow", "ss s") cmd.color("gray", "ss l+''") cmd.orient() cmd.set("ray_opaque_background", 1) cmd.png("output/render.png", width=1200, height=900, dpi=150) cmd.save("output/session.pse") cmd.quit() ``` -------------------------------- ### Get ENTEx Data for Genomic Region Source: https://github.com/google-deepmind/science-skills/blob/main/skills/encode_ccres_database/SKILL.md Use the 'entex' command to retrieve ENTEx data for a specified genomic region. Requires region coordinates in 'chr:start:end' format. ```bash uv run scripts/screen_api.py entex \ --region chr1:1000068:1000409 \ --output /tmp/entex.json ``` -------------------------------- ### Set up NCBI API Key Source: https://github.com/google-deepmind/science-skills/blob/main/skills/dbsnp_database/SKILL.md Use this command to securely set your NCBI API key in the `.env` file. It prompts for the key and appends it to the specified environment file without exposing it in the chat context. ```bash printf "Enter NCBI API key (typing hidden): " && read -s key && echo && echo "NCBI_API_KEY=$key" >> "ENV_FILE" && echo "Saved." ``` -------------------------------- ### Get eQTLs in Chromosomal Region Source: https://github.com/google-deepmind/science-skills/blob/main/skills/gtex_database/SKILL.md Fetch significant single-tissue eQTLs within a specified chromosomal range. Supports a maximum window of 8Mb and requires chromosome, start, end, and tissue ID. ```bash uv run scripts/gtex_cli.py get-eqtls-in-region chr17 7000000 7100000 "Esophagus - Muscularis" \ --output /tmp/region_eqtls.json ``` -------------------------------- ### Exploratory Query with CLI Source: https://github.com/google-deepmind/science-skills/blob/main/skills/interpro_database/SKILL.md Use the CLI for exploratory queries with a strict limit and output to a file. This prevents overwhelming the context window and fetching excessive data. ```bash uv run ./scripts/interpro_client.py fetch protein --source_db reviewed --limit 2 --query_params tax_id=9606 --output exploratory_results.jsonl ``` -------------------------------- ### Initialize AlphaGenome DNA Client Source: https://github.com/google-deepmind/science-skills/blob/main/skills/alphagenome_single_variant_analysis/docs/alphagenome-api.md Create an instance of the DNA client. The API key is loaded from the .env file. ```python from alphagenome.models import dna_client dna_model = dna_client.create( api_key=os.environ.get('ALPHAGENOME_API_KEY'), address='dns:///gdmscience.googleapis.com:443', ) ``` -------------------------------- ### Search with Pagination Workflow Source: https://github.com/google-deepmind/science-skills/blob/main/skills/literature_search_europepmc/SKILL.md Illustrates how to perform searches with pagination using the `cursor` parameter. Requires `jq` for extracting cursor information. ```bash # First page uv run scripts/europepmc_api.py search "CRISPR" --max_results 100 --output page1.json # Extract cursor for next page CURSOR=$(jq -r '.nextCursorMark // empty' page1.json) # Next page uv run scripts/europepmc_api.py search "CRISPR" --max_results 100 --cursor "$CURSOR" --output page2.json ``` -------------------------------- ### Get API Key Source: https://github.com/google-deepmind/science-skills/blob/main/skills/string_database/references/valuesranks.md Generate a free, anonymous API key required to submit full datasets. Read the JSON output to get the "api_key" value. ```bash uv run scripts/string_cli.py valuesranks-key --output /tmp/api_key.json ``` -------------------------------- ### Fetch PDB Structures for an Entry via CLI Source: https://github.com/google-deepmind/science-skills/blob/main/skills/interpro_database/SKILL.md Retrieve PDB structures linked to an InterPro entry. This example limits the fetch to the first 5 structures and saves them to a JSONL file. ```bash # URL equivalent: /structure/pdb/entry/interpro/IPR011615 # Only fetch the first 5 structures uv run ./scripts/interpro_client.py fetch structure --source_db pdb --linked_endpoint entry --linked_source_db interpro --linked_accession IPR011615 --output ipr011615_structures.jsonl ``` -------------------------------- ### Fetch Entries (/{endpoint}) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/interpro_database/SKILL.md Construct the endpoint for fetching entries directly using the `/{endpoint}` path. Ensure to use a limit for exploratory queries. ```bash uv run ./scripts/interpro_client.py fetch entry --limit 10 --output entries.jsonl ``` -------------------------------- ### Get Subcellular Location Source: https://github.com/google-deepmind/science-skills/blob/main/skills/human_protein_atlas_database/SKILL.md Retrieves the specific organelles or cellular structures where the protein has been localized. ```APIDOC ## get-subcellular-location — Get Subcellular Location Retrieves the specific organelles or cellular structures where the protein has been localized. ### Command ```bash uv run scripts/hpa_cli.py get-subcellular-location ENSG00000141736 \ --output /tmp/subcellular.json ``` ### Arguments - `ensembl_id` (positional): The Ensembl Gene ID. - `--output`: Output file path. ``` -------------------------------- ### Execute BLAST Search (Default Database) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/protein_sequence_similarity_search/SKILL.md Run the uniprot_blast.py script with the default 'uniprotkb' database. Ensure the USER_EMAIL environment variable is set. ```bash uv run scripts/uniprot_blast.py -o -j ``` -------------------------------- ### Get OLS Index Statistics Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve statistics about the OLS index. This command does not require any arguments. ```bash get_stats.py ``` -------------------------------- ### Coloring Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/PYMOL_REFERENCE.md Examples of applying different color schemes to molecular structures based on selections or properties. ```APIDOC ### Coloring ```python cmd.color("green", "ss h") cmd.color("cyan", "chain A") cmd.spectrum("b", "red_white_blue", "polymer.protein") cmd.spectrum("count", "rainbow", "polymer.protein") ``` ``` -------------------------------- ### Standard AlphaGenome Imports Source: https://github.com/google-deepmind/science-skills/blob/main/skills/alphagenome_single_variant_analysis/docs/alphagenome-api.md Import necessary modules for AlphaGenome workflows. Ensure all required packages are installed. ```python from alphagenome.data import gene_annotation from alphagenome.data import genome from alphagenome.data import track_data from alphagenome.data import transcript as transcript_utils from alphagenome.interpretation import ism from alphagenome.models import dna_client from alphagenome.models import variant_scorers from alphagenome.visualization import plot_components import matplotlib.pyplot as plt import pandas as pd ``` -------------------------------- ### Run openFDA Utility Script Source: https://github.com/google-deepmind/science-skills/blob/main/skills/openfda_database/SKILL.md This is the main command to interact with the openFDA API using the provided utility script. It supports search, count, and download operations. ```bash uv run scripts/openfda_query.py {search,count,download} --output [options] ``` -------------------------------- ### Get Reactome Database Name Source: https://github.com/google-deepmind/science-skills/blob/main/skills/reactome_database/SKILL.md Retrieves the name of the Reactome database. Results are saved to a JSON file. ```bash uv run scripts/reactome_analysis.py db-name --output /tmp/name.json ``` -------------------------------- ### Get Protein Information Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/SKILL.md Retrieves the Ensembl Protein ID (ENSP) and sequence length for a given transcript. ```bash uv run scripts/ensembl_api.py protein-info ENST00000269305 --output protein_info.json ``` -------------------------------- ### Fetch Compound Database Summary Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pubmed_database/references/fetch-and-resolve.md Use this command to fetch summary metadata for compound records from the pccompound database. Provide a single UID. ```bash uv run scripts/pubmed_api.py ./compound_summary.json fetch_database_summary pccompound "2244" ``` -------------------------------- ### Get Ontology Root Terms Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve the root terms of a specified ontology. Requires the ontology ID. ```bash get_term.py --ontology --roots ``` -------------------------------- ### Client Initialization Source: https://github.com/google-deepmind/science-skills/blob/main/skills/alphagenome_single_variant_analysis/docs/alphagenome-api.md Initializes the AlphaGenome DNA client. The API key is automatically loaded from the .env file. ```APIDOC ## Client Initialization ### Description Initializes the AlphaGenome DNA client. The API key is automatically loaded by `dotenv` from the `.env` file in the agent configuration directory. ### Code ```python from alphagenome.models import dna_client dna_model = dna_client.create( api_key=os.environ.get('ALPHAGENOME_API_KEY'), address='dns:///gdmscience.googleapis.com:443', ) ``` ``` -------------------------------- ### List Searchable Field Areas Source: https://github.com/google-deepmind/science-skills/blob/main/skills/clinical_trials_database/references/clinical_trials_api.md Get a list of all areas or categories that can be searched within the study data. ```APIDOC ## GET /studies/search-areas ### Description Lists all searchable field areas. ### Method GET ### Endpoint /studies/search-areas ``` -------------------------------- ### Fetch Entries by Source DB (/{endpoint}/{sourceDB}) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/interpro_database/SKILL.md Fetch entries filtered by a specific source database using the `/{endpoint}/{sourceDB}` path. Use a limit for exploratory queries. ```bash uv run ./scripts/interpro_client.py fetch entry --source_db pfam --limit 10 --output pfam_entries.jsonl ``` -------------------------------- ### Create GO Slim Summary from Gene Annotations Source: https://github.com/google-deepmind/science-skills/blob/main/skills/quickgo_database/SKILL.md Use this command to generate a high-level functional summary by mapping gene annotations to a predefined GO Slim. First, obtain GO IDs for your genes, then use the `go slim` command with the relevant GO IDs. ```bash # Step 1: Find GO IDs for candidate genes (e.g., via their UniProt IDs, fetching their annotations) # ... (output yields e.g., GO:0006915,GO:0008219) # Step 2: Create a slim summary from those specific GO IDs uv run scripts/quickgo_tool.py go slim --slimsToIds "GO:0005575,GO:0008150,GO:0003674" --slimsFromIds "GO:0006915,GO:0008219" --output my_slim.json ``` -------------------------------- ### Run STRING CLI Tool Source: https://github.com/google-deepmind/science-skills/blob/main/skills/string_database/SKILL.md This is the general command structure for running the STRING CLI tool. Always use 'uv run' and specify an output file. ```bash uv run scripts/string_cli.py [options] --output /tmp/out.tsv ``` -------------------------------- ### Get Reactome Database Version Source: https://github.com/google-deepmind/science-skills/blob/main/skills/reactome_database/SKILL.md Retrieves the current version of the Reactome database. Results are saved to a JSON file. ```bash uv run scripts/reactome_analysis.py db-version --output /tmp/version.json ``` -------------------------------- ### Get Dataset Details Source: https://github.com/google-deepmind/science-skills/blob/main/skills/unibind_database/SKILL.md Retrieves detailed information for a specific dataset in UniBind using its identifier. Output is JSON. ```bash uv run /scripts/unibind_api.py get_dataset "EXP047889.HMLE-Twist-ER_breast_cancer.SMAD3" ``` -------------------------------- ### Download All Results (Auto-Paginate) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/openfda_database/references/recipes.md Downloads all results for a given query, automatically handling pagination. Useful for retrieving large datasets. ```bash uv run scripts/openfda_query.py download \ --category drug --endpoint event \ --search "patient.drug.medicinalproduct:ozempic+AND+serious:1" \ --limit 100 --all_results \ --output /tmp/ozempic_serious.json ``` -------------------------------- ### Get Assembly/Region Info Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/references/ensembl_rest_api_reference.md Retrieves details for a specific chromosome or genomic region, including its length and cytogenetic bands. ```APIDOC ## GET /info/assembly/{species}/{region_name} ### Description Details for a specific chromosome/region (length, bands). ### Method GET ### Endpoint /info/assembly/{species}/{region_name} ### Parameters #### Path Parameters - **species** (string) - Required - The species name (e.g., 'human'). - **region_name** (string) - Required - The name of the region (e.g., '1:1000000..2000000'). ``` -------------------------------- ### Visualize Protein-Ligand Interactions Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/RECIPES.md Loads a complex, isolates a ligand, selects the binding site, and styles the protein and ligand for visualization. It also shows pocket waters and polar contacts, then zooms and saves a PNG and session file. Raises an error if no ligand is found. ```python cmd.load("data/complex.pdb", "complex") # Isolate a single ligand to prevent zoomed-out views on symmetrical complexes if cmd.count_atoms("organic") > 0: first_atom = cmd.get_model("organic").atom[0] cmd.select("target_ligand", f"organic and chain '{first_atom.chain}'") else: raise RuntimeError("No ligand found.") cmd.select("binding_site", "byres (polymer.protein within 4.0 of target_ligand)") # Styled rendering with heteroatom coloring cmd.show("cartoon", "polymer.protein") cmd.set("cartoon_transparency", 0.4, "polymer.protein") cmd.color("gray80", "polymer.protein") cmd.show("sticks", "binding_site") util.cbac("binding_site") util.cnc("binding_site") cmd.show("sticks", "target_ligand") util.cbag("target_ligand") util.cnc("target_ligand") cmd.hide("sticks", "hydro") # Show pocket waters cmd.select("pocket_waters", "solvent within 4.0 of target_ligand") cmd.show("spheres", "pocket_waters") cmd.color("red", "pocket_waters") cmd.set("sphere_scale", 0.15, "pocket_waters") # Polar contacts (hydrogen bonds) cmd.distance("polar_contacts", "target_ligand", "binding_site", cutoff=3.5, mode=2) cmd.set("dash_color", "yellow") cmd.set("dash_gap", 0.4) cmd.set("dash_radius", 0.08) cmd.hide("labels", "polar_contacts") cmd.orient("target_ligand | binding_site") cmd.zoom("target_ligand | binding_site", buffer=3.0) cmd.png("output/ligand.png", width=1200, height=900, dpi=150) cmd.save("output/session.pse") ``` -------------------------------- ### Execute BLAST Search (Custom Database) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/protein_sequence_similarity_search/SKILL.md Run the uniprot_blast.py script specifying custom databases. Ensure the USER_EMAIL environment variable is set. ```bash uv run scripts/uniprot_blast.py -o -j --databases ``` -------------------------------- ### Get Gene Summary Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/SKILL.md Fetches high-level gene metadata including symbol, biotype, description, and chromosomal location. ```bash uv run scripts/ensembl_api.py gene-summary ENSG00000141510 --output gene_summary.json ``` -------------------------------- ### Get Hierarchical Children Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve hierarchical children (including 'is-a' and 'part-of' relations) for a given ontology term. ```bash get_term.py --obo_id --relations hierarchicalChildren ``` -------------------------------- ### Pagination Query Syntax Source: https://github.com/google-deepmind/science-skills/blob/main/skills/openfda_database/references/api_endpoints.md Explains the `limit` and `skip` parameters for controlling the number of results returned and for paginating through large result sets. ```text limit=N skip=N ``` -------------------------------- ### Execute SPARQL Queries using uniprot_tools.py Source: https://github.com/google-deepmind/science-skills/blob/main/skills/uniprot_database/SKILL.md Run complex graph queries directly against UniProt using SPARQL via the `sparql` command in `uniprot_tools.py`. This example retrieves the first 5 reviewed proteins. ```bash uv run scripts/uniprot_tools.py sparql 'PREFIX up: SELECT ?protein WHERE { ?protein a up:Protein ; up:reviewed true . } LIMIT 5' ``` -------------------------------- ### Get Hierarchical Parents Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve hierarchical parents (including 'is-a' and 'part-of' relations) for a given ontology term. ```bash get_term.py --obo_id --relations hierarchicalParents ``` -------------------------------- ### Rendering Backend Source: https://github.com/google-deepmind/science-skills/blob/main/skills/pymol/references/PYMOL_REFERENCE.md Information about the PyMOL rendering backend and recommended functions for output. ```APIDOC ## Rendering Backend PyMOL runs with **OSMesa** (software rendering). There is no GPU or X display. - Use `cmd.png(path, width, height, dpi)` for output. - `cmd.ray()` works but is slow — use it only when you need ray-traced quality. - Never use `cmd.draw()` (requires hardware OpenGL). - Always set `cmd.set("ray_opaque_background", 1)` if you want a white background instead of transparent. ``` -------------------------------- ### Get Protein Sequence Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/SKILL.md Fetches the amino acid sequence in FASTA format for a transcript (ENST) or protein (ENSP) ID. ```bash uv run scripts/ensembl_api.py protein-sequence ENST00000269305 --output protein.fasta ``` ```bash uv run scripts/ensembl_api.py protein-sequence ENSP00000269305 --output protein_ensp.fasta ``` -------------------------------- ### Fetch Entries by Source DB and Accession (/{endpoint}/{sourceDB}/{accession}) Source: https://github.com/google-deepmind/science-skills/blob/main/skills/interpro_database/SKILL.md Retrieve a specific entry by its source database and accession number using the `/{endpoint}/{sourceDB}/{accession}` path. A limit is recommended for exploratory queries. ```bash uv run ./scripts/interpro_client.py fetch entry --source_db pfam --accession PF00001 --limit 10 --output pf00001_entry.jsonl ``` -------------------------------- ### Get Transcript Structure Source: https://github.com/google-deepmind/science-skills/blob/main/skills/ensembl_database/SKILL.md Fetches exon coordinates, CDS boundaries, and computed 5'/3' UTR regions for a given transcript. ```bash uv run scripts/ensembl_api.py transcript-structure ENST00000269305 --output structure.json ``` -------------------------------- ### Get Term Ancestors Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve all ancestors (categories) of a given ontology term. Use the --relations ancestors flag. ```bash get_term.py --obo_id --relations ancestors ``` -------------------------------- ### Paginate Molecule Results Source: https://github.com/google-deepmind/science-skills/blob/main/skills/chembl_database/SKILL.md Demonstrates how to paginate through molecule results using the --limit and --offset parameters. This allows fetching data in chunks. ```bash # 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 ``` -------------------------------- ### Get Term Parents Source: https://github.com/google-deepmind/science-skills/blob/main/skills/embl_ebi_ols/SKILL.md Retrieve the direct parents of a given ontology term. Use the --relations parents flag. ```bash get_term.py --obo_id --relations parents ```