pysam

Process genomic alignment, variant, and sequence files with pysam and htslib.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill pysam-robotlearning123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pysam
Source: https://github.com/robotlearning123/claude-scientific-skills/tree/main/scientific-skills/pysam
Command: npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill pysam-robotlearning123

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pysam, htslib, biopython, scipy, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves complex bioinformatics problems, enabling efficient genomic data processing, alignment analysis, and variant interpretation.

Core Features & Use Cases

  • Alignment File Operations: Process SAM/BAM/CRAM alignment files for various bioinformatics applications.
  • Variant File Operations: Work with VCF/BCF variant files for annotation, filtering, and analysis.
  • Sequence File Operations: Handle FASTA/FASTQ sequences for reference querying and data processing.
  • Integrated Workflows: Perform quality control, coverage analysis, and variant annotation in one go.
  • Use Case: A researcher analyzing Next-Generation Sequencing (NGS) data might use this Skill to calculate coverage, validate variants, and annotate them against reference databases.

Quick Start

Run the pysam skill to perform a basic variant analysis on your dataset:

pysam variant analysis -i input.vcf.gz -o output.vcf -r reference.fasta

Frequently Asked Questions about pysam

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

FAQPage Schema
How do I process SAM/BAM alignment files for NGS data analysis?

Process SAM/BAM alignment files by wrapping the htslib library in Python to handle genomic data operations. This approach enables efficient sequence alignment processing and bioinformatics applications for Next-Generation Sequencing data.

What is the best way to analyze VCF variant files against a reference sequence?

Analyze VCF variant files by performing annotation, filtering, and validation against reference sequences. This integrated workflow wraps htslib in Python to query FASTA references and process variant data for biological research.

Can I use Python for genomic data processing and coverage analysis?

Use Python for genomic data processing by leveraging pysam and htslib to calculate coverage and perform quality control. This setup handles FASTA/FASTQ sequences and alignment files within integrated bioinformatics workflows.

Do I need biopython and scipy to perform statistical methods on genomic data?

You need biopython, scipy, and numpy to perform statistical and computational methods on genomic data. These dependencies support sequence analysis and variant interpretation alongside the core htslib functionality.

Does this approach work with CRAM files for sequence alignment operations?

This approach works with CRAM files for sequence alignment operations by utilizing the htslib library. It processes SAM, BAM, and CRAM formats interchangeably to support various bioinformatics applications and reference querying.

Related Skills