Skip to content

vimalinx/bio-agent / .claude/skills/sort-bed

sort-bed

Unverified

Use when you need to sort BED, GFF, or VCF interval files for downstream bedtools processing, or rank records by feature size or score.

sort-bed

Quick Start

  • Command: sortBed -i <input.bed> or bedtools sort -i <input.bed>
  • Local executable: /home/vimalinx/miniforge3/envs/bio/bin/sortBed
  • Full reference: See references/help.md for complete options and usage details

When To Use This Tool

  • Coordinate-sort BED, GFF, or VCF files before running bedtools operations that assume sorted inputs.
  • Reorder intervals according to a trusted genome file or FASTA index.
  • Rank features by size or score for reporting or manual review.
  • Preserve leading headers while sorting interval records.

Common Patterns

# 1) Default chromosome/start sort
sortBed \
  -i peaks.bed \
  > peaks.sorted.bed
# 2) Sort using reference chromosome order from a FASTA index
sortBed \
  -i variants.vcf \
  -faidx genome.fa.fai \
  -header \
  > variants.sorted.vcf
# 3) Rank features by descending score within chromosome order
sortBed \
  -i peaks.bed \
  -chrThenScoreD \
  > peaks.by-score.bed

Recommended Workflow

  1. Decide whether you need true coordinate sorting for downstream interval algorithms or a ranking sort for reporting.
  2. Use the default mode for simple chromosome/start sorting, or supply -g / -faidx to impose reference-consistent chromosome order.
  3. Add -header if the file contains a header that must remain at the top.
  4. If the sorted output will feed a later -sorted bedtools step, verify you used a coordinate sort mode rather than a size/score ranking mode.

Guardrails

  • Default chromosome ordering is lexical, so names like chr10 may sort before chr2; use -g or -faidx for reference order.
  • -sizeA, -sizeD, -chrThenSizeA, -chrThenSizeD, -chrThenScoreA, and -chrThenScoreD are ranking modes, not substitutes for coordinate-sorted input to chromsweep-based workflows.
  • -header only preserves the leading header from the input; it does not infer or reconstruct missing metadata lines.
  • Prefer -h for help; GNU-style --help and --version emit wrapper errors before usage text.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 192kUpdated Claude CodeCodexVerifiedInstall