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

biology-biopython

Skill này làm gì

Skill đưa ra quy tắc làm việc với chuỗi sinh học và cơ sở dữ liệu trong Python. Dành cho nhà nghiên cứu và sinh viên xử lý file chuỗi hoặc dữ liệu di truyền.

Khi nào nên dùng

  • ✓Khi bạn làm việc với chuỗi DNA, RNA hoặc protein trong Python.
  • ✓Khi bạn cần đọc hoặc chuyển đổi file FASTA hoặc GenBank.
  • ✓Khi bạn muốn chạy tìm kiếm BLAST hoặc lấy bản ghi từ cơ sở dữ liệu NCBI.

Liên kết skill

https://github.com/aiming-lab/AutoResearchClaw/blob/main/.claude/skills/biology-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/aiming-lab/AutoResearchClaw/blob/main/.claude/skills/biology-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

“Đọc file FASTA này, dịch mỗi chuỗi DNA sang protein và báo cáo hàm lượng GC.”

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

Cách hoạt động

Agent dùng thư viện Biopython để đọc file chuỗi, tính các giá trị như hàm lượng GC, dịch DNA, và tìm trong cơ sở dữ liệu NCBI. Nó tuân theo các quy tắc như đặt địa chỉ email trước khi truy cập NCBI.

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 Bioinformatics Best Practice

Sequence Manipulation

  1. Create sequences: from Bio.Seq import Seq; seq = Seq("ATGCGA")
  2. Complement: seq.complement(); Reverse complement: seq.reverse_complement()
  3. Transcription: seq.transcribe() (DNA to RNA)
  4. Translation: seq.translate() (DNA/RNA to protein)
  5. GC content: from Bio.SeqUtils import gc_fraction; gc_fraction(seq)
  6. Molecular weight: from Bio.SeqUtils import molecular_weight

File Parsing (SeqIO)

  1. Read FASTA: for rec in SeqIO.parse("file.fasta", "fasta"): ...
  2. Read GenBank: for rec in SeqIO.parse("file.gb", "genbank"): ...
  3. Read single record: rec = SeqIO.read("file.fasta", "fasta")
  4. Write sequences: SeqIO.write(records, "output.fasta", "fasta")
  5. Convert formats: SeqIO.convert("input.gb", "genbank", "output.fasta", "fasta")
  6. Index large files: idx = SeqIO.index("large.fasta", "fasta") for random access

BLAST Operations

  1. Online BLAST: from Bio.Blast import NCBIWWW; result = NCBIWWW.qblast("blastn", "nt", seq)
  2. Parse results: from Bio.Blast import NCBIXML; records = NCBIXML.parse(result)
  3. Local BLAST: run via subprocess, parse XML output with NCBIXML
  4. Always set Entrez.email before any NCBI access
  5. Filter results by e-value (typically < 1e-5) and coverage

NCBI Database Access (Entrez)

  1. Always set email: Entrez.email = "your@email.com"
  2. Search: handle = Entrez.esearch(db="pubmed", term="query")
  3. Fetch records: handle = Entrez.efetch(db="nucleotide", id="ID", rettype="fasta")
  4. Use API key for higher rate limits (10 req/s vs 3 req/s)
  5. Respect NCBI rate limits; add delays between batch requests

Phylogenetics (Bio.Phylo)

  1. Read trees: from Bio import Phylo; tree = Phylo.read("tree.nwk", "newick")
  2. Draw trees: Phylo.draw(tree) or Phylo.draw_ascii(tree)
  3. Supported formats: newick, nexus, phyloxml
  4. Traverse clades: for clade in tree.find_clades(): ...
  5. Calculate distances: tree.distance(clade1, clade2)

Structure Analysis (Bio.PDB)

  1. Parse PDB: parser = PDBParser(); structure = parser.get_structure("id", "file.pdb")
  2. Hierarchy: Structure > Model > Chain > Residue > Atom
  3. Get atoms: iterate through structure.get_atoms()
  4. Calculate distances: use atom coordinate vectors
  5. For mmCIF files: use MMCIFParser() instead of PDBParser()

Common Pitfalls

  1. Always handle SeqIO.parse as an iterator — it exhausts after one pass
  2. Check sequence alphabet compatibility before operations
  3. Large files: use SeqIO.index() not SeqIO.to_dict() to avoid memory issues
  4. Set proper timeout for remote BLAST queries (can take minutes)
  5. Validate parsed data — missing annotations are common in public databases
Câu hỏi thường gặp

Tôi có cần đặt gì trước khi dùng NCBI không?

Có. Skill nói phải đặt địa chỉ email của bạn trước khi truy cập cơ sở dữ liệu NCBI.

Nó có xử lý được file lớn không?

Có. Nó có thể lập chỉ mục file FASTA lớn để truy cập ngẫu nhiên.

Nó có chạy BLAST cục bộ được không?

Có. Nó có thể chạy BLAST qua lệnh cục bộ và phân tích đầu ra XML, hoặc tìm kiếm trực tuyến.

Chi tiết

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

Bioinformatics with Biopython for sequence manipulation, file parsing, BLAST, and phylogenetics. Use when working with DNA/RNA/protein sequences or biological databases.

repo: aiming-lab/AutoResearchClaw

Độ phổ biến

Sao GitHub
15k
Vị trí xếp hạng
#11045
Giấy phép
MIT
Cập nhật
19/8/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ự