-
Notifications
You must be signed in to change notification settings - Fork 14
/
lab_uppmax_intro.Rmd
130 lines (93 loc) · 4.06 KB
/
lab_uppmax_intro.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
title: 'Working on UPPMAX'
output:
bookdown::html_document2:
highlight: textmate
toc: true
toc_float:
collapsed: true
smooth_scroll: true
print: false
toc_depth: 4
number_sections: true
df_print: default
code_folding: none
self_contained: false
keep_md: false
encoding: 'UTF-8'
css: "assets/lab.css"
include:
after_body: assets/footer-lab.html
---
```{r,child="assets/header-lab.Rmd"}
```
```{r,eval=TRUE,include=FALSE}
library(yaml)
upid <- yaml::read_yaml("_site.yml")$uppmax_project
upres <- yaml::read_yaml("_site.yml")$uppmax_res_1
```
# Connect to UPPMAX
The first step of this lab is to open a ssh connection to UPPMAX. You will need an SSH program to do this:
<i class="fab fa-linux"></i> Linux: Use **Terminal** (Included by default).
<i class="fab fa-apple"></i> OSX: Use **Terminal** (Included by default).
<i class="fab fa-windows"></i> Windows: use [MobaXterm](https://mobaxterm.mobatek.net/). Download and install it if you haven't already done so.
Fire up the available SSH program and enter the following:
```bash
$ ssh -Y user@rackham.uppmax.uu.se
```
Replace **user** with your UPPMAX username. `-Y` means that X-forwarding is activated on the connection, which means graphical data can be transmitted if a program requests it, i.e. programs can use a graphical user interface (GUI) if they want to.
Enter your password when prompted. As you type, nothing will show on screen.
No stars, no dots. It is supposed to be that way. Just type the password and press enter, it will be fine.
Now your screen should look something like this:
```bash
ssh -Y user@rackham.uppmax.uu.se
Last login: Fri May 18 15:03:59 2018 from micro046.icm.uu.se
_ _ ____ ____ __ __ _ __ __
| | | | _ \| _ \| \/ | / \ \ \/ / | System: rackham4
| | | | |_) | |_) | |\/| | / _ \ \ / | User: user
| |_| | __/| __/| | | |/ ___ \ / \ |
\___/|_| |_| |_| |_/_/ \_\/_/\_\ |
###############################################################################
User Guides: http://www.uppmax.uu.se/support/user-guides
FAQ: http://www.uppmax.uu.se/support/faq
Write to support@uppmax.uu.se, if you have questions or comments.
```
# Logon to a node
Book resources for a compute node.
```{r,echo=FALSE,comment="",class.output="bash"}
cat(paste0("$ salloc -A ",upid," -t 07:00:00 -p core -n 6 --reservation=",upres))
```
Then check which node has been assigned to you (replace **username** with your UPPMAX username)
```bash
$ squeue -u username
```
should look something like this
```bash
usr@rackham2 work $ squeue -u user
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
3132376 core sh user R 0:04 1 r292
```
where **r292** is the name of the node I got (yours will probably be different).
Note the numbers in the Time column. They show for how long the job has been running. When it reaches the time limit you requested (7 hours in this case) the session will shut down, and you will lose all unsaved data. Connect to this node from within UPPMAX.
```bash
$ ssh -Y r292
```
# Modules
UPPMAX used modules to load and unload programs. To view which module you have loaded at the moment, type,
```bash
$ module list
Currently Loaded Modules:
1) uppmax 2) bioinfo-tools 3) samtools/1.6
```
Let's say that you want to make sure you are using the latest version samtools. Look at which version you have loaded at the moment (`samtools/1.6`).
Now type
```bash
$ module avail
```
to see which programs are available at UPPMAX. Can you find samtools in the list? Which is the latest version of samtools available at UPPMAX?
To change which samtools module you have loaded, you have to unload the the module you have loaded and then load the other module. To unload a module, use
```bash
$ module unload <module name>
```
Look in the list from `$ module list` to see the name of the module you want to unload. When the old module is unloaded, load `samtools/0.1.19` (or try with the latest samtools module!).
***