1 / 11

Command line and batch files Molekular Phylogenetics – Practical

Command line and batch files Molekular Phylogenetics – Practical. 1.1 The command line. 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

chacha
Download Presentation

Command line and batch files Molekular Phylogenetics – Practical

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

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

More Related