Agent skill · Testing & QA

pysam

Python/HTSlib workflows for genomic files. Use when reading, querying, filtering, or writing SAM/BAM/CRAM, VCF/BCF, FASTA/FASTQ, or tabix data with pysam, including pileup, coverage, indexing, and CRAM references.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesships scriptsMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill pysam --agent claude-code

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

Facts
Files in the skill folder: 14
SKILL.md size: 11 KB
Bundled scripts: yes
Version: 2.0
Allowed tools: ReadWriteEditBash
Requires: Requires Python 3.8–3.14 and pysam 0.24.0. Bundled scripts use local files. CRAM decoding may require the matching…
Path: skills/pysam/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

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

From the SKILL.md

# pysam ## Overview Use pysam for low-level, streaming access to HTSlib-supported genomic formats: - `AlignmentFile` and `AlignedSegment` for SAM/BAM/CRAM - `VariantFile`, `VariantHeader`, and `VariantRecord` for VCF/BCF - `FastaFile` for indexed FASTA and `FastxFile` for sequential FASTA/FASTQ - `TabixFile` for BGZF-compressed, tabix-indexed BED/GFF/GTF/custom tables - `pysam.samtools` and `pysam.bcftools` for wrapped command dispatchers Current upstream baseline: **pysam 0.24.0** (27 April 2026), wrapping HTSlib/samtools/bcftools 1.23.1. Read `references/sources.md` before updating version-specific guidance. ## Installation Use the pinned release for reproducible work: ```bash uv pip install "pysam==0.24.0" ``` Confirm the runtime: ```python import pysam print(pysam.__version__) # 0.24.0 print(pysam.__samtools_version__) # 1.23.1 ``` Prebuilt wheels are available for supported macOS and Linux platforms. A source build needs a C compiler and HTSlib build dependencies; read the official installation guide linked from `references/sources.md`. ## First Decide Before writing code: 1. Identify the real format, compression, sort order, and available index. 2. Decide whether coordinates

What's inside
Steps it walks through
  1. Overview
  2. Installation
  3. First Decide
  4. Bundled Scripts
  5. Coordinate Contract
  6. Alignment Files
  7. Variant Files
  8. FASTA, FASTQ, and Tabix
  9. CRAM, Remote I/O, and Threads
  10. Wrapped samtools and bcftools
  11. Writing Rules
  12. Reference Map
  13. Common Failure Modes
Ships with 13 files
  • references/alignment_files.md
  • references/api_reference.md
  • references/common_workflows.md
  • references/coordinates_and_indexing.md
  • references/cram_and_performance.md
  • references/migration_to_0_24.md
  • references/sequence_files.md
  • references/sources.md
  • references/variant_files.md
  • scripts/alignment_qc.py
  • scripts/filter_alignments.py
  • scripts/inspect_hts.py
  • scripts/variant_summary.py
Commands it runs
uv pip install "pysam==0.24.0"
python scripts/inspect_hts.py sample.bam
python scripts/inspect_hts.py cohort.vcf.gz
python scripts/inspect_hts.py reference.fa
More from scientific-agent-skills
All skills →
About this skill
What does the pysam skill do?

Python/HTSlib workflows for genomic files. Use when reading, querying, filtering, or writing SAM/BAM/CRAM, VCF/BCF, FASTA/FASTQ, or tabix data with pysam, including pileup, coverage, indexing, and CRAM references.

How do I install it?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill pysam --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 K-Dense-AI/scientific-agent-skills, a repository with 32,619 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