bio-genome-intervals-bed-file-basics
BED file format fundamentals, creation, validation, and basic operations. Covers BED3 through BED12 formats, coordinate systems, sorting, and format conversion using bedtools and pybedtools. Use when working with genomic coordinates or preparing interval files for downstream tools.
npx skills add BioTender-max/awesome-bio-agent-skills --skill bed-file-basics --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: bcftools 1.19+, bedtools 2.31+, pandas 2.2+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to confirm flags If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # BED File Basics **"Work with BED files"** → Read, create, and manipulate genomic interval files in BED format (0-based, half-open coordinates). - Python: `pybedtools.BedTool('file.bed')` (pybedtools) - CLI: `bedtools` commands BED (Browser Extensible Data) format stores genomic intervals. Uses 0-based, half-open coordinates. ## BED Format Columns ``` BED3: chr start end BED4: chr start end name BED5: chr start end name score BED6: chr start end name score strand BED12: chr start end name score strand thickStart thickEnd rgb blockCount blockSizes blockStarts ``` ## Coordinate System BED uses 0-based, half-open coordinates: - Start: 0-based (first base is 0) - End: exclusive (not included) - Position 100-2
- Version Compatibility
- BED Format Columns
- Coordinate System
- Create BED Files
- From Text (CLI)
- From Python
- Sort BED Files
- CLI
- Python
- Validate BED Files
- Check Format
- Python Validation
- Read BED Files
- Filter BED Files
Create simple BED3 echo -e "chr1\t100\t200\nchr1\t300\t400" > regions.bed Create BED6 with name and strand echo -e "chr1\t100\t200\tpeak1\t100\t+" > peaks.bed Sort by chromosome and position sort -k1,1 -k2,2n input.bed > sorted.bed Using bedtools bedtools sort -i input.bed > sorted.bed Sort by chromosome, start, then end sort -k1,1 -k2,2n -k3,3n input.bed > sorted.bed
What does the bio-genome-intervals-bed-file-basics skill do?
BED file format fundamentals, creation, validation, and basic operations. Covers BED3 through BED12 formats, coordinate systems, sorting, and format conversion using bedtools and pybedtools. Use when working with genomic coordinates or preparing interval files for downstream tools.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill bed-file-basics --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.
