Skip to contents

The function returns a list of requirements including the required Python version, package versions, and package name aliases for platform-specific packages. All packages will be installed using uv as the primary tool.

Usage

env_requirements(
  version = "3.10-1",
  include_optional = FALSE,
  modules = NULL,
  verbose = TRUE
)

Arguments

version

The Python version of the environment. Default is "3.10-1". Python "3.9-1" is reserved for standalone modules such as "cell2fate" and "commot".

include_optional

Whether to include optional Python dependencies.

modules

Optional requirement modules to include. Supported values are "scanpy", "scvi", "scanorama", "bbknn", "celltypist", "cellphonedb", "cell2location", "cell2fate", "commot", "magic", "scrublet", "doubletdetection", "sccoda", "doublet", "palantir", "scvelo", "cellrank", "wot", "phate", "pacmap", "trimap", "multimap", "celloracle", "scomm", "scenic", "scenicplus", "scenicplus_io", "seacells", "tage", "scmalignantfinder", "secact", "scpagwas", "choir", and "external_wrappers". If NULL, the default environment is returned. The default excludes "cell2location", "cell2fate", "commot", "sccoda", "scomm", and "scenic", "phate", and "magic" because these workflows require dependency stacks that should be prepared explicitly. The "celloracle" module uses standalone Python 3.10 with official CellOracle 0.20.0. The "scenic" module is standalone and always uses Python "3.10-1".

verbose

Whether to print the message. Default is TRUE.

Value

A list containing:

python

Python version string

packages

Named vector of package version specifications

package_aliases

Named list mapping logical package names to actual installed names

Examples

env_requirements("3.10-1")
#> $python
#> [1] "3.10-1"
#> 
#> $packages
#>                                     setuptools 
#>                                "setuptools<81" 
#>                                      leidenalg 
#>                            "leidenalg==0.10.2" 
#>                                            tbb 
#>                                "tbb==2022.2.0" 
#>                                  python-igraph 
#>                        "python-igraph==0.11.9" 
#>                                     matplotlib 
#>                           "matplotlib==3.10.8" 
#>                                          numba 
#>                                "numba==0.66.0" 
#>                                       llvmlite 
#>                             "llvmlite==0.48.0" 
#>                                          numpy 
#>                                "numpy==1.26.4" 
#>                                      packaging 
#>                              "packaging>=24.0" 
#>                                         pandas 
#>                                "pandas==2.2.0" 
#>                                   scikit-learn 
#>                          "scikit-learn==1.7.0" 
#>                                          scipy 
#>                                "scipy==1.15.3" 
#>                                         scanpy 
#>                               "scanpy==1.11.3" 
#>                                    pynndescent 
#>                           "pynndescent==0.6.0" 
#>                                         loompy 
#>                                       "loompy" 
#>                                     scvi-tools 
#>                            "scvi-tools==1.3.3" 
#>                                            jax 
#>                             "jax[cpu]==0.4.38" 
#>                                         jaxlib 
#>                               "jaxlib==0.4.38" 
#>                                        numpyro 
#>                              "numpyro==0.17.0" 
#>                                          optax 
#>                                 "optax==0.2.5" 
#>                                           flax 
#>                                 "flax==0.10.4" 
#>                                           chex 
#>                                 "chex==0.1.89" 
#>                               orbax-checkpoint 
#>                      "orbax-checkpoint==0.8.0" 
#>                                    tensorstore 
#>                          "tensorstore==0.1.65" 
#>                                         scglue 
#>                                "scglue==0.4.0" 
#>                                       bedtools 
#>                                     "bedtools" 
#>                                           zlib 
#>                                         "zlib" 
#>                                      scanorama 
#>                             "scanorama==1.7.4" 
#>                                          bbknn 
#>                                 "bbknn==1.6.0" 
#>                                     celltypist 
#>                            "celltypist==1.7.1" 
#>                                    cellphonedb 
#>                           "cellphonedb==5.0.1" 
#>                                       scrublet 
#>                              "scrublet==0.2.3" 
#>                               doubletdetection 
#>                "doubletdetection==4.3.0.post1" 
#>                                        louvain 
#>                               "louvain==0.8.2" 
#>                                       palantir 
#>                              "palantir==1.4.4" 
#>                                         scvelo 
#>                                "scvelo==0.3.3" 
#>                                       cellrank 
#>                              "cellrank==2.0.7" 
#>                                            wot 
#>                             "wot==1.0.8.post2" 
#>                                         pacmap 
#>                                "pacmap==0.8.0" 
#>                                         trimap 
#>                                "trimap==1.1.4" 
#>                                       multimap 
#> "git+https://github.com/Teichlab/MultiMAP.git" 
#>                                       SEACells 
#>                                     "SEACells" 
#>                                         joblib 
#>                                       "joblib" 
#>                             charset-normalizer 
#>                      "charset-normalizer>=3.4" 
#> 
#> $install_methods
#>         setuptools          leidenalg                tbb      python-igraph 
#>              "pip"            "conda"            "conda"            "conda" 
#>         matplotlib              numba           llvmlite              numpy 
#>              "pip"              "pip"              "pip"              "pip" 
#>          packaging             pandas       scikit-learn              scipy 
#>              "pip"              "pip"              "pip"              "pip" 
#>             scanpy        pynndescent             loompy         scvi-tools 
#>              "pip"              "pip"              "pip"            "conda" 
#>                jax             jaxlib            numpyro              optax 
#>              "pip"              "pip"              "pip"              "pip" 
#>               flax               chex   orbax-checkpoint        tensorstore 
#>              "pip"              "pip"              "pip"              "pip" 
#>             scglue           bedtools               zlib          scanorama 
#>              "pip"            "conda"            "conda"              "pip" 
#>              bbknn         celltypist        cellphonedb           scrublet 
#>              "pip"              "pip"              "pip"              "pip" 
#>   doubletdetection            louvain           palantir             scvelo 
#>              "pip"              "pip"              "pip"              "pip" 
#>           cellrank                wot             pacmap             trimap 
#>              "pip"              "pip"              "pip"              "pip" 
#>           multimap           SEACells             joblib charset-normalizer 
#>              "pip"              "pip"              "pip"              "pip" 
#> 
#> $package_aliases
#> $package_aliases$`python-igraph`
#> [1] "igraph"
#> 
#> $package_aliases$multimap
#> [1] "MultiMAP"
#> 
#> $package_aliases$MultiMAP
#> [1] "multimap"
#> 
#> 
env_requirements(version = "3.9-1", modules = "cell2fate")
#> $python
#> [1] "3.9-1"
#> 
#> $packages
#>                                          setuptools 
#>                                     "setuptools<81" 
#>                                                 jax 
#>                                       "jax==0.4.10" 
#>                                              jaxlib 
#>                                    "jaxlib==0.4.10" 
#>                                           cell2fate 
#> "git+https://github.com/BayraktarLab/cell2fate.git" 
#> 
#> $install_methods
#> setuptools        jax     jaxlib  cell2fate 
#>      "pip"      "pip"    "conda"      "pip" 
#> 
#> $package_aliases
#> list()
#>