Monocle 3 runs in the R statistical computing environment. You will need R version 4.1.0 or higher, Bioconductor version 3.14, and monocle3 1.2.7 or higher to have access to the latest features.
To install Bioconductor, open R and run:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.14")
Next, install a few Bioconductor dependencies that aren't automatically installed:
BiocManager::install(c('BiocGenerics', 'DelayedArray', 'DelayedMatrixStats',
'limma', 'lme4', 'S4Vectors', 'SingleCellExperiment',
'SummarizedExperiment', 'batchelor', 'HDF5Array',
'terra', 'ggrastr'))
Now, install monocle3 through the cole-trapnell-lab GitHub, execute:
install.packages("devtools")
devtools::install_github('cole-trapnell-lab/monocle3')
If you wish to install the develop branch of monocle3, execute:
devtools::install_github('cole-trapnell-lab/monocle3', ref="develop")
To ensure that Monocle 3 was installed correctly, start a new R session and run:
library(monocle3)
Below are a few of the most common errors that users encounter when installing Monocle 3. If you discover new difficulties, please open an issue on Github describing the problem.
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
One of Monocle 3's dependencies requires a package called gdal. For information on how to install it on your system, see the sf installation instructions here.
For Mac users only, Xcode command line tools is required. To install, open terminal and type
xcode-select --install
and then follow the prompts. When it has completed installation,
restart the Monocle 3 installation instructions.
make: gfortran: No such file or directory
make: *** [cigraph/src/AMD/Source/amd.o] Error 1
ERROR: compilation failed for package 'leidenbase'
The above error indicates that you need to install gfortran on your computer (for Mac users only). In order to do so,
Error in system("which python", intern = TRUE) : 'which' not found
Many users report issues configuring 'reticulate' to find their Python installation. These issues seem to be particularly problematic for Windows users. Because of this, we have rewritten the functions that required Python so that Reticulate and Python are no longer required for installation. If you are still getting errors relating to Python or Reticulate, please make sure you are attempting to install Monocle 3 version 0.2.0 or later.
Previous Next