Agent skill

bio-reference-operations

Generate consensus sequences and manage reference files using samtools. Use when creating consensus from alignments, indexing references, or creating sequence dictionaries.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeships scriptsNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill reference-operations --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 12 KB
Bundled scripts: yes
Path: skills/bioskills/reference-operations/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

## Version Compatibility Reference examples tested with: GATK 4.5+, bcftools 1.19+, pysam 0.22+, 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 - 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. # Reference Operations Generate consensus sequences and manage reference files using samtools. **"Prepare a reference genome"** → Index the FASTA and create a sequence dictionary for downstream tools. - CLI: `samtools faidx ref.fa` + `samtools dict ref.fa -o ref.dict` - Python: `pysam.FastaFile('ref.fa')` (auto-uses .fai index) **"Build a consensus from BAM"** → Derive the most-supported base at each position from aligned reads. - CLI: `samtools consensus input.bam -o consensus.fa` - Python: iterate pileup columns and take majority base (pysam) ## samtools faidx - Index Reference FASTA Create index for random access to reference sequences. ### Create Index ```bash samtools faidx reference.fa # C

What's inside
Steps it walks through
  1. Version Compatibility
  2. samtools faidx - Index Reference FASTA
  3. Create Index
  4. Fetch Region from Reference
  5. Fetch Multiple Regions
  6. Fetch Entire Chromosome
  7. Output to File
  8. Reverse Complement
  9. FAI File Format
  10. samtools dict - Create Sequence Dictionary
  11. Create Dictionary
  12. With Assembly Info
  13. Dictionary Format
  14. GRCh38 Is Not One Reference
Ships with 2 files
  • examples/prepare_reference.sh
  • usage-guide.md
Commands it runs
samtools faidx reference.fa
Creates reference.fa.fai
samtools faidx reference.fa chr1:1000-2000
samtools faidx reference.fa chr1:1000-2000 chr2:3000-4000
samtools faidx reference.fa chr1
samtools faidx reference.fa chr1:1000-2000 > region.fa
samtools faidx -i reference.fa chr1:1000-2000
samtools dict reference.fa -o reference.dict
samtools dict -a GRCh38 -s "Homo sapiens" reference.fa -o reference.dict
samtools view -H sample.bam | grep '^@SQ' | head -3
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-reference-operations skill do?

Generate consensus sequences and manage reference files using samtools. Use when creating consensus from alignments, indexing references, or creating sequence dictionaries.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill reference-operations --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.

Keep going