biology-biopython
Bioinformatics with Biopython for sequence manipulation, file parsing, BLAST, and phylogenetics. Use when working with DNA/RNA/protein sequences or biological databases.
pinned to #ea77ec1updated 3 months ago
Ask your AI client: “install skills/biology-biopython”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/biology-biopythonmetahub onboarded this repo on the author's behalf.
If you own github.com/aiming-lab/AutoResearchClaw on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
13,760
Last commit
3 months ago
Latest release
published
- #autonomous-research
- #citation-verification
- #llm-agents
- #metaclaw
- #multi-agent-debate
- #openclaw
- #paper-generation
- #scientific-discovery
- #self-evolving
Automated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.ea77ec1· 3 months ago
Behavioral checks ran but aren't published for this artifact; the static checks above ran at publish time.
Kind-specific
3 passed1 warningSkill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: SKILL.md present
found at .claude/skills/biology-biopython/SKILL.md · frontmatter source: SKILL.md
Skill: body content present
351 words · 2,730 chars · 8 sections
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrentea77ec1warn3 months ago
Contents
Biopython Bioinformatics Best Practice
Sequence Manipulation
- Create sequences:
from Bio.Seq import Seq; seq = Seq("ATGCGA") - Complement:
seq.complement(); Reverse complement:seq.reverse_complement() - Transcription:
seq.transcribe()(DNA to RNA) - Translation:
seq.translate()(DNA/RNA to protein) - GC content:
from Bio.SeqUtils import gc_fraction; gc_fraction(seq) - Molecular weight:
from Bio.SeqUtils import molecular_weight
File Parsing (SeqIO)
- Read FASTA:
for rec in SeqIO.parse("file.fasta", "fasta"): ... - Read GenBank:
for rec in SeqIO.parse("file.gb", "genbank"): ... - Read single record:
rec = SeqIO.read("file.fasta", "fasta") - Write sequences:
SeqIO.write(records, "output.fasta", "fasta") - Convert formats:
SeqIO.convert("input.gb", "genbank", "output.fasta", "fasta") - Index large files:
idx = SeqIO.index("large.fasta", "fasta")for random access
BLAST Operations
- Online BLAST:
from Bio.Blast import NCBIWWW; result = NCBIWWW.qblast("blastn", "nt", seq) - Parse results:
from Bio.Blast import NCBIXML; records = NCBIXML.parse(result) - Local BLAST: run via subprocess, parse XML output with NCBIXML
- Always set
Entrez.emailbefore any NCBI access - Filter results by e-value (typically < 1e-5) and coverage
NCBI Database Access (Entrez)
- Always set email:
Entrez.email = "[email protected]" - Search:
handle = Entrez.esearch(db="pubmed", term="query") - Fetch records:
handle = Entrez.efetch(db="nucleotide", id="ID", rettype="fasta") - Use API key for higher rate limits (10 req/s vs 3 req/s)
- Respect NCBI rate limits; add delays between batch requests
Phylogenetics (Bio.Phylo)
- Read trees:
from Bio import Phylo; tree = Phylo.read("tree.nwk", "newick") - Draw trees:
Phylo.draw(tree)orPhylo.draw_ascii(tree) - Supported formats: newick, nexus, phyloxml
- Traverse clades:
for clade in tree.find_clades(): ... - Calculate distances:
tree.distance(clade1, clade2)
Structure Analysis (Bio.PDB)
- Parse PDB:
parser = PDBParser(); structure = parser.get_structure("id", "file.pdb") - Hierarchy: Structure > Model > Chain > Residue > Atom
- Get atoms: iterate through
structure.get_atoms() - Calculate distances: use atom coordinate vectors
- For mmCIF files: use
MMCIFParser()instead ofPDBParser()
Common Pitfalls
- Always handle
SeqIO.parseas an iterator — it exhausts after one pass - Check sequence alphabet compatibility before operations
- Large files: use
SeqIO.index()notSeqIO.to_dict()to avoid memory issues - Set proper timeout for remote BLAST queries (can take minutes)
- Validate parsed data — missing annotations are common in public databases
Reviews
No reviews yet. Be the first.
Related
Verification Before Completion
Evidence before assertions, always
Writing Plans
Turn specs into phased implementation plans
Test-Driven Development
Red → green → refactor discipline for any feature or bugfix
mh install skills/biology-biopython