Download
command line and batch files molekular phylogenetics practical n.
Skip this Video
Loading SlideShow in 5 Seconds..
Command line and batch files Molekular Phylogenetics – Practical PowerPoint Presentation
Download Presentation
Command line and batch files Molekular Phylogenetics – Practical

Command line and batch files Molekular Phylogenetics – Practical

114 Views Download Presentation
Download Presentation

Command line and batch files Molekular Phylogenetics – Practical

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Command lineandbatchfilesMolekular Phylogenetics– Practical

  2. 1 Kommandozeile 1.1 The commandline • Alternative tothegraphicaluserinterface (GUI) of an operatingsystem • Advantages: • Commandscanbesavedforrepeateduse • Oneprogramisabletoexecuteotherprograms • Experienceduserscanperformsometasksfasterthanwiththe GUI • Drawbacks: • Commandsandoptionshavetobeknownbytheuser (ordisplayed in a moretime-consumingwaythan in the GUI)

  3. 1 Kommandozeile 1.2 Usage • An inputconsistsof a commandand a listofparameters. • Command: • Name of an executablefile (e.g.„winword.exe“) • Standard command (e.g. „cd“ forchangedirectory) • Parameter list: • Separatedbyspaces • Providefurtherinformationtotheexecutedapplication • e.g. thenameof a filetoopenedwiththeapplication Befehl Parameter abgetrennt durch Leerzeichen

  4. 1 Kommandozeile 1.3 Working directory • The currentworkingdirectoryisdisplayed in front oftheinputcursor • Files in therecanbereferencedwithoutthefullpath • The command„cd“ changestheworkingdirectory command path relative tothecurrentworkingdirectoty („C:\“) astheonlyparameter Changedworkingdirectory

  5. 1 Kommandozeile 1.4 Specifiyingpaths (1) • File locations (ascommandsorparameters) canbespecified in different ways: • Applicationanddocumentarebothlocated in thecurrentworkingdirectory (relative pathscanbeusedforboth) • Applicationis in theworkingdirectory, thedocumentisreferencedby a relative path • „..“ means „onelevelupwards“

  6. 1 Kommandozeile 1.4 Specifiyingpaths (2) • Application in thecurrentworkingdirectory, documentreferencedby an absolute path • Applicationreferencedby an absolute path, document in thecurrentworkingdirectory • Sincethepathtotheapplicationcontainsspaces, ishastobeput in quotationmarks • Otherwise „C:\Program“ wouldbethecommandandtherewouldbe 4 parameters: • „Files“ • „(x86)\Editoren\Microsoft“ • „Office\Office14\winword.exe“ • „Dokument.docx“ • Ofcourseisisalwayspossibletospecifyapplicationanddokumentwith absolute paths

  7. 1 Kommandozeile 1.5 Importantcommands • cd<path>Changestheworkingdirectory • dirLists thecontentsoftheworkingdirectory • del <path>Deletesthespecifiedfile (or all files in thespecifiedfolder) • md <name>Creates a newdirectory • rd<path>Deletesthespecifieddirectory • copy<source> <target>Copies a file • move<source> <target>Moves a file • exitTerminatesthecommandlinesession (The same effectasclosingthecommandlinewindow)

  8. 1 Kommandozeile 1.6 Batch files • Expressionsforthecommandlinecan also besaved in textfiles • Repeatedtaskscanbesavedand do havetoretypedevery time • Files havetheextension „bat“ • Every line in thefilecontainsoneexpression (consistingof a commandandpossibleparameters) • Example: • Sets theworkingdirectorytotheDocumentsoftheuser„BenStoever“ andstarts Word • Toexecute a batchfile simple type itsnameintothecommandline (or double click on it)

  9. 2. Java Technologie 2.1 Java Virtual Machine • Java applicationscannotbeexecuteddirectly • Theyhavetobeexecutedby a virtualmachine (JVM) • The virtualmachineis an executablefilecompiledfortheaccordingoperatingsystem • The javaapplicationiscontained in a JAR fileandcanbeexecuted on all operatingsystemswhere a virtualmachineisavailable • Advantage: Java applicationsareindendant on theoperatingsystem • Disatvantage: A JVM hastobeinstalled,Complexcalculations in Java codemighttakelongerthan in native applications

  10. 2. Java Technologie 2.2 Starting a Java application • Der command (executablefile) isthe JVM in thiscase • Itsfirstparameterisalways„-jar“ • The Java applicationfile (JAR file) isthesecondparameter • Additional parametersthatarespecifiedarepassedtotheapplicationbythe JVM Command (JVM) Parameter forthe Java application Java application

  11. Titel der Präsentation 2.3 ExampleRandSeq • RandSeqis a programtogenerateequallydistributedrandom DNA and RAN sequences • Itiswritten in Java andthereforehastobestarted via java –jar • RandSeqexpectsthefollowingcommandlineparameters: java –jar RandSeq.jar <outputFile> <nucleotideCount> <sequenceType> <cytosineRate> <guanineRate> <adenineRate> • <sequenceType>caneitherbe–dnaor-rna • The remaining rate forthymineoruraciliscalculatedfromtheothers