Overview

scvi-tools is an element of the scverse toolchest for single-cell omics data analysis.

The scviR package is a very elementary approach to interfacing between R, Bioconductor and scvi-tools. The long-term plan is to illustrate several aspects of variational inference (VI) applied to single cell genomics in a way that is convenient for Bioconductor users.

The package makes use of SingleCellExperiment and anndata representations of single-cell genomic assays.

Several points should be kept in mind when using this package:

  • scvi-tools components develop rapidly; we are using basilisk to manage R/python interoperation, and as of current writing we work with version 0.20.0 of scvi-tools. Specific versions of python components are enumerated in the file R/basilisk.R.
  • A docker container based on a PyTorch-oriented image in the NVIDIA container registry includes R 4.2.2 and sufficient python 3 infrastructure to use scvi-tools 0.20.0 and scviR 0.0.2. A Dockerfile is in scviR/inst/Docker; vjcitn/nvidpt_bioc:0.0.2 can be pulled from dockerhub, it reports size 26.5GB. Container resources will be updated as needed. Users should file issues at the package GitHub repo if the container is stale.
  • Code presented in the cite-seq tutorial vignette follows the colab notebook for scvi-tools 0.18.0. We will check for modifications in the scvi-tools 0.20.0 notebook.
  • Additional work on this package will facilitate comparisons between outcomes of Bioconductor, scVI, and other VI-oriented analytic toolkits in the single-cell domain.

Installation and use

As of Feb 2023, use BiocManager to install scviR in R 4.2.2 or above:

BiocManager::install("vjcitn/scviR")

Be sure the remotes package has been installed. If you are working at a slow internet connection, it may be useful to set options(timeout=3600) when running functions

Session information

utils::sessionInfo()
## R version 4.3.1 Patched (2023-08-27 r85021)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/vincent/R-4-3-dist/lib/R/lib/libRblas.so 
## LAPACK: /home/vincent/R-4-3-dist/lib/R/lib/libRlapack.so;  LAPACK version 3.11.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] base
## 
## other attached packages:
## [1] BiocStyle_2.29.1
## 
## loaded via a namespace (and not attached):
##  [1] vctrs_0.6.3         cli_3.6.1           knitr_1.44         
##  [4] rlang_1.1.1         xfun_0.40           stringi_1.7.12     
##  [7] purrr_1.0.2         textshaping_0.3.6   jsonlite_1.8.7     
## [10] glue_1.6.2          rprojroot_2.0.3     htmltools_0.5.6    
## [13] ragg_1.2.5          sass_0.4.7          methods_4.3.1      
## [16] rmarkdown_2.24      evaluate_0.21       jquerylib_0.1.4    
## [19] fastmap_1.1.1       yaml_2.3.7          lifecycle_1.0.3    
## [22] utils_4.3.1         memoise_2.0.1       bookdown_0.35      
## [25] BiocManager_1.30.22 stringr_1.5.0       compiler_4.3.1     
## [28] fs_1.6.3            stats_4.3.1         graphics_4.3.1     
## [31] systemfonts_1.0.4   digest_0.6.33       R6_2.5.1           
## [34] magrittr_2.0.3      bslib_0.5.1         tools_4.3.1        
## [37] grDevices_4.3.1     pkgdown_2.0.7       cachem_1.0.8       
## [40] desc_1.4.2