[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [GTEx gene and SNP eQTLs](https://spiral.ai/integrations/opencode/gtex-gene-and-snp-eqtls)

# How to Use GTEx gene and SNP eQTLs in opencode

Find significant cis-eQTL associations for a gene or SNP, with tissue, normalized effect size, and p-value. Use it to investigate where genetic changes are associated with differences in gene expression.

|  |  |
| --- | --- |
| Model | GTEx gene and SNP eQTLs |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with GTEx gene and SNP eQTLs in opencode

- Use GTEx gene and SNP eQTLs to retrieve PCSK9 associations across tissues, collect all available pages, and save a CSV in this project with SNP, gene, tissue, normalized effect size, and p-value.
- Use GTEx gene and SNP eQTLs to look up rs4500361 and create a Markdown report in this project listing every returned gene-tissue association.
- Use GTEx gene and SNP eQTLs to retrieve ERAP2 associations in whole blood and lung, then add a plot to this project's notebook showing normalized effect size by SNP and tissue.
- Use GTEx gene and SNP eQTLs to compare APOE results from GTEx v8 and v11. Save separate tables for shared SNP-tissue pairs and pairs returned in only one release.
- Use GTEx gene and SNP eQTLs to search PCSK9, LDLR, and SORT1 separately. Add a research summary to this project with the number of returned associations and tissues for each gene.

## How to set up GTEx gene and SNP eQTLs in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run GTEx gene and SNP eQTLs**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "gtexportal-org/eqtls/search",
    "input": {
      "gene": "<gene>"
    }
  }'
```

Then paste one of the prompts above: opencode finds GTEx gene and SNP eQTLs on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## GTEx gene and SNP eQTLs tools and prices

- [GTEx Portal: gene expression by tissue and eQTLs · Search](https://spiral.ai/tools/alexandria/gtexportal-org/eqtls/search) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| gene |  | — | Human gene: HGNC symbol (PCSK9, case-insensitive), Ensembl gene ID with or without version (ENSG00000169174, ENSG00000169174.10) or GENCODE ID. Resolved in the dataset's GENCODE release; a version from another release is accepted with a gene_version_differs warning. Exactly one of gene and variant. Pattern: ^\s*[A-Za-z0-9][A-Za-z0-9._-]*\s*$. |
| limit | 1 to 250 | — | eQTL rows per page, strongest first. Default 25. |
| offset | 0 to 40000 | — | Rows to skip; pass next_offset from the previous page. |
| dataset | gtex_v11, gtex_v10, gtex_v8 | gtex_v11 | GTEx release: gtex_v11 (default, GENCODE v47, 50 eQTL tissues, the most complete analysed adult GTEx dataset), gtex_v10 (GENCODE v39) or gtex_v8 (GENCODE v26, the release most papers cite). |
| tissues |  | — | Only these GTEx tissue site detail IDs (Liver, Whole_Blood, Brain_Cortex, ...). Default: every tissue. |
| variant |  | — | Variant: dbSNP rsID (rs4500361), GTEx variant ID (chr1_55025188_T_C_b38), or chromosome-position-ref-alt on GRCh38 (1-55025188-T-C, chr1:55025188:T:C). rsIDs resolve through GTEx's variant table (v10 for v11, which has none of its own). Exactly one of gene and variant. Pattern: ^\s*[A-Za-z0-9][A-Za-z0-9 _:>/-]*\s*$. |

## What can you do with GTEx gene and SNP eQTLs in opencode?

Build a tissue association table for a research gene list directly in your project. A coding agent can organize GTEx SNPs, normalized effect sizes, and p-values into reports and compare results across releases.

### Build a gene regulation evidence table

Collect significant PCSK9 associations into a table of SNPs, tissues, normalized effect sizes, and p-values for a research brief.

### Investigate a public SNP

Look up rs4500361 and list the genes and tissues with returned significant associations.

### Choose tissues for follow-up experiments

Compare ERAP2 associations across tissues to identify experimental settings worth investigating.

### Compare effect direction across tissues

For each SNP associated with SORT1, compare the sign of the normalized effect size across the tissues returned.

### Check evidence across GTEx releases

Compare APOE association results from v8 and v11, separating shared SNP-tissue associations from those returned in only one release.

### Annotate a research gene shortlist

Search PCSK9, LDLR, and SORT1 separately, then summarize the significant tissue associations returned for each gene.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## GTEx gene and SNP eQTLs in other agents

- [Amp](https://spiral.ai/integrations/amp/gtex-gene-and-snp-eqtls)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/gtex-gene-and-snp-eqtls)
- [Claude](https://spiral.ai/integrations/claude-desktop/gtex-gene-and-snp-eqtls)
- [Claude Code](https://spiral.ai/integrations/claude-code/gtex-gene-and-snp-eqtls)
- [Cline](https://spiral.ai/integrations/cline/gtex-gene-and-snp-eqtls)
- [Codex](https://spiral.ai/integrations/codex/gtex-gene-and-snp-eqtls)
- [Cursor](https://spiral.ai/integrations/cursor/gtex-gene-and-snp-eqtls)
- [Devin](https://spiral.ai/integrations/devin/gtex-gene-and-snp-eqtls)
- [dots](https://spiral.ai/integrations/dots/gtex-gene-and-snp-eqtls)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/gtex-gene-and-snp-eqtls)
- [Gemini](https://spiral.ai/integrations/gemini/gtex-gene-and-snp-eqtls)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/gtex-gene-and-snp-eqtls)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/gtex-gene-and-snp-eqtls)
- [goose](https://spiral.ai/integrations/goose/gtex-gene-and-snp-eqtls)
- [Grok](https://spiral.ai/integrations/grok/gtex-gene-and-snp-eqtls)
- [Grok Build](https://spiral.ai/integrations/grok-build/gtex-gene-and-snp-eqtls)
- [Hermes](https://spiral.ai/integrations/hermes/gtex-gene-and-snp-eqtls)
- [Instinct](https://spiral.ai/integrations/instinct/gtex-gene-and-snp-eqtls)
- [Manus](https://spiral.ai/integrations/manus/gtex-gene-and-snp-eqtls)
- [Muse](https://spiral.ai/integrations/muse/gtex-gene-and-snp-eqtls)
- [Muse Code](https://spiral.ai/integrations/muse-code/gtex-gene-and-snp-eqtls)
- [n8n](https://spiral.ai/integrations/n8n/gtex-gene-and-snp-eqtls)
- [Notion](https://spiral.ai/integrations/notion/gtex-gene-and-snp-eqtls)
- [OpenClaw](https://spiral.ai/integrations/openclaw/gtex-gene-and-snp-eqtls)
- [Perplexity](https://spiral.ai/integrations/perplexity/gtex-gene-and-snp-eqtls)
- [Raycast](https://spiral.ai/integrations/raycast/gtex-gene-and-snp-eqtls)
- [VS Code](https://spiral.ai/integrations/vscode/gtex-gene-and-snp-eqtls)
- [Windsurf](https://spiral.ai/integrations/windsurf/gtex-gene-and-snp-eqtls)
- [Zapier](https://spiral.ai/integrations/zapier/gtex-gene-and-snp-eqtls)

## More opencode guides

- [G-BA benefit assessment search](https://spiral.ai/integrations/opencode/g-ba-benefit-assessment-search)
- [GTEx gene expression by tissue](https://spiral.ai/integrations/opencode/gtex-gene-expression-by-tissue)
- [G-BA benefit assessment details](https://spiral.ai/integrations/opencode/g-ba-benefit-assessment-details)
- [HGNC gene details](https://spiral.ai/integrations/opencode/hgnc-gene-details)
- [FDA warning letter search](https://spiral.ai/integrations/opencode/fda-warning-letter-search)
- [HGNC gene list normalization](https://spiral.ai/integrations/opencode/hgnc-gene-list-normalization)

## Questions about GTEx gene and SNP eQTLs in opencode

**Can opencode use GTEx gene and SNP eQTLs?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run GTEx gene and SNP eQTLs like any built-in tool.

**How much does GTEx gene and SNP eQTLs cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use GTEx gene and SNP eQTLs in opencode?**

No. Spiral runs GTEx gene and SNP eQTLs on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up GTEx gene and SNP eQTLs in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while GTEx gene and SNP eQTLs runs?**

GTEx gene and SNP eQTLs runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**How many tissues does GTEx cover for eQTL searches?**

GTEx v11 covers 50 eQTL tissues. GTEx v8 tested 49, so tissue coverage depends on the release.

**Does a newer GTEx release always mean new donor samples?**

No. GTEx v11 updates v10 to GENCODE 47 annotation and adds no new samples or donors.

**Does the search include nonsignificant associations?**

The significant single-tissue eQTL service returns precomputed significant associations. An empty result therefore does not establish that a gene and SNP have no relationship.

**How should I interpret normalized effect size?**

GTEx measures the alternative allele's effect relative to the reference allele. The magnitude is calculated in normalized expression space and should not be read as a fold change.

**How far from a gene does GTEx search for cis-eQTLs?**

For GTEx v8, the mapping window extends one megabase upstream and downstream of the gene's transcription start site. That is a local regulatory search boundary.

