bio-reference-operations
Generate consensus sequences and manage reference files using samtools. Use when creating consensus from alignments, indexing references, or creating sequence dictionaries.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## 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
- Version Compatibility
- samtools faidx - Index Reference FASTA
- Create Index
- Fetch Region from Reference
- Fetch Multiple Regions
- Fetch Entire Chromosome
- Output to File
- Reverse Complement
- FAI File Format
- samtools dict - Create Sequence Dictionary
- Create Dictionary
- With Assembly Info
- Dictionary Format
- GRCh38 Is Not One Reference
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
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.
