Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ben Stöver Winter term 2013/2014 Command line and batch files Molekular Phylogenetics – Practical.

Similar presentations


Presentation on theme: "Ben Stöver Winter term 2013/2014 Command line and batch files Molekular Phylogenetics – Practical."— Presentation transcript:

1 Ben Stöver Winter term 2013/2014 Command line and batch files Molekular Phylogenetics – Practical

2 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.1 The command line 1 Kommandozeile 2 Alternative to the graphical user interface (GUI) of an operating system Advantages: Commands can be saved for repeated use One program is able to execute other programs Experienced users can perform some tasks faster than with the GUI Drawbacks: Commands and options have to be known by the user (or displayed in a more time-consuming way than in the GUI)

3 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.2 Usage 3 1 Kommandozeile An input consists of a command and a list of parameters. Command: Name of an executable file (e.g. winword.exe) Standard command (e.g. cd for change directory) Parameter list: Separated by spaces Provide further information to the executed application e.g. the name of a file to opened with the application BefehlParameter abgetrennt durch Leerzeichen

4 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.3 Working directory 4 1 Kommandozeile The current working directory is displayed in front of the input cursor Files in there can be referenced without the full path The command cd changes the working directory commandpath relative to the current working directoty (C:\) as the only parameter Changed working directory

5 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.4 Specifiying paths (1) 5 1 Kommandozeile File locations (as commands or parameters) can be specified in different ways: Application and document are both located in the current working directory (relative paths can be used for both) Application is in the working directory, the document is referenced by a relative path.. means one level upwards

6 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.4 Specifiying paths (2) 6 Application in the current working directory, document referenced by an absolute path Application referenced by an absolute path, document in the current working directory Since the path to the application contains spaces, is has to be put in quotation marks Otherwise C:\Program would be the command and there would be 4 parameters: Files (x86)\Editoren\Microsoft Office\Office14\winword.exe Dokument.docx Of course is is always possible to specify application and dokument with absolute paths 1 Kommandozeile

7 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.5 Important commands 7 1 Kommandozeile cd Changes the working directory dir Lists the contents of the working directory del Deletes the specified file (or all files in the specified folder) md Creates a new directory rd Deletes the specified directory copy Copies a file move Moves a file exit Terminates the command line session (The same effect as closing the command line window)

8 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 1.6 Batch files 8 1 Kommandozeile Expressions for the command line can also be saved in text files Repeated tasks can be saved and do have to retyped every time Files have the extension bat Every line in the file contains one expression (consisting of a command and possible parameters) Example: Sets the working directory to the Documents of the user BenStoever and starts Word To execute a batch file simple type its name into the command line (or double click on it)

9 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 2.1 Java Virtual Machine 2. Java Technologie 9 Java applications cannot be executed directly They have to be executed by a virtual machine (JVM) The virtual machine is an executable file compiled for the according operating system The java application is contained in a JAR file and can be executed on all operating systems where a virtual machine is available Advantage: Java applications are indendant on the operating system Disatvantage: A JVM has to be installed, Complex calculations in Java code might take longer than in native applications

10 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 2.2 Starting a Java application 10 Der command (executable file) is the JVM in this case Its first parameter is always -jar The Java application file (JAR file) is the second parameter Additional parameters that are specified are passed to the application by the JVM 2. Java Technologie Command (JVM) Java application Parameter for the Java application

11 Kommandozeile und bioinformatische Dateiformate Ben StöverFortgeschrittenenmodul Molekulare Phylogenetik – Praktikum Winter term 2013/2014 3.02.2014 2.3 Example RandSeq Titel der Präsentation 11 RandSeq is a program to generate equally distributed random DNA and RAN sequences It is written in Java and therefore has to be started via java –jar RandSeq expects the following command line parameters: java –jar RandSeq.jar can either be –dna or -rna The remaining rate for thymine or uracil is calculated from the others


Download ppt "Ben Stöver Winter term 2013/2014 Command line and batch files Molekular Phylogenetics – Practical."

Similar presentations


Ads by Google