2 Software Installation - NU-CPGME/sl_pre-workshop_2024 GitHub Wiki

July / August 2024

Developed by:
Egon A. Ozer, MD PhD ([email protected])
Ramon Lorenzo Redondo, PhD ([email protected])


Introduction

There are many ways to install software applications on computer systems.

One option is to download an application as a pre-built executable, if available, that is specific for your operating system or by getting the source code from a code repository like GitHub and compiling it on your system.

Another simple option for installing software is to use a package manager. A package manager is a bit like the App Store on your phone where apps can be downloaded and installed from a single source. Package managers will often also determine whether the software you want to install requires on any other software to function and will download and install those dependencies, too.

Lubuntu and similar Linux distributions have a built-in package manager called the Advance Package Tool (APT) to search, manage, and query information about software packages. The package manager is called with the apt command in the terminal.

Although the software that can be installed with apt is extensive, it is not comprehensive so we will have to take several approaches to install all of the software we need. This will also include the use of Conda / Mamba, another package manager we will use together during the workshop.

For these steps, you will need to use both the Terminal and Firefox Web Browser.

Both terminal application ("QTerminal") and firefox can be found in the menu on the bottom left of the screen:

 

If you open this page in the Firefox browser in your VM, you'll be able to easily copy and paste the commands below into the terminal and click on installation links.


Software to Install

1. Tablet

Tablet is a program that can be used to visualize and analyze read-based alignments against a reference sequence.

  • You will first need to install the Canberra GTK modules in terminal using apt:

    sudo apt -y install libcanberra-gtk-module
  • Use Firefox to download the Linux 64-bit version of Tablet from https://ics.hutton.ac.uk/tablet/download-tablet/

  • In the terminal, use the following command to start the installation:

    bash ~/Downloads/tablet_linux_x64_1_21_02_08.sh
  • In the installer screens that pop up, accept the License Agreement and keep pressing "Next >" to accept all the defaults.

2. FigTree

FigTree is a program to visualize phylogenetic trees. Files that can be viewed in FigTree generally end with the suffix .tre or .nwk.

  • In terminal:

    sudo apt -y install figtree

3. SeaView  

SeaView is a program that can view and generate multiple sequence alignments of DNA and protein sequence as well as multiple other functions.

  • In terminal:

    sudo apt -y install seaview

4. R   and RStudio

R is statistical and graphics programming and analysis software with several other packages to aid in the analysis of genomics data. RStudio is an application for programming and running R code and visualizing output.

Follow the steps below to install R and R Studio. You can just enter the commands below in the terminal, but if you want more detail on the installation process you can follow this link.

In this process we are using the program wget to download a file from a web address. In this case, it is the debian repository for the correct version of RStudio.

  • In terminal, to install R:

    wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | \
        sudo gpg --dearmor -o /usr/share/keyrings/r-project.gpg
        
    echo "deb [signed-by=/usr/share/keyrings/r-project.gpg] \
        https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" | \
        sudo tee -a /etc/apt/sources.list.d/r-project.list
        
    sudo apt update 
    
    sudo apt -y install r-base r-base-dev libcurl4-openssl-dev \
        libfontconfig1-dev libharfbuzz-dev libfribidi-dev \
        libfreetype6-dev libtiff5-dev libxml2-dev cmake 
  • In terminal, to install Rstudio:

    wget https://download1.rstudio.org/electron/jammy/amd64/rstudio-2023.12.1-402-amd64.deb
      
    sudo apt -y install -f ./rstudio-2023.12.1-402-amd64.deb  
    
    rm rstudio-2023.12.1-402-amd64.deb  

    You may see an error message at the end of this installation:

    Download is performed unsandboxed as root as file 'home/pathogen/rstudio-2023.12.1-402-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

    It's OK to ignore as long as you see that "RStudio" is in your menu under the "Programming" section and that you can open it.

    Click "Ignore Update" when opening RStudio and quit the program.

These next commands install the R packages that are required for the R Basics exercises later in the workshop.
WARNING: This installation is fairly long, up to an hour or more.

  • In terminal (not Rstudio):

    sudo Rscript -e 'install.packages(c("tidyverse", "ggsci", "ape", "RColorBrewer", 
    "lubridate", "ggpubr", "rlang", "TreeTools", "BiocManager"));
    library(BiocManager);
    BiocManager::install(c("ggtree", "ggtreeExtra", "treeio"))'

##In case of a weak internet connection, you may try the following codes in the order provided.

sudo Rscript -e 'install.packages("tidyverse")'
sudo Rscript -e 'install.packages("ggsci")'
sudo Rscript -e 'install.packages("ape")'
sudo Rscript -e 'install.packages("RColorBrewer")'
sudo Rscript -e 'install.packages("lubridate")'
sudo Rscript -e 'install.packages("ggpubr")'
sudo Rscript -e 'install.packages("rlang")'
sudo Rscript -e 'install.packages("TreeTools")'
sudo Rscript -e 'install.packages("BiocManager")'
sudo Rscript -e 'library(BiocManager); BiocManager::install("ggtree")'
sudo Rscript -e 'library(BiocManager); BiocManager::install("ggtreeExtra")'
sudo Rscript -e 'library(BiocManager); BiocManager::install("treeio")'

###*13-If the above code did not work copy and paste below to install treeio

sudo Rscript -e 'library(BiocManager); BiocManager::install("treeio", force = TRUE);BiocManager::install(ask = FALSE)'


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

⚠️ **GitHub.com Fallback** ⚠️