用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill ensembl-rest-api命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
中英双语学术降 AIGC / bilingual academic de-AIGC skill. Removes AI-generated writing signatures from empirical papers in economics, management, and the social sciences — in both English and Chinese. Covers Turnitin AI, GPTZero, Originality.ai on the English side and 知网 AMLC, 万方, 维普 on the Chinese side. Uses a six-step loop (intake → audit → claim-evidence check → differentiated rewrite → five-dimension self-score → cold-reader recheck) with two pattern libraries (22 English + 17 Chinese patterns), section-by-section strategies for empirical papers, and hard protections that keep every number, coefficient, and citation intact.
Use when a research task needs reproducible Kaggle discovery, metadata inspection, bounded public-data downloads, competition or kernel discovery, model discovery, or an explicitly approved Kaggle write/delete operation through the official CLI.
基于 SOC 职业分类
正在显示 SKILL.md
| name | ensembl-rest-api |
| description | Query gene, sequence, and variant data via the Ensembl REST API |
| metadata | {"openclaw":{"emoji":"🧬","category":"domains","subcategory":"biomedical","keywords":["Ensembl","gene lookup","sequence retrieval","genomics","variant data","bioinformatics"],"source":"https://rest.ensembl.org"}} |
Ensembl is a genome browser and annotation system maintained by EMBL-EBI and the Wellcome Sanger Institute, providing reference assemblies, gene annotations, variant data, and comparative genomics for over 300 vertebrate genomes. It is the genomic reference underpinning gget, PyEnsembl, and BioMart.
The REST API exposes Ensembl data via stateless HTTP. Researchers can look up genes by symbol or stable ID, retrieve genomic/cDNA/protein sequences, query variant annotations (rsIDs, clinical significance, consequences), access cross-references (HGNC, UniProt, RefSeq, OMIM), and obtain assembly metadata. Responses in JSON or XML.
No authentication required. All endpoints are publicly accessible. Users needing higher throughput can register for an API token.
Retrieve gene metadata: coordinates, biotype, canonical transcript.
GET https://rest.ensembl.org/lookup/symbol/{species}/{symbol}| Parameter | Type | Required | Description |
|---|---|---|---|
| species | string | Yes | Species name (e.g., homo_sapiens) |
| symbol | string | Yes | Gene symbol (e.g., BRCA1, TP53) |
| expand | int | No | Set to 1 to include transcripts and translations |
| content-type | string | Yes | application/json or text/xml |
curl "https://rest.ensembl.org/lookup/symbol/homo_sapiens/BRCA1?content-type=application/json"
{
"display_name": "BRCA1",
"description": "BRCA1 DNA repair associated [Source:HGNC Symbol;Acc:HGNC:1100]",
"object_type": "Gene", "species": "homo_sapiens",
"assembly_name": "GRCh38", "biotype": "protein_coding",
"seq_region_name": "17", "start": 43044292, "end": 43170245, "strand": -1,
"id": "ENSG00000012048", "canonical_transcript": "ENST00000357654.9"
}
Retrieve genomic, cDNA, CDS, or protein sequences by Ensembl stable ID.
GET https://rest.ensembl.org/sequence/id/{id}| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Ensembl stable ID (e.g., ENSG00000012048) |
| type | string | No | genomic, cdna, cds, or protein |
| expand_5prime | int | No | Expand 5' flanking region by N bases |
| expand_3prime | int | No | Expand 3' flanking region by N bases |
| content-type | string | Yes | application/json or text/plain (FASTA) |
curl "https://rest.ensembl.org/sequence/id/ENSG00000012048?content-type=application/json&type=genomic"
{
"id": "ENSG00000012048", "query": "ENSG00000012048",
"desc": "chromosome:GRCh38:17:43044292:43170245:-1",
"molecule": "DNA",
"seq": "AAAGCGTGGGAATTACAGATAAATTAAAACTGTGGAACCCCTTTCCTCGGCTGCCGCCAAGGTGTTCGG..."
}
Map a gene symbol to Ensembl stable IDs and external database identifiers.
GET https://rest.ensembl.org/xrefs/symbol/{species}/{symbol}species (required), symbol (required), external_db (optional filter, e.g., UniProt)curl "https://rest.ensembl.org/xrefs/symbol/homo_sapiens/TP53?content-type=application/json"
[{"type":"gene","id":"ENSG00000141510"},{"type":"gene","id":"LRG_321"}]Use xrefs/id/{id} to expand an Ensembl ID to all external cross-references (UniProt, HGNC, RefSeq, OMIM).
Retrieve variant data by rsID: mappings, alleles, consequence, clinical significance.
GET https://rest.ensembl.org/variation/{species}/{id}species (required), id (required, e.g., rs699)curl "https://rest.ensembl.org/variation/homo_sapiens/rs699?content-type=application/json"
{
"name": "rs699", "var_class": "SNP",
"most_severe_consequence": "missense_variant",
"clinical_significance": ["benign"],
"evidence": ["Frequency","1000Genomes","Cited","ESP","Phenotype_or_Disease","ExAC","TOPMed","gnomAD"],
"mappings": [{"location":"1:230710048-230710048","allele_string":"A/G","strand":1,"assembly_name":"GRCh38"}
GET https://rest.ensembl.org/info/assembly/{species}assembly_name ("GRCh38.p14"), assembly_date ("2013-12"), assembly_accession ("GCA_000001405.29"), full karyotype array (1-22, X, Y, MT), and 347 top_level_region entries.X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset on every response./lookup/id, /sequence/id): accept up to 1000 IDs per request.https://grch37.rest.ensembl.orgimport requests
BASE = "https://rest.ensembl.org"
HEADERS = {"Content-Type": "application/json"}
gene = requests.get(f"{BASE}/lookup/symbol/homo_sapiens/BRCA1", headers=HEADERS).json()
print(f"{gene['display_name']} ({gene['id']}) chr{gene['seq_region_name']}:{gene['start']}-{gene['end']}")
seq = requests.get(f"{BASE}/sequence/id/{gene['id']}?type=cds", headers=HEADERS).json()
print(f"CDS length: {len(seq['seq'])} bp")
import requests
ids = ["ENSG00000012048", "ENSG00000141510", "ENSG00000157764"] # BRCA1, TP53, BRAF
resp = requests.post(
"https://rest.ensembl.org/lookup/id",
headers={"Content-Type": "application/json", "Accept": "application/json"},
json={"ids": ids}
)
for ens_id, info in resp.json().items():
print(f"{info['display_name']:10s} chr{info['seq_region_name']}:{info['start']}-{info['end']}")
import requests
for rsid in ["rs699", "rs1042522", "rs334"]:
v = requests.get(
f"https://rest.ensembl.org/variation/homo_sapiens/{rsid}",
headers={"Content-Type": "application/json"}
).json()
loc = v["mappings"][0]["location"] if v.get("mappings") else "N/A"
print(f"{v['name']:12s} {v['var_class']:5s} {v['most_severe_consequence']:25s} {loc}")