본문으로 건너뛰기
Skillpedia
데이터베이스51k · #3433

bioservices

하는 일

BioServices는 UniProt, KEGG 같은 생물학 데이터베이스를 연결하도록 돕는 도구입니다. 연구자들이 단백질, 유전자, 화합물에 대한 정보를 검색하고, 생물학적 네트워크 안에서 이들이 어떻게 관련되는지 찾을 수 있게 합니다.

사용하는 경우

  • ✓여러 데이터베이스에 걸쳐 특정 단백질에 대한 정보가 필요할 때.
  • ✓특정 유전자가 어떤 생물학 경로에 관여하는지 알고 싶을 때.
  • ✓한 화합물 식별자를 다른 식별자로 변환해야 할 때(예: ChEBI에서 ChEMBL로).

스킬 링크

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/bioservices/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/bioservices/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“사람의 ZAP70 단백질에 대한 정보를 찾아, 그 accession 코드와 유전자 이름을 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 질의를 온라인 생물학 서비스에 보내 답을 모읍니다. 여러 데이터베이스와 통신하는 방법을 알고 있으며, 결과를 사용자가 이해하기 쉽게 번역해 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

BioServices

When to use

Use BioServices when combining protein annotation, gene/pathway membership, compound cross-references, or genomic resources in Python. Its service clients share transport helpers, but their request parameters and return types differ. Use the service reference before composing clients; method names from PubChemPy, mygene, or older BioServices are not portable.

Targets bioservices 1.16.0, the current PyPI release at review. Package metadata allows Python >=3.9,<4; the bundled tests were run in an isolated Python 3.13 environment. The previous 3.12 upper bound was not a package requirement.

uv pip install "bioservices==1.16.0"

Workflow

  1. Resolve the requested organism and entity to stable accessions. Review search hits before selecting one; gene symbols and compound names may be ambiguous.
  2. Inspect the service's actual response type, including pagination and errors. BioServices can return an integer-like HTTP error or None, not only raise.
  3. Preserve one-to-many mappings, failed identifiers, taxonomy, database release, query parameters, and retrieval date alongside derived tables.
  4. Distinguish annotations and inferred associations from experimental evidence. Pathway membership alone is not an enrichment analysis or causal finding.
  5. Run a small lookup before batching; honor provider limits and retain failures separately from confirmed empty results.

Protein search, sequence retrieval, and mapping

from bioservices import UniProt

u = UniProt(verbose=False)
u.services.TIMEOUT = 30
rows = u.search(
    "gene_exact:ZAP70 AND organism_id:9606 AND reviewed:true",
    frmt="tsv", columns="accession,gene_names,organism_name,length",
    limit=5, size=5,
)
if not isinstance(rows, str):
    raise RuntimeError("UniProt search failed")
print(rows)
fasta = u.retrieve("P43403", frmt="fasta")
record = u.retrieve("P43403", frmt="json")

mapping = u.mapping(fr="UniProtKB_AC-ID", to="KEGG", query="P43403")
if not isinstance(mapping, dict) or "results" not in mapping:
    raise RuntimeError("Mapping incomplete or failed")
kegg_ids = [row["to"] for row in mapping["results"] if row["from"] == "P43403"]
print(kegg_ids, mapping.get("failedIds", []))

Use frmt="tsv", not "tab"; current field names include accession, gene_names, organism_name, protein_name, go_id, and xref_pdb. mapping() returns a results/failedIds envelope, not a source-to-list dictionary. Mapping to UniProt uses to="UniProtKB" and returns full records in row["to"]; extract primaryAccession. UniProtKB_AC-ID is a source code. See identifier mapping for allowed pairs, normalization, and limits. For bounded searches set size=limit (at most 500); 1.16.0 mixes the two values in its pagination loop.

KEGG pathways and networks

from bioservices import KEGG

k = KEGG(verbose=False)
k.services.url = "https://rest.kegg.jp"
pathway_names = k.get_pathway_by_gene("7535", "hsa")  # dict: pathway ID -> name
print(pathway_names)
kgml = k.parse_kgml_pathway("hsa04660")
entries = {entry["id"]: entry for entry in kgml["entries"]}
for relation in kgml["relations"][:5]:
    print(entries[relation["entry1"]]["name"], relation["name"],
          entries[relation["entry2"]]["name"])

The reviewed /list/organism endpoint returned HTTP 400 despite remaining in the manual. SDK methods that validate against that catalogue can fail. The bundled compound and pathway-list scripts use the documented scoped endpoints through k.services.http_get to avoid that unrelated catalogue dependency.

KEGG get permits at most ten entries; KGML permits one pathway per request. Keep requests at or below three per second. list/find return TSV strings; get returns a flat-file string unless an option changes the representation. KGML entries include genes, compounds, groups, and maps. A relation can produce several subtype records; those counts are neither unique genes nor independent physical interactions. Entry IDs are local to each pathway. The bundled SIF export namespaces them as pathway#entry so combining pathways cannot merge unrelated nodes. pathway2sif(..., uniprot=False) is an optional lossy projection of gene-to-gene activation/inhibition, not a complete pathway network.

Compound cross-references

from bioservices import UniChem

uc = UniChem(verbose=False)

…
자주 묻는 질문

UniProt, KEGG, ChEMBL, Reactome, QuickGO는 무엇인가요?

단백질, 유전자, 화합물, 생물학적 과정에 대한 정보를 저장하는 대규모 데이터베이스입니다.

‘단백질 주석(annotation)’이란 무엇인가요?

단백질에 기능, 위치, 상호작용 같은 설명 정보를 추가하는 과정입니다.

생물학적 ‘경로’란 무엇인가요?

세포 안에서 일어나 특정 산물이나 세포 변화로 이어지는 분자 상호작용의 순서입니다.

상세 정보

작성자의 원본 설명

Provides a Python interface to bioinformatics services including UniProt, KEGG, ChEMBL, Reactome, QuickGO, and UniChem. Used for cross-database protein annotation, pathway retrieval, chemical identifier mapping, and integrated biological data workflows with BioServices.

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3433
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬