What problem does it solve?
Pysam removes the friction of working directly with genomic file formats by giving you a Pythonic way to read, write, filter, and query alignment, variant, and sequence data.
Core Features & Use Cases
- Alignment workflows: Inspect SAM, BAM, and CRAM files, fetch reads from genomic regions, calculate coverage, and perform pileup analysis.
- Variant workflows: Read and write VCF and BCF files, inspect genotypes and INFO fields, filter variants, and merge or subset samples.
- Sequence workflows: Extract reference intervals from FASTA, process FASTQ reads, and work with tabix-indexed BED, GTF, and GFF annotations.
- Use case: A bioinformatics researcher can validate a variant by checking read support in BAM, comparing against the reference FASTA, and summarizing the result in a filtered VCF.
Quick Start
Use the pysam skill to open your indexed genomic file, fetch a target region, and summarize the reads, variants, or sequences it contains.