Herper Quick Start Guide


The Herper package is a simple toolset to install and manage Conda packages and environments from R.

The Herper package was developed by Matt Paul, Doug Barrows and Thomas Carroll at the Rockefeller University Bioinformatics Resources Center with contributions from Kathryn Rozen-Gagnon.


This Quick start gives a brief intro into getting up and running with Herper. Check the documentation website for more detailed information and use case examples.

Installation

Use the BiocManager package to download and install the package from our Github repository:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("Herper")

Once installed, load it into your R session:

library(Herper)

Install Conda packages with install_CondaTools.

The install_CondaTools() function allows the user to specify required Conda software and the desired environment to install into.

Miniconda is installed as part of the process (by default into the r-reticulate’s default Conda location). If you already have Miniconda installed (or want to control the location of miniconda installation), you can specify the path with the pathToMiniConda parameter.

myMiniconda <- file.path(tempdir(),"Test")
install_CondaTools("salmon==1.3.0", "herper", pathToMiniConda = myMiniconda)

Install R package dependencies with install_CondaSysReqs.

The install_CondaSysReqs checks the System Requirements for the specified R package, and uses Conda to install this software.

testPkg <- system.file("extdata/HerperTestPkg",package="Herper")
install.packages(testPkg,type = "source",repos = NULL)
condaDir <- file.path(tempdir(),"r-miniconda")
condaPaths <- install_CondaSysReqs("HerperTestPkg", pathToMiniConda = myMiniconda,SysReqsAsJSON=FALSE)
#' system2(file.path(condaPaths$pathToEnvBin,"samtools"),args = "--help")

Acknowledgements

Thank you to Ji-Dung Luo and Wei Wang for testing/vignette review/critical feedback and Ziwei Liang for their support.

Session Information

sessionInfo()
## R version 4.4.2 (2024-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
##  [4] LC_COLLATE=C               LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
## [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] Herper_1.17.0     reticulate_1.40.0 BiocStyle_2.35.0 
## 
## loaded via a namespace (and not attached):
##  [1] cli_3.6.3           knitr_1.49          rlang_1.1.4         xfun_0.49          
##  [5] png_0.1-8           jsonlite_1.8.9      rjson_0.2.23        buildtools_1.0.0   
##  [9] htmltools_0.5.8.1   maketools_1.3.1     sys_3.4.3           sass_0.4.9         
## [13] rmarkdown_2.29      grid_4.4.2          evaluate_1.0.1      jquerylib_0.1.4    
## [17] fastmap_1.2.0       yaml_2.3.10         lifecycle_1.0.4     BiocManager_1.30.25
## [21] compiler_4.4.2      Rcpp_1.0.13-1       lattice_0.22-6      digest_0.6.37      
## [25] R6_2.5.1            bslib_0.8.0         Matrix_1.7-1        withr_3.0.2        
## [29] tools_4.4.2         cachem_1.1.0