Biopython Bioinformatics
aiming-lab/AutoResearchClaw
Quick reference for Biopython work: sequence operations, SeqIO file parsing, BLAST searches, Entrez queries, phylogenetic trees and PDB structure analysis.
Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install GPTomics/bioSkills bio-write-sequences --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/sequence-io/write-sequences .claude/skills/bio-write-sequences && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .claude/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequencesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install GPTomics/bioSkills bio-write-sequences --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/sequence-io/write-sequences .agents/skills/bio-write-sequences && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .agents/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install GPTomics/bioSkills bio-write-sequences --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/sequence-io/write-sequences .cursor/skills/bio-write-sequences && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .cursor/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/GPTomics/bioSkills.git --path sequence-io/write-sequences--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install GPTomics/bioSkills bio-write-sequences --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/sequence-io/write-sequences .gemini/skills/bio-write-sequences && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .gemini/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install GPTomics/bioSkills bio-write-sequencesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .github/skills && cp -r skills-src/sequence-io/write-sequences .github/skills/bio-write-sequences && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .github/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add GPTomics/bioSkills --skill bio-write-sequences -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install GPTomics/bioSkills bio-write-sequences --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/sequence-io/write-sequences .opencode/skills/bio-write-sequences && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bio-write-sequences" agent skill from https://github.com/GPTomics/bioSkills/tree/main/sequence-io/write-sequences into .opencode/skills/bio-write-sequences/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bio-write-sequences", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bio-write-sequencesWrite biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.
Bio Write Sequences is an agent skill from GPTomics/bioSkills. Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO. Use when saving sequences, creating new sequence files, or outputting modified records.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `examples/basic_writing.py` and `usage-guide.md`).
It sits in Research & Science, covering Bioinformatics. It works with NCBI and Biopython. The repository describes itself as: a set of SKILLS.md for doing bioinformatics with agents like claude code. The licence is MIT.
Read from SKILL.md and the folder at commit d91ed3d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
pipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bio Write Sequences loads about 2.1k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 845 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from GPTomics/bioSkills at commit d91ed3d, republished under its MIT licence (© GPTomics). 845 words, ~2,133 tokens.
.claude/skills/bio-write-sequences/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Reference examples tested with: BioPython 1.83+
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signaturesIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Write sequences to a file" -> Serialize SeqRecord objects into a formatted sequence file.
SeqIO.write() (BioPython)writeXStringSet() (Biostrings)The write is only as complete as the SeqRecord. Each format reads specific record fields and silently ignores the rest, so what survives a write is decided by which fields are populated before the call, not by the format string. FASTA serializes only id/description+seq; FASTQ additionally requires letter_annotations['phred_quality']; GenBank/EMBL additionally require annotations['molecule_type']. Populate the fields a format needs, or the write either drops data quietly (FASTA) or raises (FASTQ/GenBank).
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecordSeqIO.write(records, 'output.fasta', 'fasta')records - Single SeqRecord, list, or iterator of SeqRecordshandle - Filename (string) or open file handleformat - Lowercase output format stringformatted = record.format('fasta')FASTA output is built from record.description, NOT record.id. The writer compares the first whitespace token of description to id: if they match it writes description as-is; otherwise it prepends id + a space. When a record is parsed from FASTA, description already leads with the id token, so a round trip is faithful. But when id and description are set independently, a stale id-like token inside the description gets duplicated, and older BioPython releases dropped the id entirely instead of prepending it.
| record.id | record.description | Header written |
|---|---|---|
seq1 | seq1 kinase domain | >seq1 kinase domain (clean: description leads with id) |
seq1 | kinase domain | >seq1 kinase domain (id auto-prepended) |
seq1 | `` (empty) | >seq1 (id used as fallback) |
seq1 | gene7 kinase domain | >seq1 gene7 kinase domain (stale id duplicated) |
To control the header exactly and stay robust across versions, make description begin with id + a space: description=f'{rec_id} kinase domain'. The FASTA writer wraps the sequence at 60 characters per line by default.
| Format | String | Record fields read | Hard requirement |
|---|---|---|---|
| FASTA | 'fasta' | id/description, seq | none (header trap above) |
| FASTQ | 'fastq' | seq, letter_annotations | phred quality scores |
| GenBank | 'genbank' / 'gb' | seq, annotations, features | molecule_type |
| EMBL | 'embl' | seq, annotations, features | molecule_type |
| Tab | 'tab' | id, seq | none |
Goal: Construct in-memory records that carry the fields the target format requires.
Approach: Build a SeqRecord from a Seq plus id; add letter_annotations['phred_quality'] for FASTQ and annotations['molecule_type'] for GenBank/EMBL.
"Create a sequence record from scratch" -> Wrap a Seq in a SeqRecord with metadata.
SeqRecord(Seq(...), id=...) (BioPython)record = SeqRecord(Seq('ATGCGATCGATCG'), id='seq1', description='seq1 example sequence')records = [SeqRecord(Seq('ATGC'), id='seq1'), SeqRecord(Seq('GCTA'), id='seq2')]
count = SeqIO.write(records, 'output.fasta', 'fasta')with open('output.fasta', 'w') as handle:
SeqIO.write(records, handle, 'fasta')
with open('output.fasta', 'a') as handle:
SeqIO.write(new_records, handle, 'fasta')Goal: Transform sequences in memory and write the modified versions to a new file.
Approach: Parse input, map a transform over a generator, write the generator. Streaming avoids loading every record into RAM.
"Modify sequences and save" -> Parse records, transform each, write with SeqIO.write().
def uppercase_record(rec):
return SeqRecord(rec.seq.upper(), id=rec.id, description=rec.description)
records = SeqIO.parse('input.fasta', 'fasta')
modified = (uppercase_record(rec) for rec in records)
SeqIO.write(modified, 'output.fasta', 'fasta')FASTQ requires letter_annotations['phred_quality'] as a list of ints. letter_annotations is length-locked to len(seq): assigning a list whose length differs from the sequence raises. Set the sequence first, then the quality list of matching length.
record = SeqRecord(Seq('ATGCGATCG'), id='read1')
record.letter_annotations['phred_quality'] = [40] * len(record.seq)
SeqIO.write(record, 'output.fastq', 'fastq')When both phred_quality and solexa_quality keys are present, the writer uses Phred. Writing 'fastq-solexa' from a Phred-only record forces an on-the-fly lossy conversion (the scales diverge in the low-quality region) and emits a BiopythonWarning once any score reaches the high end (max quality >= ~62). For modern data, write plain 'fastq' (Sanger/Phred+33); only use 'fastq-solexa'/'fastq-illumina' when a tool explicitly demands that legacy encoding.
GenBank and EMBL writing requires annotations['molecule_type'] (the alphabet that once carried this was removed in BioPython 1.78). Missing it raises on write.
record = SeqRecord(Seq('ATGCGATCGATCG'), id='SEQ001', name='example')
record.annotations['molecule_type'] = 'DNA'
record.annotations['topology'] = 'linear'
record.annotations['organism'] = 'Example organism'
SeqIO.write(record, 'output.gb', 'genbank')| Symptom | Cause | Fix |
|---|---|---|
| Header has a duplicated or mangled id | FASTA builds the header from description; it does not lead with id + space | Set description=f'{rec.id} ...' or leave description empty to fall back to id |
ValueError: No suitable quality scores found in letter_annotations of SeqRecord (id=...) on FASTQ write | Record has no letter_annotations['phred_quality'] | Assign record.letter_annotations['phred_quality'] = [q]*len(seq) |
TypeError: Any per-letter annotation should be a Python sequence ... of the same length | Quality list length != len(seq) (annotations are length-locked) | Set seq first, then a quality list of matching length |
ValueError: missing molecule_type ... on GenBank/EMBL write | No annotations['molecule_type'] since the 1.78 alphabet removal | Add record.annotations['molecule_type'] = 'DNA' (or 'RNA'/'protein') |
BiopythonWarning: Data loss - max Solexa quality ... | Writing 'fastq-solexa' from a high Phred-only record forces lossy conversion | Write plain 'fastq' unless a tool requires the Solexa encoding |
TypeError passing a raw str/Seq to write | SeqIO.write expects SeqRecord(s) | Wrap the sequence in a SeqRecord first |
ValueError: Sequences must all be the same length | PHYLIP/alignment format with unequal lengths | Align, pad, or trim to equal length first |
© GPTomics, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in sequence-io/write-sequences of GPTomics/bioSkills.
Open the folder on GitHubat commit d91ed3d
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in GPTomics/bioSkills, which our catalogue first saw on October 7, 2026.
Bio Write Sequences next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bio Write Sequences this skillGPTomics/bioSkills | 1.2k | 3 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Biopython Bioinformaticsaiming-lab/AutoResearchClaw | 15k | — | ~810 | Automated safety check: Pass | MIT | |
| Biopythondavila7/claude-code-templates | 32k | 12 repos | ~3.4k | Automated safety check: Pass | MIT | |
| BiopythonK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~4.3k | Automated safety check: Notes | MIT | |
| Biopythonlamm-mit/scienceclaw | 244 | — | ~3.9k | Automated safety check: Pass | Apache-2.0 | |
| Tooluniverse Phylogeneticswu-yc/LabClaw | 1.1k | 2 repos | ~4.2k | Automated safety check: Pass | None |
aiming-lab/AutoResearchClaw
Quick reference for Biopython work: sequence operations, SeqIO file parsing, BLAST searches, Entrez queries, phylogenetic trees and PDB structure analysis.
davila7/claude-code-templates
Primary Python toolkit for molecular biology. An agent skill from davila7/claude-code-templates.
K-Dense-AI/scientific-agent-skills
Provides Biopython workflows for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez).
lamm-mit/scienceclaw
Computational molecular biology library (sequence I/O, alignment, phylogenetics).
wu-yc/LabClaw
Production-ready phylogenetics and sequence analysis skill for alignment processing, tree analysis, and evolutionary metrics.
FreedomIntelligence/OpenClaw-Medical-Skills
Convert between sequence file formats (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.
GPTomics/bioSkills
Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO.
GPTomics/bioSkills
Installs the bioSkills collection of 425 bioinformatics skills in one step, or only chosen categories, so sequencing, RNA-seq, single-cell and variant tasks get specialized help.
GPTomics/bioSkills
Soft- or hard-clips PCR primer footprints from aligned amplicon BAMs so primer bases stop masquerading as confirmed reference sequence.
GPTomics/bioSkills
Filters BAM alignments by FLAG bits, mapping quality and regions with samtools view or pysam, with recipes for common keep and drop cases.
GPTomics/bioSkills
Create and use BAI/CSI indices for BAM/CRAM files using samtools and pysam.
GPTomics/bioSkills
Sort alignment files by coordinate or read name using samtools and pysam.
Categories
Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO. Bio Write Sequences is an agent skill from GPTomics/bioSkills.SeqIO.
Bio Write Sequences fits situations like: saving sequences; creating new sequence files; outputting modified records.
Run `npx skills add GPTomics/bioSkills --skill bio-write-sequences -a claude-code`. Or copy the skill folder (sequence-io/write-sequences in GPTomics/bioSkills) into .claude/skills/bio-write-sequences in your project. Claude Code loads it when a task matches its description.
Run `npx skills add GPTomics/bioSkills --skill bio-write-sequences -a codex`. Or copy the skill folder (sequence-io/write-sequences in GPTomics/bioSkills) into .agents/skills/bio-write-sequences in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GPTomics/bioSkills --skill bio-write-sequences -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bio-write-sequences, .gemini/skills/bio-write-sequences, .github/skills/bio-write-sequences and .opencode/skills/bio-write-sequences in your project.
Going by SKILL.md and its folder, Bio Write Sequences needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Bio Write Sequences is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Bio Write Sequences: Biopython Bioinformatics (aiming-lab/AutoResearchClaw, 15k stars), Biopython (davila7/claude-code-templates, 32k stars), Biopython (K-Dense-AI/scientific-agent-skills, 48k stars) and Biopython (lamm-mit/scienceclaw, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
GPTomics (a GitHub organization) maintains it in GPTomics/bioSkills, which has 1,217 GitHub stars. The repository holds 559 skills in this directory. The repository was last updated on August 15, 2026.
Source: GPTomics/bioSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.