Skip to content

Python/HTSlib workflows for reading, filtering, and writing genomic files with pysam.

CCM score
73 of 100
skills.sh installs
2.2K
GitHub stars
58.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers SAM/BAM/CRAM, VCF/BCF, FASTA/FASTQ, and tabix data, including pileup, coverage, indexing, and CRAM reference handling
  • Includes read-only inspection and streaming QC, variant summary, and alignment filter scripts that refuse to overwrite existing outputs
  • Enforces 0-based, half-open numeric coordinates versus 1-based inclusive region strings, and requires an explicit CRAM reference FASTA
  • Designed for bioinformatics developers pinning pysam 0.24.1 for reproducible alignment and variant processing in Python

Install

$ npx -y skills add k-dense-ai/scientific-agent-skills --skill pysam -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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.1 (7 September 2026), wrapping HTSlib/samtools/bcftools 1.24. Read references/sources.md before updating version-specific guidance.

Installation

Use the pinned release for reproducible work:

uv pip install "pysam==0.24.1"

Confirm the runtime:

import pysam

print(pysam.__version__)           # 0.24.1
print(pysam.__samtools_version__)  # 1.24

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:

Details

Repository
github.com/k-dense-ai/scientific-agent-skills
Categories
Research & Academic, Data Science & Analytics, Python
First seen
Jun 3, 2026

Questions

What is the pysam skill used for?

The pysam skill gives agents Python and HTSlib workflows for genomic files, including reading, querying, filtering and writing SAM, BAM and CRAM, VCF and BCF, FASTA and FASTQ, and tabix data. It also covers pileup, coverage, indexing and CRAM reference handling.

How do I install the pysam skill?

Run npx -y skills add k-dense-ai/scientific-agent-skills --skill pysam -y in your project. After that, the agent can use the pysam workflows for genomic file handling.

Which category does pysam belong to, and what sets it apart?

The pysam skill is in the Research & Academic category on Claude Marketplaces. It focuses on low-level, streaming access to genomic formats through pysam, with bundled scripts for inspecting files and summarizing alignments and variants.

What does the pysam skill need to run?

It requires Python 3.9 or newer and pysam 0.24.1. CRAM decoding may also need the matching reference FASTA or a configured REF_PATH or REF_CACHE.

More from k-dense-ai/scientific-agent-skills

All 132

Similar to Pysam

More Research & Academic