Materials for 'Introduction to scientific programing – Linux, python and R' (LV 0940.197), WS 2024/25, offered at the Medical University of Graz (https://www.medunigraz.at).
Dear participant,
welcome to the course of Introduction to Scientific Programming within the PhD School MolMed. In this course, we will get the basics in two of the main languages used in Science: Python and R. We will also introduce how to work under Linux environment, the use of some command in the terminal (bash) as well as how to submit jobs to a scientific cluster using the job manager SLURM.
The course will take place the week Jan. 27-31 2025 at the Med Campus in the room SR53 (MC2.N.01.017).
We recommend that you bring your own laptop for the course, i.e., please prepare in advance as instructed below.
Please install anaconda (v 3) on your laptop. You find the appropriate version for your OS following the link: https://docs.anaconda.com/anaconda/install/
Please install R and RStudio on your laptop. You find the instructions and links in the document Introduction course_Installation_R_RStudio_Rpackages.pdf.
We have prepared a virtual machine with Debian for the course to be used on the laptops of the Pc Pool. We will cover the following topics:
- Introduction to Linux environment, distributions, permissions
- Command-line basics
- Vi editor
- Environment variables, .bashrc file
- Scripts and running scientific jobs
- Visualization of data with gnuplot
- SLURM
- Introduction to HPC MedBioNode
Slides:
VSC Tranining course: https://vsc.ac.at/training/2022/VSC-Linux-Oct/
Spectrum data: https://medunigraz-my.sharepoint.com/:u:/g/personal/pedro_murcia_medunigraz_at/EXy8HwgP7-FKgOI7u6GoNkUBD4uf2oHq4rhlXFDraEFg_w?e=ZFQfjf
Linux cheat sheet: https://cheatography.com/davechild/cheat-sheets/linux-command-line/
vi cheat sheet: https://www2.seas.gwu.edu/~mems/ece215/reference/vi-cheatsheet.pdf
-
script.sh
#!/bin/bash
echo "foo bar"
mkdir myfolder -
loop.sh (using a numeric sequence)
#!/bin/bash
for i in {1..5}
do
echo $i
done -
loop2.sh (using a list of elements in test.dat)
#!/bin/bash
for i in $(cat test.dat)
do
echo $i
do
This work is licensed under the terms of the Attribution-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. See https://creativecommons.org/licenses/by-sa/4.0/
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes .
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
