meta data for this page
Working with the command line
Motivation
Bioinformatics sequence analysis resembles the working with texts, that can be in part pretty long. As with all tasks dealing with large amounts of data, automatization of certain steps in the analysis – or even the entire analysis workflow – is essential. Several scripting languages, such as Perl or Python provide a considerably easy entry into the ‘programming world’. The syntax of these languages is quite intuitive and allows even uninitiated people to write their own simple analysis scripts within hours or days. The real power of these languages, however, is provided by the large community that stands behind the ‘Bio-‘ projects, such as BioPerl and BioPhython. Here, international teams of developers provide read-to-use code snippets, so called modules, that perform out of the box a certain analysis task. Examples are modules for sequence reformatting, sequence alignment, or the like. These modules require defined input and provide defined output, and they can be easily integrated into own code. This saves time and effort, as there is no need to implement the underlying, often complex algorithms.
Opening a shell
The command line
The command line is the most direct way to interact with your computer. The general appearance of the command line prompt is something along the following lines
username@computername:~$
The precise format of the prompt depends on local settings which can be modified via the configuration file .bashrc.
GNU vs. BSD
Please note, there are two versions of the command line utilities, GNU (typical for linux distributions) and BSD (ships with Mac OS). Although the two versions provide the same functionality, they can differ in their syntax. If you are interested, you can read the folllowing link for more information.
ToDo
Commandline bootcamp
If you are not familiar with the command line, the online command line bootcamp is a nice way to introduce you into working with the command line. You can spend some time together with the tutor - and/or individually - in walking through this tutorial
- if you are within the AppliedBionformaticsFrankfurt network you have access to an interactive environment
- from outside the network, please open the static command line bootcamp together with a shell on your system
Memorize the individual commands, and it might be good idea to generate yourself short wiki pages that outline the individual functions together with the most relevant options. See the following pages as an example:
- Changing directories: cd
- locating your position in the directory tree: pwd
- looking into files: less
- linking files: ln
Alternatively, feel free to use our template to take your own notes.
Custom exercises
Understanding the following commands will help you during the course.
Please take this exercise serious, as it provides you with the basic skills required for a productive working in a dry lab.
Once you have completed this initial set of exercises, you will be prepared for working in the shell. Please keep in mind, we can introduce only a very basic set of functions. But basically, what every you want to do with a text, there is a shell function for it. So keep asking!