tpmi-phewas-skill

Fetch TPMI PheWAS association summaries for single genetic variants via the TPMI API.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill tpmi-phewas-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tpmi-phewas-skill
Source: https://github.com/openai/plugins/tree/main/plugins/life-science-research/skills/tpmi-phewas-skill
Command: npx skills add https://github.com/openai/plugins --skill tpmi-phewas-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Looking up phenome-wide association study (PheWAS) results for a genetic variant requires resolving inconsistent input formats (rsID, GRCh37, or GRCh38 coordinates) into the exact GRCh38 query the TPMI PheWeb API expects, then trimming large association payloads into readable summaries.

Core Features & Use Cases

  • Flexible Variant Input: Accepts exactly one of rsid, grch37, grch38, or a generic variant string, and resolves it to the canonical GRCh38 chr:pos-ref-alt query using Ensembl REST endpoints.
  • Compact PheWAS Summaries: Queries the TPMI PheWeb API and returns a bounded list of associations with total counts and truncation flags, starting from max_results=10.
  • Raw Payload Export: Optionally saves the full association JSON to a file via save_raw and raw_output_path instead of flooding the chat with large arrays.
  • Use Case: A researcher asks for TPMI associations for rs9273363; the skill resolves the rsID to GRCh38 coordinates, queries TPMI, and returns a concise markdown summary of the top phenotype associations.

Quick Start

Ask the assistant to fetch TPMI PheWAS associations for a variant such as rs9273363 or the GRCh38 coordinate 6:160540105-T-C.

Frequently Asked Questions about tpmi-phewas-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I look up PheWAS associations for a variant in TPMI?

Provide one variant identifier as JSON on stdin, such as {"rsid":"rs9273363"} or {"grch38":"6:160540105-T-C"}, to the tpmi_phewas.py script. It resolves the input to a GRCh38 query and returns a bounded list of phenotype associations from the TPMI PheWeb API.

What variant input formats does the TPMI PheWAS lookup accept?

The lookup accepts exactly one of rsid, grch37, grch38, or a generic variant field. Coordinate strings use flexible separators like 6:160540105-T-C or 6:160540105:T:C, and rsIDs must start with 'rs'.

Can I query TPMI with GRCh37 or hg19 coordinates?

Yes, GRCh37 coordinates are supported through the grch37 input field. The script uses Ensembl GRCh37 and GRCh38 REST endpoints to resolve the position to an rsID and then to the canonical GRCh38 variant TPMI requires.

How do I get the full TPMI association payload instead of a truncated list?

Set save_raw to true in the input JSON, optionally with raw_output_path. The full API response is written to a JSON file and the path is returned in raw_output_path, while the chat output stays compact.

Why does the TPMI variant lookup return zero associations?

A 404 from the TPMI API means the variant is not present in the TPMI PheWAS dataset, so the script returns ok=true with zero associations and a warning. It can also fail earlier if Ensembl cannot resolve the input coordinate to an rsID.