If you prefer to test Giotto Suite first without installing everything, check the tutorials for using Giotto Suite with our Docker and Singularity containers.

1. Prerequisite packages:

When installing for the first time, it is recommended to first ensure that all pre-requisite software is available, and then install Giotto Suite using {pak}

1.1 Basic requirements

  • Latest version of R (check https://cran.r-project.org)
  • Python (>= 3.6)
  • Windows, MacOS or Linux specific installation tools for Posit (previously RStudio)

1.2 {terra} installation

{terra} is a major dependency of Giotto Suite. It may have some additional steps when installing depending on which system you are on. Please see the {terra} repo for up-to-date specifics. Installations of the CRAN release on Windows and Mac are expected to be simple, only requiring the code below.

For Linux, there are several prerequisite installs:

GDAL (>= 2.2.3), GEOS (>= 3.4.0), PROJ (>= 4.9.3), sqlite3

On our AlmaLinux 8 HPC, the following versions have been working well:

  • gdal/3.6.4

  • geos/3.11.1

  • proj/9.2.0

  • sqlite3/3.37.2

1.3 {Matrix} installation

(Only important for R versions lower than 4.4.0)

{Giotto} requires {Matrix} 1.6-2 or greater, but when installing {Giotto} with {pak} on an R version lower than 4.4.0, the installation can fail asking for R 4.5 which doesn’t exist yet. We can solve this by installing the 1.6-5 version directly by un-commenting and running the line below.

# devtools::install_version("Matrix", version = "1.6-5")


After these are installed, you should be able to proceed with one of the installation methods below for Giotto Suite.

2. Giotto Suite installation

[Option1] {pak} installation of Giotto Suite

This method can only be used to install the currently released version of Giotto.

For installation of another branch (such as dev), see options 2 or 3.

To install the currently released version of Giotto in a single step:

if(!"pak" %in% installed.packages()) {
  install.packages("pak")
}

pak::pkg_install("drieslab/Giotto")

This should automatically install all the Giotto dependencies and other Giotto module packages (main branch).


[Option2] suite_install() convenient installer

First ensure that you have {devools} and {GiottoUtils} installed:

devtools::install_github("drieslab/GiottoUtils") # you can add the `@branch` desired tag here

Then you can run suite_install() with ref param pointing to the desired version of the package. Please see here for further info.

GiottoUtils::suite_install(ref = ???)

[Option3] Manual

Giotto Suite is a set of modular packages and {pak} tends to forcibly install the stable version despite dev versions with higher version numbers. This can make it difficult to install the dev branch.

Instead, you can install dev branch versions by using devtools::install_github() alongside one of the following dev branch paths as shown below. Do not update other Giotto modules that should be installed from dev branch if prompted.

Core module dev branchs:

  • "drieslab/Giotto@suite_dev"
  • "drieslab/GiottoVisuals@dev"
  • "drieslab/GiottoClass@dev"
  • "drieslab/GiottoUtils@dev"
if(!"devtools" %in% installed.packages()) {
  install.packages("devtools")
}

devtools::install_github("[dev branch path]")

3. Giotto python environment installation

Giotto uses some python packages through reticulate. A default python 3.10.2 environment named ‘giotto_env’ that covers Giotto’s commonly used python packages can be installed using installGiottoEnvironment(). This is just a convenient default installation and users are free to create their own preferred python environment(s) for use with Giotto.

Try Giotto in the cloud

You can also run analyses in Giotto on Terra.bio. Take a look on the Terra tutorial.

Help

Encountering errors? See our troubleshooting page or post to an issue to the Giotto GitHub page here. Please include the version numbers of R, Giotto, and the OS in use at the time of the issue.