biomate-ai/biomate-bioconductor-kb/basilisk
Claude Code and agent skill by biomate-ai/biomate-bioconductor-kb
- community
Checking that the SKILL.md file is still in the repository.
Installs a self-contained conda instance that is managed by the R/Bioconductor installation machinery. This aims to provide a consistent Python environment that can be used reliably by Bioconductor packages. Functions are also provided to e
Install
npx vskill@latest install biomate-ai/biomate-bioconductor-kb/basiliskSKILL.md
The same SKILL.md was published earlier as biomate-ai/biomate-bioconductor-kb/basilisk.
basilisk
Dependencies & Environment
Package-intrinsic requirements from the Bioconductor landing page — reproduce in any R environment.
- Version: 1.24.0 · Bioconductor: 3.23 · R: ≥ 4.6
- Depends: reticulate
- Imports: dir.expiry
- Install:
BiocManager::install("basilisk")
When to Use
- Developing Bioconductor packages that require a reliable, self-contained Python environment using
BasiliskEnvironmentto freeze dependencies. - Executing Python-based calculations (e.g.,
scikit-learn's TruncatedSVD) on R matrices safely in an isolated process viabasiliskRun. - Managing multiple, isolated Python environments within a single R session using
createLocalBasiliskEnvandbasiliskRunto prevent dependency clashes.
When NOT to Use
- For interactive, ad-hoc Python development where you want to use your pre-existing global environment, use
reticulatedirectly becausebasiliskis primarily intended for package developers to freeze dependencies. - For simple R-native tasks, use native R implementations because provisioning custom Python virtual environments adds installation overhead.
Data Requirements
- Input format: Pure R objects (e.g., matrices like
matrix(rnorm(1000), ncol=10)) that are amenable to serialization. - Structure: Variables must be explicitly passed as arguments to the function supplied to
basiliskRun. - Normalization state: Not explicitly constrained by
basilisk; depends entirely on the downstream Python module being called.
Key Parameters
- envname (no default): The unique name of the basilisk environment to create or load in
BasiliskEnvironment. - pkgname (no default): The name of the client package defining the environment in
BasiliskEnvironment. - packages (no default): A character vector of Python packages (with explicit version constraints like
"pandas==2.2.3") to install. - fun (no default): The R function containing the Python code to execute inside the isolated environment via
basiliskRun. - persist (FALSE): Logical indicating whether to persist variables across multiple calls to
basiliskRunby passing astoreenvironment. - obsolete.only (TRUE): Logical in
clearExternalDirto remove only obsolete environments.
Best Practices
- Always specify exact version numbers for all Python packages (e.g.,
"scikit-learn==1.6.1") inBasiliskEnvironmentto future-proof the installation. - Use
basiliskStartandbasiliskStop(viaon.exit()) to manage the process context when executingbasiliskRun. - Ensure the return value of the function passed to
basiliskRunis a pure R object, not areticulatebinding or pointer to external memory. - Explicitly import non-base R functions via their namespace (using
::) inside the function passed tobasiliskRun.
Common Pitfalls
- Relying on closures capturing the R environment in which the function was defined causes failures; fix this by explicitly passing variables as arguments to the function in
basiliskRun. - Returning
reticulatebindings to Python objects causes invalid pointer errors when transferred back to the parent process; fix this by returning only pure R objects. - Deeply nested directories on Windows exceeding the 260-character file path limit cause installation to silently fail; fix this by setting the
BASILISK_EXTERNAL_DIRenvironment variable to a shorter path. - Low disk usage quotas causing incomplete installations; fix this by running
clearExternalDirto forcibly clear obsolete environments.
Alternatives
- reticulate: The underlying framework for R-to-Python interoperability, suitable for interactive use but lacks the Bioconductor-managed freezing of Python versions.
- renv: Manages R package dependencies and Python virtualenvs at the project level rather than the package level.
- herper: Manages Conda environments from R but does not isolate execution in a separate process like
basilisk.
Citations
- Lun A (2025). Freezing Python versions inside Bioconductor packages. Package basilisk vignette.
References
- Homepage: https://bioconductor.org/packages/basilisk
- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/basilisk/inst/doc/motivation.html
<!-- biomate-cta -->
Run this on BioMate
This skill is the knowledge layer — when, why, and how to use basilisk. To run this analysis on your own data with managed compute, automated QC, and reproducible outputs, use [BioMate](https://www.biomate.ai?ref=kb&pkg=basilisk) — free to start.
▶ [Open `basilisk` on BioMate →](https://www.biomate.ai?ref=kb&pkg=basilisk)
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/general/basilisk/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. Not refreshed yet.
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/basilisk)