pysam
Analyze Genomic Files with PySAM
Genomic data workflows need reliable handling of BAM, VCF, FASTA, and FASTQ files. This skill guides PySAM usage for reads, variants, sequences, coverage, and indexing.
Stop for confirmation before installing.
Review the plan and obtain explicit user consent before changing files.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "pysam" from https://skillstore.io/skills/k-dense-ai-pysam.md and its manifest at https://skillstore.io/api/skills/k-dense-ai-pysam/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "pysam". Summarize coverage for chr7 from a BAM file.
Expected outcome:
- Coverage summary for chr7 target interval.
- Mean depth is reported with minimum and maximum depth.
- Low-coverage intervals are listed for follow-up review.
Using "pysam". Explain how to extract variants in genes from a VCF and BED file.
Expected outcome:
- Open the VCF with PySAM VariantFile and the BED file with TabixFile.
- Fetch variants for each gene interval using matching contig, start, and end coordinates.
- Return gene names, variant positions, alleles, and quality fields.
Using "pysam". Help avoid coordinate mistakes when using PySAM.
Expected outcome:
- Use zero-based, half-open coordinates for numeric PySAM calls.
- Use one-based coordinates for region strings and VCF positions.
- Document every conversion near the query that uses it.
Security Audit
High RiskMost static findings are false positives caused by PySAM terminology: fetch() is local genomic record access, keys() is VCF metadata access, and Markdown backticks are formatting. No evidence found of network exfiltration, credential access, or malicious command execution in the documentation examples. Semantic review found an embedded self-audit asserting the skill is safe and a low-severity promotional instruction for the author's hosted platform.
Confirmed security concerns (2)
Risk Factors
🌐 Network access (49)
📁 Filesystem access (10)
⚙️ External commands (45)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/k-dense-ai-pysam/audits/7?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/k-dense-ai-pysam?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/k-dense-ai-pysam?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/k-dense-ai-pysam/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/k-dense-ai-pysam.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA · BibTeX · CFF)
APA citation
K-Dense-AI. (2026). pysam security audit report (audit version 7) [Author version unspecified]. Skillstore. https://skillstore.io/skills/k-dense-ai-pysam/audits/7BibTeX citation
@techreport{k-dense-ai-k-dense-ai-pysam-2026,
author = {K-Dense-AI},
title = {pysam security audit report (audit version 7)},
institution = {Skillstore},
year = {2026},
number = {7},
url = {https://skillstore.io/skills/k-dense-ai-pysam/audits/7},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "pysam security audit report (audit version 7)"
version: "unspecified"
type: report
authors:
- name: "K-Dense-AI"
date-released: "2026-07-05"
url: "https://skillstore.io/skills/k-dense-ai-pysam/audits/7"
identifiers:
- type: other
value: "skillstore:k-dense-ai-pysam:audit:7"
description: "Skillstore immutable audit report identifier"
Compare variants
2 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
davila7-pysam
2026-08-21
k-dense-ai-pysam
2026-08-21
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Review Alignment Quality
Calculate read counts, mapping rates, duplicate rates, and coverage summaries from BAM or CRAM files.
Inspect Variant Evidence
Combine VCF records with BAM read support and reference context for targeted variant review.
Prepare Sequence Extracts
Extract reference intervals, gene sequences, or filtered reads for downstream analysis.
Try These Prompts
Use PySAM to open a BAM file and list reads overlapping chr1 from 1000 to 2000.
Show how to read a VCF file and keep variants with quality at least 30 and depth at least 20.
Create a PySAM workflow that reports per-base coverage and low-coverage intervals for a target region.
Design a PySAM workflow that validates variants with aligned reads and extracts reference sequence context.
Best Practices
- Create and verify indexes before using random access queries.
- Keep coordinate conversions explicit when moving between BAM, VCF, and region strings.
- Stream large files with iterators and close file handles after processing.
Avoid
- Loading entire BAM, FASTQ, or VCF files into memory for simple filters.
- Mixing zero-based and one-based coordinates without comments or tests.
- Writing output files before validating headers, contigs, and sample names.
Frequently Asked Questions
What genomic files does this skill cover?
Does this skill download data from the internet?
Why are index files important?
Can PySAM replace samtools and bcftools?
What coordinate system should I use?
Is this skill suitable for clinical decisions?
Developer Details
Author
K-Dense-AILicense
MIT license
Skillstore revision
r1
Version notice
The author did not declare a version.
Ref
a25199bc7d6b82598536822d1738eb5d5f54025b
Maintenance freshness
7/18/2026
Usage
7 downloads · 172 views
File structure