diff --git a/DESCRIPTION b/DESCRIPTION index 2d74a7a..142acf2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: velociraptor Title: Toolkit for Single-Cell Velocity -Version: 1.15.0 -Date: 2024-01-29 +Version: 1.15.1 +Date: 2024-05-24 Authors@R: c(person("Kevin", "Rue-Albrecht", role = c("aut", "cre"), email = "kevinrue67@gmail.com", comment = c(ORCID = "0000-0003-3899-3872")), person("Aaron", "Lun", role="aut", email="infinite.monkeys.with.keyboards@gmail.com", comment = c(ORCID = '0000-0002-3564-4813')), person("Charlotte", "Soneson", role="aut", email="charlottesoneson@gmail.com", comment = c(ORCID = '0000-0003-3833-2169')), diff --git a/NEWS.md b/NEWS.md index d8c7dd3..6cf20f6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# velociraptor 1.15.1 + +* Fix issue #63. +* Update `scvelo` to 0.3.2 (conda-forge) for macOS (M1) and Linux. +* Update `scvelo` to 0.2.5 (bioconda) for Windows. +* Add mechanism to switch Conda environment (and scvelo version) based on operating system and architecture. + # velociraptor 1.13.1 * Robust fallback mechanism using `basiliskRun` option `testload=`. diff --git a/R/basilisk.R b/R/basilisk.R index 2201207..ddb1cb5 100644 --- a/R/basilisk.R +++ b/R/basilisk.R @@ -712,24 +712,9 @@ if (basilisk.utils::isWindows()) { } else if (basilisk.utils::isMacOSXArm()) { .scvelo_dependencies <- .scvelo.dependencies.MacOSXArm } else { - stop("Unsupported OS type: ", .Platform$OS.type) + stop("Unsupported operating system or architecture.\n Please open an issue at to request support.") } -# Note: - -# macOS -# "matplotlib==3.7.3", # https://stackoverflow.com/questions/77128061/ydata-profiling-profilereport-attributeerror-module-matplotlib-cbook-has-no -# "numpy==1.23.1" # https://github.com/OpenTalker/video-retalking/issues/35 -# "tqdm==4.66.4", # required for progress bar, optional -# "ipywidgets==8.1.2", # required for progress bar, optional -# "jupyterlab==4.2.0", # required for progress bar, optional - -# Windows: -# 'scvelo==0.2.5', # last version compatible with Windows before move to bioconda and dependency on jaxlib unsupported on windows -# 'matplotlib==3.6.3', -# 'pandas==1.5.2', # https://stackoverflow.com/questions/76234312/importerror-cannot-import-name-is-categorical-from-pandas-api-types -# 'numpy==1.21.1' # https://github.com/theislab/scvelo/issues/1109 - #' @importFrom basilisk BasiliskEnvironment #' @importFrom zellkonverter AnnDataDependencies velo.env <- BasiliskEnvironment("env", "velociraptor", diff --git a/R/scvelo.R b/R/scvelo.R index 474f25a..a54308d 100644 --- a/R/scvelo.R +++ b/R/scvelo.R @@ -98,6 +98,31 @@ #' } #' See the \pkg{scVelo} documentation for more details about the available arguments and the examples below for a syntax example. #' +#' @section Supported operating systems and architectures: +#' \pkg{scVelo} dependencies are pinned in a Conda environment to ensure reproducibility. +#' +#' Differences in packages and versions available from Conda require different environments for different operating systems and architectures. +#' \pkg{basilisk.utils} is used to determine the operating system and architecture of the computer used to run \code{scvelo()}, using to the appropriate Conda environment. +#' +#' As of the latest \pkg{velociraptor} update (24 May 2024): +#' +#' \describe{ +#' \item{Linux}{\pkg{scVelo} v0.3.2 from conda-forge is used. +#' This is the latest version available to date. +#' Note that +#' \pkg{matplotlib} is pinned to v3.7.3 (\url{https://stackoverflow.com/questions/77128061/ydata-profiling-profilereport-attributeerror-module-matplotlib-cbook-has-no}) +#' and \pkg{numpy} is pinned to v1.23.1 (\url{https://github.com/OpenTalker/video-retalking/issues/35})} +#' \item{MacOS Arm}{\pkg{scVelo} v0.3.2 from conda-forge is used. +#' This is the latest version available to date. +#' Tested on M1.} +#' \item{Windows}{\pkg{scVelo} v0.2.5 from bioconda is used. +#' Later versions of \pkg{scVelo} depend on \pkg{jaxlib} which is not supported on Windows (\url{https://github.com/google/jax/issues/438}). +#' Note that \pkg{matplotlib} is pinned to v3.6.3 (\url{https://github.com/scverse/scanpy/issues/2411}), +#' \pkg{pandas} is pinned to v1.5.2 (\url{https://stackoverflow.com/questions/76234312/importerror-cannot-import-name-is-categorical-from-pandas-api-types}), +#' and \pkg{numpy} is pinned to v1.21.1 (\url{https://github.com/theislab/scvelo/issues/1109}). +#' } +#' } +#' #' @return #' A \linkS4class{SingleCellExperiment} is returned containing the output of the velocity calculations. #' Of particular interest are: @@ -129,7 +154,7 @@ #' @references #' Bergen, V., Lange, M., Peidli, S. et al. Generalizing RNA velocity to transient cell states through dynamical modeling. Nat Biotechnol 38, 1408–1414 (2020). \url{https://doi.org/10.1038/s41587-020-0591-3} #' -#' @author Aaron Lun, Charlotte Soneson +#' @author Aaron Lun, Charlotte Soneson, Kevin Rue-Albrecht #' @name scvelo NULL diff --git a/inst/envs/scvelo-win.yaml b/inst/envs/scvelo-win.yaml deleted file mode 100644 index ed5e176..0000000 --- a/inst/envs/scvelo-win.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: velociraptor -channels: - - bioconda - - conda-forge -dependencies: - - scvelo==0.2.5 diff --git a/inst/envs/velociraptor.yaml b/inst/envs/velociraptor.yaml deleted file mode 100644 index c8b7330..0000000 --- a/inst/envs/velociraptor.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: velociraptor -channels: - - conda-forge - - bioconda -dependencies: - - r-base==4.3.2 - - bioconductor-velociraptor==1.12.0 - - r-knitr - - r-rmarkdown - - bioconductor-BiocStyle diff --git a/man/scvelo.Rd b/man/scvelo.Rd index 56fee6d..512c46a 100644 --- a/man/scvelo.Rd +++ b/man/scvelo.Rd @@ -167,6 +167,33 @@ The PCA is not performed if \code{dimred} or \code{use.dimred} is already suppli See the \pkg{scVelo} documentation for more details about the available arguments and the examples below for a syntax example. } +\section{Supported operating systems and architectures}{ + +\pkg{scVelo} dependencies are pinned in a Conda environment to ensure reproducibility. + +Differences in packages and versions available from Conda require different environments for different operating systems and architectures. +\pkg{basilisk.utils} is used to determine the operating system and architecture of the computer used to run \code{scvelo()}, using to the appropriate Conda environment. + +As of the latest \pkg{velociraptor} update (24 May 2024): + +\describe{ +\item{Linux}{\pkg{scVelo} v0.3.2 from conda-forge is used. +This is the latest version available to date. +Note that +\pkg{matplotlib} is pinned to v3.7.3 (\url{https://stackoverflow.com/questions/77128061/ydata-profiling-profilereport-attributeerror-module-matplotlib-cbook-has-no}) +and \pkg{numpy} is pinned to v1.23.1 (\url{https://github.com/OpenTalker/video-retalking/issues/35})} +\item{MacOS Arm}{\pkg{scVelo} v0.3.2 from conda-forge is used. +This is the latest version available to date. +Tested on M1.} +\item{Windows}{\pkg{scVelo} v0.2.5 from bioconda is used. +Later versions of \pkg{scVelo} depend on \pkg{jaxlib} which is not supported on Windows (\url{https://github.com/google/jax/issues/438}). +Note that \pkg{matplotlib} is pinned to v3.6.3 (\url{https://github.com/scverse/scanpy/issues/2411}), +\pkg{pandas} is pinned to v1.5.2 (\url{https://stackoverflow.com/questions/76234312/importerror-cannot-import-name-is-categorical-from-pandas-api-types}), +and \pkg{numpy} is pinned to v1.21.1 (\url{https://github.com/theislab/scvelo/issues/1109}). +} +} +} + \examples{ # Using mock data to demonstrate the process: library(scuttle) @@ -187,5 +214,5 @@ out <- scvelo(list(X=spliced, spliced=spliced, unspliced=unspliced), Bergen, V., Lange, M., Peidli, S. et al. Generalizing RNA velocity to transient cell states through dynamical modeling. Nat Biotechnol 38, 1408–1414 (2020). \url{https://doi.org/10.1038/s41587-020-0591-3} } \author{ -Aaron Lun, Charlotte Soneson +Aaron Lun, Charlotte Soneson, Kevin Rue-Albrecht }