Pysam
Genomic file toolkit. Read/write SAM/BAM/CRAM alignments, VCF/BCF variants, FASTA/FASTQ sequences, extract regions, calculate coverage, for NGS data processing pipelines.
Install
/plugin marketplace add lifangda/claude-pluginsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add lifangda/claude-plugins --skill pysamgit clone --depth 1 https://github.com/lifangda/claude-plugins.git /tmp/claude-plugins
mkdir -p ~/.claude/skills
cp -r /tmp/claude-plugins/cli-tool/skills-library/scientific-computing/bioinformatics/pysam ~/.claude/skills/pysamPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Pysam
## Overview
Pysam is a Python module for reading, manipulating, and writing genomic datasets. Read/write SAM/BAM/CRAM alignment files, VCF/BCF variant files, and FASTA/FASTQ sequences with a Pythonic interface to htslib. Query tabix-indexed files, perform pileup analysis for coverage, and execute samtools/bcftools commands.
## When to Use This Skill
This skill should be used when:
- Working with sequencing alignment files (BAM/CRAM)
- Analyzing genetic variants (VCF/BCF)
- Extracting reference sequences or gene regions
- Processing raw sequencing data (FASTQ)
- Calculating coverage or read depth
- Implementing bioinformatics analysis pipelines
- Quality control of sequencing data
- Variant calling and annotation workflows
## Quick Start
### Installation
```python
# Pysam is typically installed via conda or pip
# conda install -c bioconda pysam
# pip install pysam
```
### Basic Examples
**Read alignment file:**
```python
import pysam
# Open BAM file and fetch reads in region
samfile = pysam.AlignmentFile("example.bam", "rb")
for read in samfile.fetch("chr1", 1000, 2000):
print(f"{read.query_name}: {read.reference_start}")
samfile.close()
```
**Read variant file:**
```python
# Open VCF file and iterate variants
vcf = pysam.VariantFile("variants.vcf")
for variant in vcf:
print(f"{variant.chrom}:{variant.pos} {variant.ref}>{variant.alts}")
vcf.close()
```
**Query reference sequence:**Details
- Skill name
pysam- Repository
- lifangda/claude-plugins
- Path
cli-tool/skills-library/scientific-computing/bioinformatics/pysam/SKILL.md- License
- MIT
- Repo updated
- 29 October 2025
FAQ
What does the Pysam skill do?
Genomic file toolkit. Read/write SAM/BAM/CRAM alignments, VCF/BCF variants, FASTA/FASTQ sequences, extract regions, calculate coverage, for NGS data processing pipelines.
How do I install the Pysam skill?
Claude Code plugin: /plugin marketplace add lifangda/claude-plugins. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Pysam popular?
It lives in lifangda/claude-plugins, which has 43 GitHub stars and 13 forks.
Related skills
Test Driven Development
43lifangda/claude-plugins
Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first
Video Downloader
43lifangda/claude-plugins
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.
Aeon
43lifangda/claude-plugins
Time series machine learning toolkit for classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use this skill when working with temporal data, performing time series analysis, building predictive models on sequential data, or implementing workflows that involve distance metrics (DTW), transformations (ROCKET, Catch22), or deep learning for time series. Applicable for tasks like ECG classification, stock price forecasting, sensor anomaly detection, or activity recognition from wearable devices.
Pytdc
43lifangda/claude-plugins
Therapeutics Data Commons. AI-ready drug discovery datasets (ADME, toxicity, DTI), benchmarks, scaffold splits, molecular oracles, for therapeutic ML and pharmacological prediction.
Pyhealth
43lifangda/claude-plugins
Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare datasets (MIMIC-III/IV, eICU, OMOP), or implementing deep learning models for healthcare applications (RETAIN, SafeDrug, Transformer, GNN).
Scanpy
43lifangda/claude-plugins
Single-cell RNA-seq analysis. Load .h5ad/10X data, QC, normalization, PCA/UMAP/t-SNE, Leiden clustering, marker genes, cell type annotation, trajectory, for scRNA-seq analysis.
Browse the most popular Claude skills, all research & science skills, or write your own with the skills generator.