Skills

Biology Biopython

Bioinformatics with Biopython for sequence manipulation, file parsing, BLAST, and...

Install

npx skills add aiming-lab/AutoResearchClaw --skill biology-biopython -g -a claude-code -y
Category
Engineering
Updated
3mo ago
License
MIT
Context cost
Lightabout 683 tokens
Runs scripts
No, instructions only

What it does

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

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
Read the whole SKILL.md on GitHub

More in Engineering