Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính51k · #3432

biopython

Skill này làm gì

Công cụ này giúp bạn làm việc với thông tin sinh học phân tử, như trình tự DNA hoặc protein. Bạn có thể đọc, ghi và xử lý dữ liệu này, đồng thời truy cập các cơ sở dữ liệu khoa học.

Khi nào nên dùng

  • ✓Khi bạn có trình tự DNA hoặc protein cần phân tích.
  • ✓Khi bạn cần đọc hoặc lưu các tệp dữ liệu sinh học (như FASTA hoặc GenBank).
  • ✓Khi bạn tìm kiếm thông tin trong các cơ sở dữ liệu khoa học như PubMed.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/biopython/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích trình tự DNA này và cho tôi biết hàm lượng GC của nó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng thư viện có tên Biopython, chứa nhiều hàm có sẵn cho các tác vụ thường gặp trong sinh học tính toán. Nó có thể đọc nhiều định dạng tệp khác nhau và kết nối với các cơ sở dữ liệu trực tuyến.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Biopython: Computational Molecular Biology in Python

Overview

Biopython is a comprehensive set of freely available Python tools for biological computation. It provides functionality for sequence manipulation, file I/O, database access, structural bioinformatics, phylogenetics, and many other bioinformatics tasks. These examples target Biopython 1.88 (released 6 August 2026), tested here on Python 3.13. It requires Python 3.10+ and NumPy; Python 3.10 support is deprecated. Upgrade to 1.88 for its Bio.Nexus parser security fix, in addition to the Entrez XML fix in 1.87. See the release notes. Local example checks and external-service limits are recorded in references/review.md; examples requiring user files or external programs are illustrative unless listed there as exercised.

When to Use This Skill

Use this skill when:

  • Working with biological sequences (DNA, RNA, or protein)
  • Reading, writing, or converting biological file formats (FASTA, GenBank, FASTQ, PDB, mmCIF, etc.)
  • Accessing NCBI databases (GenBank, PubMed, Protein, Gene, etc.) via Entrez
  • Running BLAST searches or parsing BLAST results
  • Performing sequence alignments (pairwise or multiple sequence alignments)
  • Analyzing protein structures from PDB files
  • Creating, manipulating, or visualizing phylogenetic trees
  • Finding sequence motifs or analyzing motif patterns
  • Calculating sequence statistics (GC content, molecular weight, melting temperature, etc.)
  • Performing structural bioinformatics tasks
  • Working with population genetics data
  • Any other computational molecular biology task

Core Capabilities

Biopython is organized into modular sub-packages, each addressing specific bioinformatics domains:

  1. Sequence Handling - Bio.Seq and Bio.SeqIO for sequence manipulation and file I/O
  2. Alignment Analysis - Bio.Align and Bio.AlignIO for pairwise and multiple sequence alignments
  3. Database Access - Bio.Entrez for programmatic access to NCBI databases
  4. BLAST Operations - Bio.Blast for running and parsing BLAST searches
  5. Structural Bioinformatics - Bio.PDB for working with 3D protein structures
  6. Phylogenetics - Bio.Phylo for phylogenetic tree manipulation and visualization
  7. Advanced Features - Motifs, population genetics, sequence utilities, and more

Installation and Setup

Install the current stable Biopython release with an explicit version pin for reproducibility:

uv pip install "biopython==1.88"

For NCBI database access, always set your email address (required by NCBI). For reusable software, set a stable Entrez.tool value and register the tool/email with NCBI. For higher rate limits (10 req/s instead of 3 req/s), read only NCBI_API_KEY from the environment — do not hardcode keys or load unrelated environment variables:

import os
from Bio import Entrez

Entrez.email = "your.email@example.com"  # required — use your real email
Entrez.tool = "your_tool_name"  # optional but recommended for reusable software

# Optional: register at https://www.ncbi.nlm.nih.gov/account/settings/
if api_key := os.environ.get("NCBI_API_KEY"):
    Entrez.api_key = api_key

Using This Skill

This skill provides comprehensive documentation organized by functionality area. When working on a task, consult the relevant reference documentation:

1. Sequence Handling (Bio.Seq & Bio.SeqIO)

Reference: references/sequence_io.md

Use for:

  • Creating and manipulating biological sequences
  • Reading and writing sequence files (FASTA, GenBank, FASTQ, etc.)
  • Converting between file formats
  • Extracting sequences from large files
  • Sequence translation, transcription, and reverse complement
  • Working with SeqRecord objects

Quick example:

from Bio import SeqIO

# Read sequences from FASTA file
for record in SeqIO.parse("sequences.fasta", "fasta"):
    print(f"{record.id}: {len(record.seq)} bp")

# Convert GenBank to FASTA
SeqIO.convert("input.gb", "genbank", "output.fasta", "fasta")

2. Alignment Analysis (Bio.Align & Bio.AlignIO)

Reference: references/alignment.md

Use for:

  • Pairwise sequence alignment (global and local)
  • Reading and writing multiple sequence alignments
  • Using substitution matrices (BLOSUM, PAM)
  • Calculating alignment statistics
  • Customizing alignment parameters

Quick example:

from Bio import Align

# Pairwise alignment

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

Tôi có cần biết lập trình để dùng công cụ này không?

Bạn không cần là lập trình viên giàu kinh nghiệm. Công cụ đơn giản hóa việc sử dụng các hàm, nhưng hiểu rõ mục tiêu của bạn với dữ liệu sinh học vẫn rất hữu ích.

Công cụ truy cập cơ sở dữ liệu như thế nào?

Nó dùng hệ thống Entrez để kết nối với các cơ sở dữ liệu của NCBI, như PubMed và GenBank, cho phép bạn tìm kiếm và tải thông tin trực tiếp.

Công cụ hiểu những loại tệp nào?

Nó hiểu nhiều định dạng sinh học phổ biến như FASTA, GenBank, PDB và các định dạng khác, giúp dễ dàng trao đổi dữ liệu giữa các chương trình.

Chi tiết

Mô tả gốc của tác giả

Provides Biopython workflows for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Supports batch processing, custom molecular-biology pipelines, BLAST automation, structure analysis, and motif analysis.

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

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3432
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự