Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Installing R and Rstudio

The analysis scripts in this guide are written in R script. We will be using RStudio, a front-end gui for R, to run the analysis scripts.

You have three main options for running this analysis in RStudio:

  1. Use QUTs rVDI virtual desktop machines

  2. Install R and RStudio on your own PC

  3. Use the provided PCs in the QUT computer labs

Option1: Use QUTs rVDI virtual desktop machines

This is the preferred method, as R and RStudio are already installed, as are all the required R packages needed for analysis. Installing all of these can take over 30 minutes on your own PC, so using an rVDI machine saves time.

rVDI provides a virtual Windows desktop that can be run in your web browser.

To access and run an rVDI virtual desktop:

Go to https://rvdi.qut.edu.au/

Click on ‘VMware Horizon HTML Access

Log on with your QUT username and password

*NOTE: you need to be connected to the QUT network first, either being on campus or connecting remotely via VPN.

Option2: Install R and RStudio on your own PC

Go to the following page https://posit.co/download/rstudio-desktop/ and follow the instructions provided to install first R and then Rstudio.

Download and install R, following the default prompts:

https://cran.r-project.org/bin/windows/base/

Download and install RStudio, following the default prompts:

https://posit.co/download/rstudio-desktop/

Option3: Use the provided PCs in the QUT computer labs

The PCs in the computer labs already have R and RStudio installed. If using this option, you will need to install the required R packages (unlike rVDI). The code for installing these packages is in the analysis section below.

Map your HPC home directory

We did this in the last session, but if you’re on one of the computer lab PCs or an rVDI virtual machine you’ll need to re-map your HPC home directory.

Follow the instructions here:

https://qutvirtual4.qut.edu.au/group/staff/research/conducting/facilities/advanced-research-computing-storage/supercomputing/using-hpc-filesystems

Create your workshop folders and check your data

In your Z drive (the drive you just mapped) check to see if there is an ASV_table.tsv in

Z:\meta_workshop\illumina\results\dada2

This is the base data file we’ll be working with - an abundance table of read counts per ASV (i.e. taxonomic group) per sample. Using this we’ll be able to quantify and visualise taxonomic diversity and structure, using R.

The analysis also requires the metadata.tsv file we created at the start of last workshop. Check to see if this file is in Z:\meta_workshop\illumina\data

If you don’t have

cp -r /work/training/metagenomics/public_data/Illumina/results $HOME/meta_workshop/illumina
cp -r /work/training/metagenomics/public_data/Illumina/data/metadata.tsv $HOME/meta_workshop/illumina/data

We’ll need to

Open PuTTY and run the following to create today’s workshop folder:

mkdir $HOME/home/whatmorp/meta_workshop/R_analysis

 

  • No labels