-
Notifications
You must be signed in to change notification settings - Fork 0
Linux and bash scripting
Your MASSIVE desktop uses an operating system called Linux, which is a Unix-like operating system. It basically works just like the Windows or Macintosh operating systems that you might be more familiar with, but with a greater emphasis on command line usage than menus for navigation.
This means you’ll want to open what is known as a terminal, where you can run text based commands to open and move files or even run different software programs. Bash is a language used in Linux to write these text based commands.
When running software on MASSIVE specifically, you’ll often need to load specific modules before you get started in the terminal you’re currently running.
Before you run any software, you’ll need to be familiar with the basic syntax of bash.
Andy’s Brain Book provides an excellent introduction to Unix through a neuroimaging lens. We suggest using this to familiarise yourself with Linux/bash. See the intro here.
-
Lessons 1-4 will cover general commands for navigating file systems and directory trees.
-
Lessons 5-6 will cover for loops and if else statements (even if you’re familiar with these operations in another language, the syntax can still vary in bash).
-
Lessons 7-9 will cover writing and running scripts that will allow you to interact with your data, run your analyses, or anything else you wish to do with your code
Because of the way MASSIVE is arranged, there are a few things you will have to do slightly differently when following this tutorial on MASSIVE.
- Right-click on the desktop > ‘Create a File’ > name it ‘myFile.txt’
- Right-click on the desktop again > ‘Open a Terminal’
- Then follow the instructions using
ls
,cp
,mv
,rm
- Alternatively, you can use the text editor in MASSIVE by going to Applications > Full List of Apps > gedit
- 0.0 NSB Programming Courses (in ALPHA)
- 1.0 Working on the Cluster
- 2.0 Programming Languages
- 2.1 Python
- 2.1.1 Getting Set Up
- 2.1.2 Coding in Python
- 2.1.3 Applications of Python in Neuroimaging
- 2.2 MATLAB
- 2.3 R and RStudio
- 2.4 Programming Intro Exercises
- 2.5 git and GitHub
- 2.6 SLURM and Job Submission
- 2.1 Python
- 3.0 Neuroimaging Tools and Packages
- 3.1 BIDS
- 3.2 FreeSurfer
- 3.3 FSL
- 3.4 Connectome Workbench/wb_command
- 3.5 fMRIPrep
- 3.6 QSIPrep
- 3.7 MICApipe
- 3.8 MRIQC
- 4.0 Specialist Tools