05 - load MitoPilot

Loading the MitoPilot package

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.

# 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 = ":"))

Next, 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!