scDHA / Usage / Installation

Installation

Install scDHA package and other requirements

scDHA can be installed fron GitHub or CRAN using below instruction. scDHA depends on the torch package to build and train the autoencoders. When scDHA package is loaded, it will check for the availability of C++ libtorch. torch package can be used to install C++ libtorch, which is necessary for neural network computation.

#Install devtools: 
utils::install.packages('devtools')

#Install the package from GitHub:
devtools::install_github('duct317/scDHA')
#With manual and vignette: 
devtools::install_github('duct317/scDHA', build_manual = T, build_vignettes = T)
#Or from CRAN:
install.packages("scDHA")

#When the package is loaded, it will check for C++ libtorch 
library(scDHA)
#libtorch can be installed using:
torch::install_torch()

Install other necessary packages

if (!requireNamespace("mclust", quietly = TRUE)) install.packages("mclust")