Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

When using pixi to manage bioinformatics analysis environments, we often encounter issues where some Bioconductor R packages show missing dependencies after installation. The exact cause of this problem is currently unclear. After using pixi for a year, this issue still hasn’t been fixed (as of October 2025). This article introduces how to use pixi’s tasks feature to resolve such problems.

Problem Description

During the past year of using pixi, I’ve found that when deploying bioinformatics analysis environments, dependencies like GenomeInfoDbData and BSgenome.Hsapiens.UCSC.hg38 (R packages that fetch genomic data) for packages like Seurat and maftools always have issues. Even when these packages are explicitly specified and installed in the pixi environment, they still appear to be missing when actually loading them. Therefore, additional configuration is needed to supplement these dependencies.

Solution

I currently use pixi’s tasks feature to turn dependency installation commands into tasks, allowing for quick dependency fixes after environment deployment. Here’s an example configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[workspace]
name = "azimuth_demo"
version = "1.1"
description = "workspace with azimuth and jupyter"
authors = ["Sylens Wong <qiumin14@163.com>"]
channels = ["conda-forge", "bioconda"]
platforms = ["linux-64"]

[environments]
label = ['kernel', 'label']

[feature.kernel.dependencies]
r-irkernel = '*'
jupyterlab = '*'

[feature.label.dependencies]
r-base = '*'
r-azimuth = '*'
r-BiocManager = '*'

[feature.label.tasks]
GenomeInfoDbData = {cmd = 'Rscript -e "BiocManager::install(\"GenomeInfoDbData\")"'}
BSgenome = {cmd = 'Rscript -e "BiocManager::install(\"BSgenome.Hsapiens.UCSC.hg38\")"'}
EnsDb = {cmd = 'Rscript -e "BiocManager::install(\"EnsDb.Hsapiens.v86\")"'}
JASPAR2020 = {cmd = 'Rscript -e "BiocManager::install(\"JASPAR2020\")"'}
r_dep = {cmd = 'echo "bio dep for R done"', depends-on=['GenomeInfoDbData', 'BSgenome', 'EnsDb', 'JASPAR2020']}

After activating the pixi environment, execute pixi run r_dep to complete the dependency fixes and start working.

Comments

Please leave your comments here