biomate-ai/biomate-bioconductor-kb/ompbam
Claude Code and agent skill by biomate-ai/biomate-bioconductor-kb
- community
Checking that the SKILL.md file is still in the repository.
This packages provides C++ header files for developers wishing to create R packages that processes BAM files. ompBAM automates file access, memory management, and handling of multiple threads 'behind the scenes', so developers can focus on creating domain-specific functionality. The included vignette contains detailed documentation of this API, including quick-start instructions to create a new ompBAM-based package, and step-by-step explanation of the functionality behind the example packaged in
Install
npx vskill@latest install biomate-ai/biomate-bioconductor-kb/ompbamSKILL.md
The same SKILL.md was published earlier as biomate-ai/biomate-bioconductor-kb/ompbam.
ompBAM
Workflows
Standard Workflow
Input: A destination directory path for the new package. Output: A fully configured R package directory structure containing C++ templates and configuration files linked to ompBAM.
When to Use
- Developing R packages that require high-performance, multi-threaded processing of BAM files using C++ and OpenMP.
- Writing custom BAM parsing algorithms where you want
ompBAMto handle file access, BGZF decompression, and thread management. - Creating packages that need to run on unsorted and unindexed BAM files (e.g., using
pbam_inandpbam1_tAPIs).
When NOT to Use
- For standard BAM manipulation or filtering in R without writing C++ code; use
RsamtoolsorGenomicAlignmentsinstead. - For querying small genomic regions of sorted and indexed BAM files; use
htslibdirectly asompBAMis optimized for whole-file sequential reads.
Data Requirements
- Input BAM files (can be unsorted and unindexed).
- A package development environment with
Rcppand a C++ compiler supporting OpenMP (e.g.,gccorclangwith OpenMP libraries).
Key Parameters
- path (in
use_ompBAM): The directory path where the new package project will be created. - bam_file: Path to the BAM file to be processed.
- n_threads: Number of threads to use for parallel execution.
Best Practices
- Run
devtools::document()on the newly created package to generate theNAMESPACEand export the R wrapper functions. - Use the
#ifdef _OPENMPdirective in C++ code to ensure compatibility with systems that do not have OpenMP installed (such as default macOS configurations). - Call
pbam1_t::realize()if you need to store reads in memory across multiple calls ofpbam_in::fillReads(), as virtual reads point to temporary buffers.
Common Pitfalls
- macOS Compilation Failure: macOS does not support OpenMP natively. Fix: Install
libompvia Homebrew (brew install libomp) and configure compiler flags. - Memory Corruption with Virtual Reads: Accessing
pbam1_tobjects after callingfillReads()leads to segmentation faults. Fix: Callrealize()on thepbam1_tobject to copy the data into persistent memory. - Requesting Too Many Threads: Requesting more threads than available can degrade performance. Fix: Use a helper function to cap requested threads at
omp_get_max_threads().
Alternatives
- Rsamtools: For high-level BAM file manipulation and querying in R.
- GenomicAlignments: For representing and manipulating genomic alignments in R.
- Rcpp: For general C++ integration in R packages without built-in BAM parsing support.
Citations
- Alex C H Wong (2026). ompBAM API Documentation.
References
- Homepage: https://bioconductor.org/packages/ompbam
- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/ompbam/inst/doc/ompBAM-API-Docs.html
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/transcriptomics/ompbam/SKILL.md
Popularity
- Repository stars
- 805
- Repository forks
- 67
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/biomate-ai/biomate-bioconductor-kb/ompbam)