pysam

Read, manipulate, and write genomic data files via a Python interface.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/felixboehm/biochem-allergy --skill pysam-felixboehm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pysam
Source: https://github.com/felixboehm/biochem-allergy/tree/main/.claude/skills/pysam
Command: npx skills add https://github.com/felixboehm/biochem-allergy --skill pysam-felixboehm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies complex bioinformatics tasks by providing a Pythonic interface to manipulate genomic data files like BAM, VCF, and FASTA.

Core Features & Use Cases

  • Alignment File Operations: Read, write, and process SAM/BAM/CRAM alignment files for variant analysis and sequencing data QC.
  • Variant File Operations: Analyze genetic variants from VCF/BCF files, including filtering and annotation.
  • Sequence File Operations: Extract reference sequences from FASTA or process raw reads from FASTQ.
  • Use Case: You need to extract all reads from a BAM file that map to a specific gene region and then identify variants within those reads. This Skill can efficiently handle both steps.

Quick Start

Use the pysam skill to read the first 1000 bases from the reference.fasta file on chromosome 1.

Frequently Asked Questions about pysam

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and filter genomic variants from a VCF file in Python?

To filter VCF variants in Python, this Skill provides a Pythonic interface to read, analyze, and write VCF and BCF files. It facilitates variant filtering, annotation, and integration with bcftools commands for NGS data processing pipelines.

What is the best way to extract reads from a BAM file for a specific gene region?

Region extraction from BAM files is done using a Pythonic interface to read and process SAM, BAM, and CRAM alignments. This Skill efficiently extracts targeted reads and calculates coverage for sequencing data QC and variant analysis.

Can I process raw FASTQ sequences and reference FASTA files using Python?

Processing FASTQ and FASTA files in Python is supported for reading, manipulating, and writing genomic sequence data. This Skill extracts reference sequences from FASTA and processes raw reads from FASTQ for NGS pipelines.

Does this Python genomics toolkit integrate with samtools and bcftools commands?

Integration with samtools and bcftools commands is supported within this Python interface. It facilitates NGS data processing pipelines by enabling direct manipulation of SAM, BAM, CRAM, VCF, and BCF genomic data files.

How do I calculate sequencing coverage across a genomic region using Python?

Coverage calculation is performed by reading SAM, BAM, or CRAM alignment files through a Pythonic interface. This Skill manipulates alignment data to enable efficient coverage analysis and sequencing data QC for genomic regions.