This repository will contain the code to be used as part of the 2022-10 class on Bioinformatics (yup different name..) at Universidad del Norte.
We are going to use mostly R but some Python code here and there. To ensure everyone has the same development environment we are going to use Docker. Docker is a virtualization technology that will allow us to run the same software even ensure dependencies at the OS level are the same. Below are the steps you need to follow in order to ensure the software will run on your machine.
- Install Docker on your machine. link
- Check a small introduction to Docker so you are somewhat familiar to what it is. You do no need to worry about technical details of Docker at the moment since I am providing everything ready to go for you.
- Please verify your installation by running
docker run hello-world
on command line / terminal. - Run the following command
docker run -d --name=rstudio-ohdsi -p 8787:8787 -e USER=ohdsi -e PASSWORD=ohdsi odysseusinc/rstudio-ohdsi:latest
. - Open a Web browser and type on the bar
http://localhost:8787
. You will be promoted for a user and password. Both are ohdsi. The username and password can be changed if you change the values of the parametersUSER
andPASSWORD
on the command run on the previous step - After login you should see RStudio server on your browser. Type this command in the R terminal
library(PatientLevelPrediction)
The library should load with no issues.
- Open an Azure Student Account using your Uninorte email. This will give you 100 USD in credits
- Start a VM with 1 Core and 4GB of RAM. We will use Ubuntu 20.04. Here some instructions for you.
- Connect to the VM using SSH. If you are in windows you will need to use a compatible SSH client. If you are in Ubuntu you are all set. the command you will need to run is something like this
ssh [email protected]
. In this command oopclass is the user that was created during the VM creation and the IP is assigned automatically by Azure. - Install Docker and Git inside the VM
- Add current users to sudoers to use Docker as current user inside the VM
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
- Check that you everything is ok by running
docker run hello-world
- Turn off the VM for the changes to have effect and Turn on again
- Optional
- If you want to login on Github and you have two factor authentication enabled you need to first
- Generate a personal access token
- Run this command so your Git credentials are stored
git config --global credential.helper store
- If you want to login on Github and you have two factor authentication enabled you need to first
- Clone our course repository on /home/$USER inside the VM.
git clone https://github.com/jdposada/bioinf_202210.git
- Optional
- You could decide to Fork the main repo so you have minor changes and other files in it. If that is the case you could keep it private. If you made this decision you should clone your fork instead of the class repo. Keep in mind you need to keep your fork updated
- Optional
- Connect to the VM using an SSH tunnel
ssh -L 8787:localhost:8787 investigacion@<Your IP Here>
- Run the following command on the Azure VM
docker run -d --name=rstudio-ohdsi --network=host -v /home/$USER/bioinf_202210:/home/ohdsi/workdir -e USER=ohdsi -e PASSWORD=ohdsi odysseusinc/rstudio-ohdsi:latest
- To check that the container is properly running by executing on the terminal
docker ps
. You should see a container with the namerstudio-ohdsi
- Open a Web browser and type on the bar
http://localhost:8787
. You will be prompted for a user and password. Both are ohdsi. The username and password can be changed if you change the values of the parametersUSER
andPASSWORD
on the command run on the previous step. Be sure to check the boxStay signed in when browser closes
if you want to RStudio server to run in the background without you actively being there. This is very useful for long runnings. - After login you should see RStudio server on your browser. Type this command in the R terminal
library(PatientLevelPrediction)
The library should load with no issues.