bio-sequence-slicing
Slice, extract, and concatenate biological sequences using Biopython. Use when extracting subsequences, joining sequences, or manipulating sequence regions by position.
npx skills add BioTender-max/awesome-bio-agent-skills --skill sequence-slicing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: BioPython 1.83+, samtools 1.19+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Sequence Slicing Extract, slice, and concatenate sequences using Biopython's Seq objects. **"Extract a subsequence"** → Use Python slicing on Seq objects with 0-based half-open coordinates. - Python: `seq[start:end]` (BioPython Seq) **"Join exons into mRNA"** → Extract multiple regions and concatenate them. - Python: `sum((seq[s:e] for s, e in coords), Seq(''))` or `+` operator ## Required Import ```python from Bio.Seq import Seq ``` ## Core Operations ### Indexing (Single Position) ```python seq = Seq('ATGCGATCG') seq[0] # 'A' - first base (0-indexed) seq[-1] # 'G' - last base seq[3] # 'C' - fourth base ``` ### Slicing (Extract Region) ```python seq = Seq('ATGCGATCGATCG') seq[0:3] # Seq('ATG') - first 3 bases seq[3:6] # Seq('CGA') - positions 3-5 seq[:5] # Seq('ATGCG') - first
- Version Compatibility
- Required Import
- Core Operations
- Indexing (Single Position)
- Slicing (Extract Region)
- Concatenation
- Code Patterns
- Extract CDS by Coordinates
- Extract with 1-Based Coordinates
- Split Sequence into Codons
- Split into Fixed-Length Chunks
- Join Sequences with Linker
- Extract Multiple Regions
- Extract Flanking Regions
What does the bio-sequence-slicing skill do?
Slice, extract, and concatenate biological sequences using Biopython. Use when extracting subsequences, joining sequences, or manipulating sequence regions by position.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill sequence-slicing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
