Advanced Software Setup with Pixi

Install custom R, Python, and other packages using the pixi package manager

Purge Previous Installations (Optional)

If you are reinstalling from stratch on a system with existing other conda/mamba environments that may conflict, remove them first:

rm -rf ~/.mamba ~/.conda ~/.anaconda ~/.pixi ~/.jupyter ~/micromamba ~/.mambarc ~/.local/share/jupyter/

This step is optional but recommended for a clean installation.

Install a Computing Environment

On HPC systems, run the installer from a compute node with at least 50 GB of memory, not the login node. The installation process can be memory-intensive and may be killed by the scheduler if run on a login node. Request an interactive session first, e.g.:

srun --mem=50G --pty bash

Then run the installer:

curl -fsSL https://raw.githubusercontent.com/StatFunGen/pixi-setup/refs/heads/main/pixi-setup.sh -o pixi-setup.sh
bash pixi-setup.sh

The installer will prompt you for two choices before downloading anything.

Installation Path

Where should pixi store its environments and packages?
  Default: /home/youruser/.pixi
  NOTE: Home directories often have storage quotas on HPC systems.
  Consider a path on a larger filesystem, e.g. /lab/yourlab/.pixi

Installation path [/home/youruser/.pixi]:

We recommend installing outside your home directory on HPC systems. Home directories typically have strict storage quotas and inode (file count) limits that a full pixi environment can easily exhaust. A shared lab directory (e.g., /lab/yourlab/.pixi) or scratch space is preferred. The default ($HOME/.pixi) is fine for laptops.

Installation Type

Choose installation type:
  1) minimal - Essential CLI tools + Python data science + base R
               ~7 GB, ~100k files
  2) full    - Complete bioinformatics environment (samtools, GATK, plink,
               STAR, Seurat, bioconductor packages, etc.)
               ~35 GB, ~350k files

Minimal installs general-purpose tools only: common CLI utilities (git, grep, vim, curl, parallel, etc.), a Python data science stack (JupyterLab, numpy, pandas, scikit-learn, scipy, matplotlib, etc.), and base R with essential packages (tidyverse, devtools, irkernel, languageserver, etc.). Suitable for most users.

Full installs everything in minimal plus a complete bioinformatics suite: sequence aligners (STAR, RSEM), variant callers (GATK4, plink, plink2), QC tools (FastQC, fastp, MultiQC, trimmomatic), genome annotation tools (bcftools, samtools, bedtools, ensembl-vep), and a comprehensive R/Python bioinformatics library (Seurat, bioconductor packages, tensorqtl, etc.). See the full package lists for details.

After installation, restart your shell or run:

source ~/.bashrc

Install Additional Software

Once pixi is configured, you can install additional software from conda channels.

Install Executables

Examples of applications available in conda channels:

# RStudio Server
pixi global install rstudio

# VS Code
pixi global install vscode

# Vim text editor
pixi global install vim

# Bioinformatics tools (e.g., STAR aligner)
pixi global install STAR

Verify installations:

which star
star --version

Note: Package names may differ between the install command and the executable name.

Install R Libraries

R and its libraries in this environment use precompiled conda packages. Install R libraries from conda whenever possible for best compatibility.

As an example, suppose we would like to install an R package (e.g., pacman). You can:

  1. Verify it is available on anaconda.org
  2. Install to the r-base environment configured by our pixi setup script:
pixi global install -c conda-forge --environment r-base r-pacman

For packages not on conda, you can use standard R installation methods (CRAN, Bioconductor, GitHub), but again, conda packages are strongly recommended to avoid compilation issues.

To update a specific package:

pixi global install --environment r-base <PACKAGE>=<VERSION>

To update all packages in the environment:

pixi global update r-base

Install Python Packages

To install a Python package, e.g., seaborn:

  1. Verify it is available on anaconda.org
  2. Install to the python environment:
pixi global install -c conda-forge --environment python seaborn

For packages not on conda, you can use pip install, but conda packages are preferred.

To update a specific package:

pixi global install --environment python <PACKAGE>=<VERSION>

To update all packages in the environment:

pixi global update python

File Permissions for Collaboration

For collaborative work where multiple users need to read/write shared files, add to ~/.bashrc:

umask 002

This sets default permissions so new files are group-writable (775 for directories, 664 for files).