Logo Ncbi Gene

Ncbi Gene

Tổ chức
ai4protein
ncbi_gene

Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.

Add to TypingMind

Tổng quan

Nhà phát hànhai4protein
Kho mãVenusFactory2
Tên kỹ năngncbi_gene
Sao
255
Bản fork
37
Tệp đi kèm
2
Giấy phépUnknown
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được ai4protein công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ncbi Gene trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/ai4protein/VenusFactory2/tree/main/src/agent/skills/ncbi_gene
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai4protein/VenusFactory2.git /tmp/VenusFactory2
mkdir -p .claude/skills
cp -r /tmp/VenusFactory2/src/agent/skills/ncbi_gene .claude/skills/ncbi_gene
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ncbi Gene trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ncbi Gene ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ncbi Gene với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

NCBI Gene Database

Overview

NCBI Gene is a comprehensive database integrating gene information from diverse species. It provides nomenclature, reference sequences (RefSeqs), chromosomal maps, biological pathways, genetic variations, phenotypes, and cross-references to global genomic resources. In this project the agent exposes 3 download tools: fetch gene data by ID or symbol (Datasets API), and batch lookup by symbols. For finer control, ncbi_operations.py also provides E-utilities download/query functions (esearch, esummary, efetch) and additional batch operations. All download/query functions return rich JSON {status, file_info/content, content_preview, biological_metadata, execution_context}.

When to Use This Skill

This skill should be used when working with gene data including searching by gene symbol or ID, retrieving gene sequences and metadata, analyzing gene functions and pathways, or performing batch gene lookups.

Quick Start

The skill provides:

  1. Project modules in src/tools/database/ncbi/: fetch_gene_data.py (Datasets API), query_gene.py (E-utilities), batch_gene_lookup.py (batch operations), ncbi_operations.py (query/download operations); gene download functions re-exported via package.
  2. References: references/api_reference.md, references/common_workflows.md

NCBI provides two main APIs:

  • Datasets API — Optimized for gene data retrieval; used by download_ncbi_gene_by_id and download_ncbi_gene_by_symbol tools
  • E-utilities — Full-featured API for complex queries; used by the esearch/esummary/efetch programmatic functions

Agent Tools (Download Only)

Tool nameArgumentsPurpose
download_ncbi_gene_by_idgene_id, out_pathDownload gene data by NCBI Gene ID (Datasets API) to JSON
download_ncbi_gene_by_symbolsymbol, taxon, out_pathDownload gene data by symbol and organism (Datasets API) to JSON
download_ncbi_batch_lookup_by_symbolsgene_symbols, organism, out_pathBatch lookup multiple genes by symbols to JSON

Also available as general NCBI tools (useful in gene workflows):

Tool nameArgumentsPurpose
download_ncbi_sequencencbi_id, out_path, db (optional)Download NCBI sequence by accession (FASTA)
download_ncbi_metadatancbi_id, out_path, db, rettype (optional)Download NCBI metadata (GenBank/XML)
download_ncbi_blastsequence, out_path, program, database, etc.Submit BLAST search and download XML

Project Modules (Programmatic Use)

CapabilityFunctionModulePurpose
Fetch by IDfetch_gene_by_id(gene_id, api_key)fetch_gene_data.pyDatasets API: gene data as dict
Fetch by symbolfetch_gene_by_symbol(symbol, taxon, api_key)fetch_gene_data.pyDatasets API: gene data as dict
Fetch multiplefetch_multiple_genes(gene_ids, api_key)fetch_gene_data.pyDatasets API: multiple genes at once
Taxon lookupget_taxon_id(taxon_name)fetch_gene_data.pyConvert name to NCBI taxon ID
E-util searchesearch(query, retmax, api_key)query_gene.pySearch Gene DB, returns Gene IDs
E-util summaryesummary(gene_ids, api_key)query_gene.pyGet document summaries by Gene IDs
E-util fetchefetch(gene_ids, retmode, api_key)query_gene.pyFetch full gene records (XML/text)
Search+summarizesearch_and_summarize(query, organism, max_results, api_key)query_gene.pyConvenience: search + display
Batch searchbatch_esearch(queries, organism, api_key)batch_gene_lookup.pySearch multiple symbols → ID map
Batch summarybatch_esummary(gene_ids, api_key, chunk_size)batch_gene_lookup.pySummaries in chunks
Batch by IDsbatch_lookup_by_ids(gene_ids, api_key)batch_gene_lookup.pyStructured gene data by IDs
Batch by symbolsbatch_lookup_by_symbols(gene_symbols, organism, api_key)batch_gene_lookup.pyStructured gene data by symbols
Query: by IDquery_ncbi_gene_by_id(gene_id)ncbi_operations.pyReturns rich JSON in memory
Query: by symbolquery_ncbi_gene_by_symbol(symbol, taxon)ncbi_operations.pyReturns rich JSON in memory
Query: esearchquery_ncbi_gene_esearch(query, retmax)ncbi_operations.pyReturns rich JSON in memory
Query: esummaryquery_ncbi_gene_esummary(gene_ids)ncbi_operations.pyReturns rich JSON in memory
Query: efetchquery_ncbi_gene_efetch(gene_ids, retmode)ncbi_operations.pyReturns rich JSON in memory
Query: batch searchquery_ncbi_batch_esearch(queries, organism)ncbi_operations.pyReturns rich JSON in memory
Query: batch by IDsquery_ncbi_batch_lookup_by_ids(gene_ids)ncbi_operations.pyReturns rich JSON in memory
Query: batch by symbolsquery_ncbi_batch_lookup_by_symbols(gene_symbols, organism)ncbi_operations.pyReturns rich JSON in memory
Download: by IDdownload_ncbi_gene_by_id(gene_id, out_path)ncbi_operations.pySave to file, return rich JSON
Download: by symboldownload_ncbi_gene_by_symbol(symbol, taxon, out_path)ncbi_operations.pySave to file, return rich JSON
Download: esearchdownload_ncbi_gene_esearch(query, out_path, retmax)ncbi_operations.pySave to file, return rich JSON
Download: esummarydownload_ncbi_gene_esummary(gene_ids, out_path)ncbi_operations.pySave to file, return rich JSON
Download: efetchdownload_ncbi_gene_efetch(gene_ids, out_path, retmode)ncbi_operations.pySave to file, return rich JSON
Download: batch searchdownload_ncbi_batch_esearch(queries, out_path, organism)ncbi_operations.pySave to file, return rich JSON
Download: batch by IDsdownload_ncbi_batch_lookup_by_ids(gene_ids, out_path)ncbi_operations.pySave to file, return rich JSON
Download: batch by symbolsdownload_ncbi_batch_lookup_by_symbols(gene_symbols, organism, out_path)ncbi_operations.pySave to file, return rich JSON

Core Capabilities

1. Download Gene by ID (Datasets API)

python
from src.tools.database.ncbi import download_ncbi_gene_by_id

result = download_ncbi_gene_by_id("672", "output/ncbi_gene_brca1.json")
# Returns rich JSON with gene metadata, RefSeqs, GO annotations, etc.

2. Download Gene by Symbol (Datasets API)

python
from src.tools.database.ncbi import download_ncbi_gene_by_symbol

result = download_ncbi_gene_by_symbol("BRCA1", "human", "output/ncbi_gene_brca1_by_symbol.json")
result = download_ncbi_gene_by_symbol("TP53", "Homo sapiens", "output/ncbi_gene_tp53.json")

3. Batch Lookup by Symbols

python
from src.tools.database.ncbi import download_ncbi_batch_lookup_by_symbols

result = download_ncbi_batch_lookup_by_symbols(
    ["BRCA1", "TP53", "EGFR"], "human", "output/ncbi_genes_batch.json"
)

4. E-utilities Workflow (programmatic)

python
from src.tools.database.ncbi.ncbi_operations import (
    query_ncbi_gene_esearch,
    download_ncbi_gene_esummary,
    download_ncbi_gene_efetch,
)

# Step 1: Search for gene IDs
esearch_result = query_ncbi_gene_esearch("BRCA1[gene] AND human[organism]", retmax=10)

# Step 2: Download summaries or full records
download_ncbi_gene_esummary(["672", "7157"], "output/gene_summaries.json")
download_ncbi_gene_efetch(["672"], "output/gene_full_record.xml")

5. Low-Level Direct Access (programmatic)

python
from src.tools.database.ncbi.fetch_gene_data import fetch_gene_by_id, fetch_gene_by_symbol
from src.tools.database.ncbi.query_gene import esearch, esummary, efetch
from src.tools.database.ncbi.batch_gene_lookup import batch_lookup_by_symbols

# Datasets API
gene_data = fetch_gene_by_id("672")
gene_data = fetch_gene_by_symbol("BRCA1", "human")

# E-utilities
gene_ids = esearch("insulin[gene] AND human[organism]")
summaries = esummary(gene_ids)
records = efetch(gene_ids, retmode="xml")

# Batch
results = batch_lookup_by_symbols(["BRCA1", "TP53"], "human")

Common Workflows

Workflow 1: Gene Annotation (download)

python
from src.tools.database.ncbi import (
    download_ncbi_gene_by_symbol,
    download_ncbi_batch_lookup_by_symbols,
)

# Single gene
download_ncbi_gene_by_symbol("BRCA1", "human", "output/brca1_annotation.json")

# Gene panel
download_ncbi_batch_lookup_by_symbols(
    ["BRCA1", "BRCA2", "TP53", "PTEN", "ATM"], "human", "output/cancer_panel.json"
)

Workflow 2: Gene Search and Retrieve (programmatic)

python
from src.tools.database.ncbi.ncbi_operations import (
    query_ncbi_gene_esearch,
    download_ncbi_gene_by_id,
)
import json

# Search by complex query
result = query_ncbi_gene_esearch("p53 AND human[organism]", retmax=5)
parsed = json.loads(result)

# Download details for each hit
if parsed.get("status") == "success":
    content = json.loads(parsed["content"])
    for gene_id in content.get("gene_ids", []):
        download_ncbi_gene_by_id(str(gene_id), f"output/gene_{gene_id}.json")

Workflow 3: Cross-Database Integration

python
from src.tools.database.ncbi import (
    download_ncbi_gene_by_id,
    download_ncbi_sequence,
    download_ncbi_metadata,
)

# Step 1: Get comprehensive gene info
download_ncbi_gene_by_id("672", "output/brca1_gene_info.json")

# Step 2: Download protein sequence
download_ncbi_sequence("NP_009225.1", "output/brca1_protein.fasta", db="protein")

# Step 3: Download GenBank metadata
download_ncbi_metadata("NP_009225.1", "output/brca1_metadata.gb", db="protein")

Search Query Patterns

Example E-utilities query patterns for NCBI Gene:

  • Gene symbol: insulin[gene name] AND human[organism]
  • Gene with disease: dystrophin[gene name] AND muscular dystrophy[disease]
  • Chromosome location: human[organism] AND 17q21[chromosome]
  • GO term: GO:0006915[biological process] (apoptosis)
  • Phenotype: diabetes[phenotype] AND mouse[organism]
  • Pathway: insulin signaling pathway[pathway]

API Access

Rate Limits:

  • Without API key: 3 requests/second for E-utilities, 5 requests/second for Datasets API
  • With API key: 10 requests/second for both APIs

Authentication: Register for a free NCBI API key at https://www.ncbi.nlm.nih.gov/account/ to increase rate limits.

Data Formats

NCBI Gene data can be retrieved in multiple formats:

FormatUse case
JSONModern applications, programmatic processing
XMLLegacy systems, detailed metadata
GenBankSequence data with annotations
FASTASequence analysis workflows

Best Practices

  1. Always specify organism when searching by gene symbol to avoid ambiguity
  2. Use Gene IDs for precise lookups when available
  3. Batch requests when working with multiple genes to minimize API calls
  4. Cache results locally to reduce redundant queries
  5. Include API key in environment for higher rate limits
  6. Handle errors gracefully with retry logic for transient failures

Resources

Helper Scripts

  • fetch_gene_data.py — NCBI Datasets API: fetch_gene_by_id(), fetch_gene_by_symbol(), fetch_multiple_genes()
  • query_gene.py — E-utilities: esearch(), esummary(), efetch(), search_and_summarize()
  • batch_gene_lookup.py — Batch: batch_esearch(), batch_esummary(), batch_lookup_by_ids(), batch_lookup_by_symbols()

Reference Documentation

  • references/api_reference.md — E-utilities and Datasets API documentation, endpoints, parameters, response formats
  • references/common_workflows.md — Additional examples and use case patterns

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Ncbi Gene làm được gì?

Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.

Vì sao nên dùng Ncbi Gene trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ncbi Gene là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ncbi Gene trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ai4protein/VenusFactory2/tree/main/src/agent/skills/ncbi_gene. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ncbi Gene?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ncbi Gene với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ncbi Gene với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ncbi Gene có miễn phí không?

Có. Kỹ năng này được ai4protein phát hành trên GitHub theo giấy phép Unknown. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇