05 - load MitoPilot

Setting environmental variables

To load the MitoPilot R package, we first need to modify our PATH environmental variable. This will allow our RStudio session to find and use java and nextflow.

Note

This step is only necessary if you are running MitoPilot on the Hydra cluster. If you are running MitoPilot on your local computer, you do not need to do this.

# ONLY NEEDED FOR HYDRA CLUSTER
# modify PATH to include:
#   ~/bin (contains nextflow exe)
#   java 21.0.2 (required for nextflow)
default_path <- "/cm/shared/apps/uge/8.8.1/bin/lx-amd64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/lib/rstudio-server/bin/quarto/bin:/usr/lib/rstudio-server/bin/postback"
new_path <- paste0(Sys.getenv("HOME"), "/bin:/share/apps/tools/java/21.0.2/bin")
Sys.setenv(PATH = paste(new_path, default_path, sep = ":"))

Loading the MitoPilot package

Next we need to load the MitoPilot package.

library(MitoPilot)

You should see a message confirming that Nextflow is installed and accessible.

Welcome to {MitoPilot}!
Using Nextflow version 24.10.4 build 5934

You can now utilize all of MitoPilot’s functions, such as initializing a project or opening the R Shiny GUI.

Let’s get started with the example project!