bio-entrez-link
БесплатноЗапускает вложенные скриптыНе проверенFind cross-references between NCBI databases using Biopython Bio.Entrez. Use when navigating from genes to proteins, sequences to publications, finding…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
Entrez Link
Navigate between NCBI databases using Biopython's Entrez module (ELink utility).
Required Setup
from Bio import Entrez
Entrez.email = '[email protected]' # Required by NCBI
Entrez.api_key = 'your_api_key' # Optional, raises rate limit
Core Function
Entrez.elink() - Cross-Database Links
Find related records in the same or different databases.
# Find proteins linked to a gene
handle = Entrez.elink(dbfrom='gene', db='protein', id='672')
record = Entrez.read(handle)
handle.close()
# Extract linked IDs
linkset = record[0]
if linkset['LinkSetDb']:
links = linkset['LinkSetDb'][0]['Link']
protein_ids = [link['Id'] for link in links]
print(f"Found {len(protein_ids)} linked proteins")
Key Parameters:
| Parameter | Description | Example |
|---|---|---|
dbfrom |
Source database | 'gene' |
db |
Target database | 'protein' |
id |
Source record ID(s) | '672' or '672,675' |
linkname |
Specific link type | 'gene_protein_refseq' |
cmd |
Link command | 'neighbor', 'neighbor_score' |
ELink Result Structure
record[0] # First linkset
record[0]['DbFrom'] # Source database
record[0]['IdList'] # Input IDs
record[0]['LinkSetDb'] # List of link results
record[0]['LinkSetDb'][0]['DbTo'] # Target database
record[0]['LinkSetDb'][0]['LinkName'] # Link name
record[0]['LinkSetDb'][0]['Link'] # List of linked records
record[0]['LinkSetDb'][0]['Link'][0]['Id'] # Linked ID
Common Link Paths
Gene to Other Databases
| From | To | Link Name | Description |
|---|---|---|---|
| gene | protein | gene_protein |
All proteins |
| gene | protein | gene_protein_refseq |
RefSeq proteins only |
| gene | nucleotide | gene_nuccore |
Nucleotide sequences |
| gene | nucleotide | gene_nuccore_refseqrna |
RefSeq mRNA |
| gene | pubmed | gene_pubmed |
Related publications |
| gene | homologene | gene_homologene |
Homologs |
| gene | snp | gene_snp |
SNPs in gene |
| gene | clinvar | gene_clinvar |
Clinical variants |
Nucleotide to Other Databases
| From | To | Link Name | Description |
|---|---|---|---|
| nucleotide | protein | nuccore_protein |
Encoded proteins |
| nucleotide | gene | nuccore_gene |
Gene records |
| nucleotide | pubmed | nuccore_pubmed |
Publications |
| nucleotide | taxonomy | nuccore_taxonomy |
Organism taxonomy |
| nucleotide | biosample | nuccore_biosample |
Sample info |
| nucleotide | sra | nuccore_sra |
Related SRA data |
Protein to Other Databases
| From | To | Link Name | Description |
|---|---|---|---|
| protein | nucleotide | protein_nuccore |
Coding sequences |
| protein | gene | protein_gene |
Gene records |
| protein | pubmed | protein_pubmed |
Publications |
| protein | structure | protein_structure |
3D structures |
| protein | cdd | protein_cdd |
Conserved domains |
PubMed Links
| From | To | Link Name | Description |
|---|---|---|---|
| pubmed | pubmed | pubmed_pubmed |
Related articles |
| pubmed | gene | pubmed_gene |
Mentioned genes |
| pubmed | protein | pubmed_protein |
Mentioned proteins |
| pubmed | nucleotide | pubmed_nuccore |
Mentioned sequences |
Code Patterns
Gene to Protein
from Bio import Entrez
Entrez.email = '[email protected]'
def get_proteins_for_gene(gene_id):
handle = Entrez.elink(dbfrom='gene', db='protein', id=gene_id, linkname='gene_protein_refseq')
record = Entrez.read(handle)
handle.close()
if not record[0]['LinkSetDb']:
return []
return [link['Id'] for link in record[0]['LinkSetDb'][0]['Link']]
protein_ids = get_proteins_for_gene('672') # BRCA1
print(f"RefSeq proteins: {protein_ids[:5]}")
Nucleotide to Gene
def get_gene_for_nucleotide(nuc_id):
handle = Entrez.elink(dbfrom='nucleotide', db='gene', id=nuc_id)
record = Entrez.read(handle)
handle.close()
if not record[0]['LinkSetDb']:
return None
return record[0]['LinkSetDb'][0]['Link'][0]['Id']
gene_id = get_gene_for_nucleotide('NM_007294')
print(f"Gene ID: {gene_id}")
Find Related PubMed Articles
def get_related_articles(pmid, max_results=10):
handle = Entrez.elink(dbfrom='pubmed', db='pubmed', id=pmid, linkname='pubmed_pubmed')
record = Entrez.read(handle)
handle.close()
if not record[0]['LinkSetDb']:
return []
links = record[0]['LinkSetDb'][0]['Link']
Установить bio-entrez-link в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
read_filerun_shell_commandВложенные файлы
FAQ
Что делает скилл bio-entrez-link?
Find cross-references between NCBI databases using Biopython Bio.Entrez. Use when navigating from genes to proteins, sequences to publications, finding related records, or discovering database relationships.
Как установить скилл bio-entrez-link?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-entrez-link запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic