Programming introduction part I:
|
|
- Gladys Booker
- 6 years ago
- Views:
Transcription
1 Programming introduction part I: Perl, Unix/Linux and using the BlueHive cluster Bio472- Spring 2014 Amanda Larracuente
2 Text editor Syntax coloring Recognize several languages Line numbers Free! Mac/Windows GNU emacs Mac Xcode OR: nano Type text, ctrl+o to save
3 Log into BlueHive ssh OR ssh bluehive.crc.rochester.edu l username Go to class directory: /scratch/bio472_2014/ Download problem set #1 from: (go to courses)
4 Basic Unix/Linux commands Reference sheet is under Courses tab at: cd dir (change directory to dir) cd.. (go up one directory) ls (list contents of the directory) ls *.txt (list all files ending in.txt) ls s (show file sizes) pwd (show path to current directory) du (show directory space usage) wc l (print the number of lines in a file) cat file.txt (print the contents of file.txt) cat file1.txt file2.txt > file3.txt (concatenate file1 and file2 into file3.txt) grep pattern file (find all instances of pattern in file) grep > test.fa wc l (count # of fasta sequences in test.fa)
5 Practical Extraction and Report Language (Perl) Free high-level programming language Do you have Perl v5.0 or later on your system? Open terminal and type: perl v
6 Using BlueHive Go here: For graphical applications (e.g. R): Mac: Open Xquartz Application->Terminal Login to BlueHive with Y user@bluehive.crc.rochester.edu Module load R R Windows: Get Mobaxterm: Use ssh to log into BlueHive For text applications: Use ssh to log into BlueHive and submit PBS script with qsub OR work interactively: e.g. qsub -I -q interactive -l nodes=1:ppn=1 -l walltime=1:00:00
7 Hello World! Open a text editor, type the following lines and save as a file called Hello_world.pl : #!/usr/bin/perl w print "Hello, world!\n"; Run the program in your terminal by typing: perl Hello_world.pl
8 Scalars Strings of characters: hello Numbers (integers, floating points): 10 or or 10e7 Can be acted on with operators and will return a scalar: + addition (2+3=5) * multiplication (3*12=36) - Subtraction ( =2.7) % modulus (remainder) (10%3=1) / division (14/2=7) ** exponentiation (2**3=8) Store in scalar variable Declare scalar variable with my : my $scalar
9 Special characters and comparison operators Special characters \n newline \t tab \s space Comparison operators: Comparison Numeric String Equal == eq Not equal!= ne Less than < lt Greater than > gt Less than or equal to <= le Greater than or equal to >= ge
10 Loops Perl counts from zero! for (my $i=0; $i<10;$i++) { } print $i, \t ; my $i=0; while ($i<10) { print $i, \n ; $i++; } my $i=0; if ($i <= 10 && $i>6) { print High\n ; } elsif ($i<=6 && $i>3) { print Mid\n ; } else { print Low\n ; }
11 Arrays Variable that contains a list Create an array called people with elements 0-3 and values Fisher, Wright, Haldane, Mayr. $people[0]= Fisher ; $people[1]= Wright ; $people[2]= Haldane ; $people[3]= Mayr ; #Get the size of the array my $size=$#people+1; print size:,$size, \n ; #Print the names stored in the array for (my $i=0; $i<$size; $i++) { print $people[$i],"\n ; }
12 Hashes Hold values indexed by strings Look up values with keys (the index) Create a hash called names, with the keys Fisher, Wright, Haldane and Mayr and the values Ronald, Sewall, J.B.S. and Ernst. my %names $names{ Fisher }= Ronald ; $names{ Wright }= Sewall ; $names{ Haldane }= J.B.S. ; $names{ Mayr }= Ernst ; #Print the names stored in the hash for my $key (keys %names) { print $key,",", $names{$key},"\n ; }
13 Split Create a string called line with the following text: There is grandeur in this view of life Split the line on spaces and store in an array Print the elements of the array my $line="there is grandeur in this view of life..."; for (my $j=0; $j<$#array+1;$j++) { print $array[$j],"\n"; }
14 Substring Grab a subset of characters in a string substr(string,position,length) Example: Extract the word grandeur from the the following string: "There is grandeur in this view of life... ; my $line="there is grandeur in this view of life..."; my $subset=substr($line,9,8); print $subset, \n ;
15 Regular expressions Substitutions ~s/target/replacement/ Matches ~m/string/ Char Meaning ^ Beginning of string $ End of string. Any character (except newline) * Match 0+ times + Match 1+ times? Match 0 or 1 times, or shortest match alternative \ Special character \w Matches an alphanumeric character \d Matches a digit \s Matches a whitespace
16 Some examples if ($line=~m/^>/) #if the string starts with > if ($line=~m/[atcg]/) #if the string contains A or T or C or G if($line=~m/\w/) #if the string matches a word if($line=~m/^\w\d+) #if the string starts with a word and one or more digits
17 Input/Output and Filehandles Filehandle: an I/O connection between you and Perl Special filehandle names: -STDIN -DATA -STDOUT -ARGV -STDERR -ARGVOUT Write a program that 1. Takes the name of a file in on the command line 2. Opens the file and iterates through each line 3. For each line, creates a new string that substitutes most for MOST
18 Example 1: Input and Output #!/usr/bin/perl -w ############################################################################### # # Amanda Larracuente # Program written to play with I/O and filehandles # # example usage: IO_lesson.pl file.txt file.out # ############################################################################### my $file=$argv[0]; #name of input file my $outfile=$argv[1]; #name of output file #open the input/output files or die and report the error open(file, "$file") die ("Can't open $file!\n"); open(out,">>$outfile") die ("Can't open $outfile!\n"); foreach my $line(<file>) #for each line in the input file { chomp($line); #remove terminal \n $line=~s/most/most/g; #replace most with MOST print $line,"\n"; #print the new line to the screen print OUT $line,"\n"; #write the new line to an output file } #close input/output files close(file); close(out);
19 Example 2: While #!/usr/bin/perl -w ############################################################################### # # Amanda Larracuente # Program written to play with I/O and filehandles # # example usage: IO_lesson.pl file.txt # ############################################################################### my $file=$argv[0]; #name of input file #open the input file or die and report the error open(file, "$file") die ("Can't open $file!\n"); while (<FILE>) #for each line in the input file { chomp($_); #remove terminal \n my $new=$_; $new=~s/most/most/g; #replace most with MOST globally print $new,"\n";#print the new line to the screen } close(file); #close input file
20 Example 3: Grab_reads_from sam.pl Reconstruct a fastq file from an alignment file (SAM file) Type more TestGene.sam (we ll learn more about SAM files in the next lecture) This is a tab-delimited file containing alignment information Each line includes the read sequence and quality in the 10 th and 11 th column, respectively Split each line on the \t and store elements in an array Print out the columns that you need
21 #!/usr/bin/perl use warnings; use strict; ############################################################################### # # Amanda Larracuente 11/21/13 # Program written to recreate fastq from sam file # # example usage: perl Grab_reads_from_sam.pl MappedReads.sam # ############################################################################### my $samfile=$argv[0]; #name of fasta file to fetch from open(file, "$samfile") print ("Can't open $samfile!\n"); print "File ",$samfile," opened...\n"; my $outfile=$samfile; $outfile=~s/.sam/.reads.fq/g; #make output file name by substituting.sam for READS.fq open(out,">>$outfile") die ("Can't open $outfile!\n"); foreach my $line(<file>) #for each line in sam file { chomp($line); #get rid of "\n" at the end of each line if ($line=~m/^@/) {next;} #if the line starts skip because this is a comment in the sam file else #this must be the lines containing alignment information { read name #split the line on tabs and store in an array my $read_name=$linearray[0]; #so now the first element of the array corresponds to t my $seq=$linearray[9]; #get the read sequence my $qual=$linearray[10]; #get the base qualities #Make a new fastq file containing the reads print OUT "@",$read_name,"\n",$seq,"\n+\n",$qual,"\n"; } } close(out); close(file);
22 Some useful and quick commands What do these do? Try it with TestGene.READS.fq! cat test.fastq perl -e elsif($i==1){print;$i=-3}$i++;}' > test.fasta cat test.fastq perl -e '$i=0;while(<>){if(/^\+/&&$i==2){print;}elsif ($i==3){print;$i=-1}$i++;}' > test.qual
23 Perl resources O Reilly Perl Books Perl monks website:
24 Shell scripting Interface between the user and the Linux/Unix system BASH Use PBS scripts to submit computationally intensive jobs to BlueHive
25 BlueHive: a typical PBS script To run bowtie2: #!/bin/bash #PBS -q standard #PBS -l nodes=1:ppn=4 #PBS -l walltime=4:00:00 #PBS -l pvmem=4000mb #PBS -j oe #PBS -N bowtie2.align #PBS -o bowtie2.align.srr log cd $PBS_O_WORKDIR source /usr/local/modules/init/bash module load bowtie mkdir bowtie_srr bowtie2 --phred64 --sensitive -p 4 x RanGAP_generegion -q -1 SRR189053_1_val_1.fq -2 SRR189053_2_val_2.fq U SRR189053_unpaired.fq S bowtie_srr189053/srr sam
26 BlueHive: a typical PBS script To run bowtie2: Use the bash shell #!/bin/bash #PBS -q standard #PBS -l nodes=1:ppn=4 #PBS -l walltime=4:00:00 #PBS -l pvmem=4000mb #PBS -j oe #PBS -N bowtie2.align #PBS -o bowtie2.align.srr log cd $PBS_O_WORKDIR source /usr/local/modules/init/bash module load bowtie mkdir bowtie_srr Change to pwd Load bowtie2 and dependencies Request 4 processors on a single standard node Request 4GB of RAM and 4 hours of wall time Make a directory to store your output Qstat will show your job as bowtie2.align and create this log file when completed, with run details bowtie2 --phred64 --sensitive -p 4 x RanGAP_generegion -q -1 SRR189053_1_val_1.fq -2 SRR189053_2_val_2.fq U SRR189053_unpaired.fq S bowtie_srr189053/srr sam Your bowtie command
27 BlueHive: the queue The more resources you request, the longer you will wait in the queue To submit job: Type: qsub jobname.pbs To check on jobs: Type: qstat u user_name To kill a job: Type: qdel job_id
28 BlueHive dos and don ts DO: Use PBS scripts and qsub to run all jobs Store all of your output in /scratch/username Remember that /scratch is not backed up, so move files that you need DON T: Run a script on the command line (this uses the head node) unless in interactive mode Store intermediate output in ~/username (limited space)
29 System commands in Perl system( command"); e.g. system( rm file ); system( mv file dir );
30 File scripting in Perl my $filevar = <<ENDFILE; File contents ENDFILE Example: /scratch/bio472_2014/example_scripts/example_scripter.pl
31 sed Compact, but powerful! sed 's/string1/string2/g Replace string1 with string2 sed 's/[ \t]*$//' eliminate whitespace at end of line sed -n '10p Print 10 th line
32 Awk Compact, but powerful! Print every other line in file: awk '!(NR % 2)' testmatrix.txt Print average of 2 nd column: cat testmatrix.txt awk 'BEGIN {max=0} {sum+=$2} END {print "Average qual: "sum/nr}'
Shell Programming. Introduction to Linux. Peter Ruprecht Research CU Boulder
Introduction to Linux Shell Programming Peter Ruprecht peter.ruprecht@colorado.edu www.rc.colorado.edu Downloadable Materials Slides and examples available at https://github.com/researchcomputing/ Final_Tutorials/
More informationIntroduction to Perl. Perl Background. Sept 24, 2007 Class Meeting 6
Introduction to Perl Sept 24, 2007 Class Meeting 6 * Notes on Perl by Lenwood Heath, Virginia Tech 2004 Perl Background Practical Extraction and Report Language (Perl) Created by Larry Wall, mid-1980's
More informationQuick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing
Quick Start Guide by Burak Himmetoglu Supercomputing Consultant Enterprise Technology Services & Center for Scientific Computing E-mail: bhimmetoglu@ucsb.edu Linux/Unix basic commands Basic command structure:
More informationBasic Linux (Bash) Commands
Basic Linux (Bash) Commands Hint: Run commands in the emacs shell (emacs -nw, then M-x shell) instead of the terminal. It eases searching for and revising commands and navigating and copying-and-pasting
More informationNew User Tutorial. OSU High Performance Computing Center
New User Tutorial OSU High Performance Computing Center TABLE OF CONTENTS Logging In... 3-5 Windows... 3-4 Linux... 4 Mac... 4-5 Changing Password... 5 Using Linux Commands... 6 File Systems... 7 File
More informationProgramming Perls* Objective: To introduce students to the perl language.
Programming Perls* Objective: To introduce students to the perl language. Perl is a language for getting your job done. Making Easy Things Easy & Hard Things Possible Perl is a language for easily manipulating
More informationNBIC TechTrack PBS Tutorial. by Marcel Kempenaar, NBIC Bioinformatics Research Support group, University Medical Center Groningen
NBIC TechTrack PBS Tutorial by Marcel Kempenaar, NBIC Bioinformatics Research Support group, University Medical Center Groningen 1 NBIC PBS Tutorial This part is an introduction to clusters and the PBS
More informationQuick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing
Quick Start Guide by Burak Himmetoglu Supercomputing Consultant Enterprise Technology Services & Center for Scientific Computing E-mail: bhimmetoglu@ucsb.edu Contents User access, logging in Linux/Unix
More informationShell Scripting. With Applications to HPC. Edmund Sumbar Copyright 2007 University of Alberta. All rights reserved
AICT High Performance Computing Workshop With Applications to HPC Edmund Sumbar research.support@ualberta.ca Copyright 2007 University of Alberta. All rights reserved High performance computing environment
More informationIntroduction: What is Unix?
Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix
More informationCSCI 4152/6509 Natural Language Processing. Perl Tutorial CSCI 4152/6509. CSCI 4152/6509, Perl Tutorial 1
CSCI 4152/6509 Natural Language Processing Perl Tutorial CSCI 4152/6509 Vlado Kešelj CSCI 4152/6509, Perl Tutorial 1 created in 1987 by Larry Wall About Perl interpreted language, with just-in-time semi-compilation
More informationIntroduc)on to Unix and Perl programming
CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS Department of Systems Biology Technical University of Denmark Introduc)on to Unix and Perl programming EDITA KAROSIENE PhD student edita@cbs.dtu.dk www.cbs.dtu.dk
More informationWelcome to Research Computing Services training week! November 14-17, 2011
Welcome to Research Computing Services training week! November 14-17, 2011 Monday intro to Perl, Python and R Tuesday learn to use Titan Wednesday GPU, MPI and profiling Thursday about RCS and services
More informationA Hands-On Tutorial: RNA Sequencing Using High-Performance Computing
A Hands-On Tutorial: RNA Sequencing Using Computing February 11th and 12th, 2016 1st session (Thursday) Preliminaries: Linux, HPC, command line interface Using HPC: modules, queuing system Presented by:
More informationIntroduction to HPC Resources and Linux
Introduction to HPC Resources and Linux Burak Himmetoglu Enterprise Technology Services & Center for Scientific Computing e-mail: bhimmetoglu@ucsb.edu Paul Weakliem California Nanosystems Institute & Center
More informationShell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong
Shell Prof. Jinkyu Jeong (Jinkyu@skku.edu) TA -- Minwoo Ahn (minwoo.ahn@csl.skku.edu) TA -- Donghyun Kim (donghyun.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu
More informationPerl. Many of these conflict with design principles of languages for teaching.
Perl Perl = Practical Extraction and Report Language Developed by Larry Wall (late 80 s) as a replacement for awk. Has grown to become a replacement for awk, sed, grep, other filters, shell scripts, C
More informationAnswers to AWK problems. Shell-Programming. Future: Using loops to automate tasks. Download and Install: Python (Windows only.) R
Today s Class Answers to AWK problems Shell-Programming Using loops to automate tasks Future: Download and Install: Python (Windows only.) R Awk basics From the command line: $ awk '$1>20' filename Command
More informationIntroduction to Computing V - Linux and High-Performance Computing
Introduction to Computing V - Linux and High-Performance Computing Jonathan Mascie-Taylor (Slides originally by Quentin CAUDRON) Centre for Complexity Science, University of Warwick Outline 1 Program Arguments
More informationIntroduc)on to Unix and Perl programming
CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS Department of Systems Biology Technical University of Denmark Introduc)on to Unix and Perl programming EDITA KAROSIENE PhD student edita@cbs.dtu.dk www.cbs.dtu.dk
More informationPerl. Perl. Perl. Which Perl
Perl Perl Perl = Practical Extraction and Report Language Developed by Larry Wall (late 80 s) as a replacement for awk. Has grown to become a replacement for awk, sed, grep, other filters, shell scripts,
More informationLinux shell & shell scripting - II
IBS 574 - Computational Biology & Bioinformatics Spring 2018, Tuesday (02/01), 2:00-4:00PM Linux shell & shell scripting - II Ashok R. Dinasarapu Ph.D Scientist, Bioinformatics Dept. of Human Genetics,
More informationsottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi
Titolo presentazione Piattaforme Software per la Rete sottotitolo BASH Scripting Milano, XX mese 20XX A.A. 2016/17, Alessandro Barenghi Outline 1) Introduction to BASH 2) Helper commands 3) Control Flow
More informationIT441. Network Services Administration. Perl: File Handles
IT441 Network Services Administration Perl: File Handles Comment Blocks Perl normally treats lines beginning with a # as a comment. Get in the habit of including comments with your code. Put a comment
More informationIntroduction to Linux Basics Part II. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala
Introduction to Linux Basics Part II 1 Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala pakala@uga.edu 2 Variables in Shell HOW DOES LINUX WORK? Shell Arithmetic I/O and
More informationUseful Unix Commands Cheat Sheet
Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List
More informationSTATS Data Analysis using Python. Lecture 15: Advanced Command Line
STATS 700-002 Data Analysis using Python Lecture 15: Advanced Command Line Why UNIX/Linux? As a data scientist, you will spend most of your time dealing with data Data sets never arrive ready to analyze
More informationIntroduction to Linux Environment. Yun-Wen Chen
Introduction to Linux Environment Yun-Wen Chen 1 The Text (Command) Mode in Linux Environment 2 The Main Operating Systems We May Meet 1. Windows 2. Mac 3. Linux (Unix) 3 Windows Command Mode and DOS Type
More informationUsing ISMLL Cluster. Tutorial Lec 5. Mohsan Jameel, Information Systems and Machine Learning Lab, University of Hildesheim
Using ISMLL Cluster Tutorial Lec 5 1 Agenda Hardware Useful command Submitting job 2 Computing Cluster http://www.admin-magazine.com/hpc/articles/building-an-hpc-cluster Any problem or query regarding
More informationNBIC TechTrack PBS Tutorial
NBIC TechTrack PBS Tutorial by Marcel Kempenaar, NBIC Bioinformatics Research Support group, University Medical Center Groningen Visit our webpage at: http://www.nbic.nl/support/brs 1 NBIC PBS Tutorial
More informationWindshield. Language Reference Manual. Columbia University COMS W4115 Programming Languages and Translators Spring Prof. Stephen A.
Windshield Language Reference Manual Columbia University COMS W4115 Programming Languages and Translators Spring 2007 Prof. Stephen A. Edwards Team members Wei-Yun Ma wm2174 wm2174@columbia.edu Tony Wang
More informationIntroduction to Discovery.
Introduction to Discovery http://discovery.dartmouth.edu The Discovery Cluster 2 Agenda What is a cluster and why use it Overview of computer hardware in cluster Help Available to Discovery Users Logging
More informationIntroduction to Perl. c Sanjiv K. Bhatia. Department of Mathematics & Computer Science University of Missouri St. Louis St.
Introduction to Perl c Sanjiv K. Bhatia Department of Mathematics & Computer Science University of Missouri St. Louis St. Louis, MO 63121 Contents 1 Introduction 1 2 Getting started 1 3 Writing Perl scripts
More informationIntroduction to UNIX
PURDUE UNIVERSITY Introduction to UNIX Manual Michael Gribskov 8/21/2016 1 Contents Connecting to servers... 4 PUTTY... 4 SSH... 5 File Transfer... 5 scp secure copy... 5 sftp
More informationIntroduction to Discovery.
Introduction to Discovery http://discovery.dartmouth.edu The Discovery Cluster 2 Agenda What is a cluster and why use it Overview of computer hardware in cluster Help Available to Discovery Users Logging
More informationTable of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs
Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing
More informationLinux Bash Shell Scripting
University of Chicago Initiative in Biomedical Informatics Computation Institute Linux Bash Shell Scripting Present by: Mohammad Reza Gerami gerami@ipm.ir Day 2 Outline Support Review of Day 1 exercise
More informationUsing the computational resources at the GACRC
An introduction to zcluster Georgia Advanced Computing Resource Center (GACRC) University of Georgia Dr. Landau s PHYS4601/6601 course - Spring 2017 What is GACRC? Georgia Advanced Computing Resource Center
More informationCarnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016
Linux Boot Camp Jack, Matthew, Nishad, Stanley 6 Sep 2016 1 Connecting SSH Windows users: MobaXterm, PuTTY, SSH Tectia Mac & Linux users: Terminal (Just type ssh) andrewid@shark.ics.cs.cmu.edu 2 Let s
More informationAn Introduction to Cluster Computing Using Newton
An Introduction to Cluster Computing Using Newton Jason Harris and Dylan Storey March 25th, 2014 Jason Harris and Dylan Storey Introduction to Cluster Computing March 25th, 2014 1 / 26 Workshop design.
More information1) Introduc,on to unix command line and perl. Ma5 Webster IMBIM, BMC
1) Introduc,on to unix command line and perl Ma5 Webster IMBIM, BMC ma5hew.webster@imbim.uu.se Perl course details course book Learning Perl (6 ed.) lectures cover chapters morning lectures + aiernoon
More informationParameter searches and the batch system
Parameter searches and the batch system Scientific Computing Group css@rrzn.uni-hannover.de Parameter searches and the batch system Scientific Computing Group 1st of October 2012 1 Contents 1 Parameter
More informationPart 1: Basic Commands/U3li3es
Final Exam Part 1: Basic Commands/U3li3es May 17 th 3:00~4:00pm S-3-143 Same types of questions as in mid-term 1 2 ls, cat, echo ls -l e.g., regular file or directory, permissions, file size ls -a cat
More informationBasic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala
Basic UNIX commands HORT 59000 Lab 2 Instructor: Kranthi Varala Client/Server architecture User1 User2 User3 Server (UNIX/ Web/ Database etc..) User4 High Performance Compute (HPC) cluster User1 Compute
More informationUser Guide of High Performance Computing Cluster in School of Physics
User Guide of High Performance Computing Cluster in School of Physics Prepared by Sue Yang (xue.yang@sydney.edu.au) This document aims at helping users to quickly log into the cluster, set up the software
More informationLecture 5. Essential skills for bioinformatics: Unix/Linux
Lecture 5 Essential skills for bioinformatics: Unix/Linux UNIX DATA TOOLS Text processing with awk We have illustrated two ways awk can come in handy: Filtering data using rules that can combine regular
More informationEECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018
EECS 470 Lab 5 Linux Shell Scripting Department of Electrical Engineering and Computer Science College of Engineering University of Michigan Friday, 1 st February, 2018 (University of Michigan) Lab 5:
More informationPractical Linux examples: Exercises
Practical Linux examples: Exercises 1. Login (ssh) to the machine that you are assigned for this workshop (assigned machines: https://cbsu.tc.cornell.edu/ww/machines.aspx?i=87 ). Prepare working directory,
More informationLogging in to the CRAY
Logging in to the CRAY 1. Open Terminal Cray Hostname: cray2.colostate.edu Cray IP address: 129.82.103.183 On a Mac 2. type ssh username@cray2.colostate.edu where username is your account name 3. enter
More informationCommand Interpreters. command-line (e.g. Unix shell) On Unix/Linux, bash has become defacto standard shell.
Command Interpreters A command interpreter is a program that executes other programs. Aim: allow users to execute the commands provided on a computer system. Command interpreters come in two flavours:
More informationIntroduction to Linux and Cluster Computing Environments for Bioinformatics
Introduction to Linux and Cluster Computing Environments for Bioinformatics Doug Crabill Senior Academic IT Specialist Department of Statistics Purdue University dgc@purdue.edu What you will learn Linux
More informationAdvanced Linux Commands & Shell Scripting
Advanced Linux Commands & Shell Scripting Advanced Genomics & Bioinformatics Workshop James Oguya Nairobi, Kenya August, 2016 Man pages Most Linux commands are shipped with their reference manuals To view
More informationExercise 1: Basic Tools
Exercise 1: Basic Tools This exercise is created so everybody can learn the basic tools we will use during this course. It is really more like a tutorial than an exercise and, you are not required to submit
More informationunix intro Documentation
unix intro Documentation Release 1 Scott Wales February 21, 2013 CONTENTS 1 Logging On 2 1.1 Users & Groups............................................. 2 1.2 Getting Help...............................................
More informationIndian Institute of Technology Kharagpur. PERL Part II. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.
Indian Institute of Technology Kharagpur PERL Part II Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Kharagpur, INDIA Lecture 22: PERL Part II On completion, the student will be able
More informationUNIX for Smar0es. compu0ng environments. Aaron J. Mackey Bill Pearson
UNIX for Smar0es Aaron J. Mackey Bill Pearson compu0ng environments UNIX compu0ng: the command line "shell" environment, built- in tools infinitely extensible: download/install tools most bioinforma0cs
More informationScripting Languages Perl Basics. Course: Hebrew University
Scripting Languages Perl Basics Course: 67557 Hebrew University אליוט יפה Jaffe Lecturer: Elliot FMTEYEWTK Far More Than Everything You've Ever Wanted to Know Perl Pathologically Eclectic Rubbish Lister
More informationQuick Guide for the Torque Cluster Manager
Quick Guide for the Torque Cluster Manager Introduction: One of the main purposes of the Aries Cluster is to accommodate especially long-running programs. Users who run long jobs (which take hours or days
More informationGenome Assembly. 2 Sept. Groups. Wiki. Job files Read cleaning Other cleaning Genome Assembly
2 Sept Groups Group 5 was down to 3 people so I merged it into the other groups Group 1 is now 6 people anyone want to change? The initial drafter is not the official leader use any management structure
More informationUF Research Computing: Overview and Running STATA
UF : Overview and Running STATA www.rc.ufl.edu Mission Improve opportunities for research and scholarship Improve competitiveness in securing external funding Matt Gitzendanner magitz@ufl.edu Provide high-performance
More informationUnix Basics. Benjamin S. Skrainka University College London. July 17, 2010
Unix Basics Benjamin S. Skrainka University College London July 17, 2010 Overview We cover basic Unix survival skills: Why you need some Unix in your life How to get some Unix in your life Basic commands
More informationUoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)
UoW HPC Quick Start Information Technology Services University of Wollongong ( Last updated on October 10, 2011) 1 Contents 1 Logging into the HPC Cluster 3 1.1 From within the UoW campus.......................
More informationUsing Sapelo2 Cluster at the GACRC
Using Sapelo2 Cluster at the GACRC New User Training Workshop Georgia Advanced Computing Resource Center (GACRC) EITS/University of Georgia Zhuofei Hou zhuofei@uga.edu 1 Outline GACRC Sapelo2 Cluster Diagram
More informationA control expression must evaluate to a value that can be interpreted as true or false.
Control Statements Control Expressions A control expression must evaluate to a value that can be interpreted as true or false. How a control statement behaves depends on the value of its control expression.
More informationIntroduction to Discovery.
Introduction to Discovery http://discovery.dartmouth.edu March 2014 The Discovery Cluster 2 Agenda Resource overview Logging on to the cluster with ssh Transferring files to and from the cluster The Environment
More informationMigrating from Zcluster to Sapelo
GACRC User Quick Guide: Migrating from Zcluster to Sapelo The GACRC Staff Version 1.0 8/4/17 1 Discussion Points I. Request Sapelo User Account II. III. IV. Systems Transfer Files Configure Software Environment
More informationIntroduction To. Barry Grant
Introduction To Barry Grant bjgrant@umich.edu http://thegrantlab.org Working with Unix How do we actually use Unix? Inspecting text files less - visualize a text file: use arrow keys page down/page up
More informationIntroduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen
Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent
More informationHigh Performance Computing (HPC) Club Training Session. Xinsheng (Shawn) Qin
High Performance Computing (HPC) Club Training Session Xinsheng (Shawn) Qin Outline HPC Club The Hyak Supercomputer Logging in to Hyak Basic Linux Commands Transferring Files Between Your PC and Hyak Submitting
More informationPathologically Eclectic Rubbish Lister
Pathologically Eclectic Rubbish Lister 1 Perl Design Philosophy Author: Reuben Francis Cornel perl is an acronym for Practical Extraction and Report Language. But I guess the title is a rough translation
More informationShells and Shell Programming
Shells and Shell Programming 1 Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed
More informationPart III. Shell Config. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,
Part III Shell Config Compact Course @ Max-Planck, February 16-26, 2015 33 Special Directories. current directory.. parent directory ~ own home directory ~user home directory of user ~- previous directory
More informationProgramming Languages and Uses in Bioinformatics
Programming in Perl Programming Languages and Uses in Bioinformatics Perl, Python Pros: reformatting data files reading, writing and parsing files building web pages and database access building work flow
More informationDATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan
DATA 301 Introduction to Data Analytics Command Line Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Why learn the Command Line? The command line is the text interface
More informationWhy learn the Command Line? The command line is the text interface to the computer. DATA 301 Introduction to Data Analytics Command Line
DATA 301 Introduction to Data Analytics Command Line Why learn the Command Line? The command line is the text interface to the computer. DATA 301: Data Analytics (2) Understanding the command line allows
More information"Bash vs Python Throwdown" -or- "How you can accomplish common tasks using each of these tools" Bash Examples. Copying a file: $ cp file1 file2
"Bash vs Python Throwdown" -or- "How you can accomplish common tasks using each of these tools" Bash Examples Copying a file: $ cp file1 file2 Wrangling "csv" files: Consider a file named 20140209.csv
More informationIntroduction to Linux for BlueBEAR. January
Introduction to Linux for BlueBEAR January 2019 http://intranet.birmingham.ac.uk/bear Overview Understanding of the BlueBEAR workflow Logging in to BlueBEAR Introduction to basic Linux commands Basic file
More informationAssignment 3, Due October 4
Assignment 3, Due October 4 1 Summary This assignment gives you practice with writing shell scripts. Shell scripting is also known as bash programming. Your shell is bash, and when you write a shell script
More informationSharpen Exercise: Using HPC resources and running parallel applications
Sharpen Exercise: Using HPC resources and running parallel applications Andrew Turner, Dominic Sloan-Murphy, David Henty, Adrian Jackson Contents 1 Aims 2 2 Introduction 2 3 Instructions 3 3.1 Log into
More informationName Department/Research Area Have you used the Linux command line?
Please log in with HawkID (IOWA domain) Macs are available at stations as marked To switch between the Windows and the Mac systems, press scroll lock twice 9/27/2018 1 Ben Rogers ITS-Research Services
More informationIntermediate Programming, Spring Misha Kazhdan
600.120 Intermediate Programming, Spring 2017 Misha Kazhdan Outline Unix/Linux command line Basics of the Emacs editor Compiling and running a simple C program Cloning a repository Connecting to ugrad
More informationCS 261 Recitation 1 Compiling C on UNIX
Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Compiling C on UNIX Winter 2017 Outline Secure Shell Basic UNIX commands Editing text The GNU Compiler
More informationComputational Theory MAT542 (Computational Methods in Genomics) - Part 2 & 3 -
Computational Theory MAT542 (Computational Methods in Genomics) - Part 2 & 3 - Benjamin King Mount Desert Island Biological Laboratory bking@mdibl.org Overview of 4 Lectures Introduction to Computation
More informationBy Ludovic Duvaux (27 November 2013)
Array of jobs using SGE - an example using stampy, a mapping software. Running java applications on the cluster - merge sam files using the Picard tools By Ludovic Duvaux (27 November 2013) The idea ==========
More information1. Hello World Bash Shell Script. Last Updated on Wednesday, 13 April :03
1 of 18 21/10/2554 9:39 Bash scripting Tutorial tar -czf myhome_directory.tar.gz /home/linuxcong Last Updated on Wednesday, 13 April 2011 08:03 Article Index 1. Hello World Bash Shell Script 2. Simple
More informationLinux Command Line Interface. December 27, 2017
Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors
More informationCOMS 3101 Programming Languages: Perl. Lecture 2
COMS 3101 Programming Languages: Perl Lecture 2 Fall 2013 Instructor: Ilia Vovsha http://www.cs.columbia.edu/~vovsha/coms3101/perl Lecture Outline Control Flow (continued) Input / Output Subroutines Concepts:
More informationCS Unix Tools & Scripting
Cornell University, Spring 2014 1 February 24, 2014 1 Slides evolved from previous versions by Hussam Abu-Libdeh and David Slater A note on awk for (item in array) The order in which items are returned
More informationThe Unix Shell. Pipes and Filters
The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd
More informationIntroduction to Supercomputing
Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical
More informationIntroductory Perl. What is Perl?
Introductory Perl Boston University Office of Information Technology Course Number: 4080 Course Coordinator: Timothy Kohl Last Modified: 08/29/05 What is Perl? Perl stands for Practical Extraction and
More informationBash scripting Tutorial. Hello World Bash Shell Script. Super User Programming & Scripting 22 March 2013
Bash scripting Tutorial Super User Programming & Scripting 22 March 2013 Hello World Bash Shell Script First you need to find out where is your bash interpreter located. Enter the following into your command
More informationCS 25200: Systems Programming. Lecture 10: Shell Scripting in Bash
CS 25200: Systems Programming Lecture 10: Shell Scripting in Bash Dr. Jef Turkstra 2018 Dr. Jeffrey A. Turkstra 1 Lecture 10 Getting started with Bash Data types Reading and writing Control loops Decision
More informationPerl and R Scripting for Biologists
Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications
More informationThe DTU HPC system. and how to use TopOpt in PETSc on a HPC system, visualize and 3D print results.
The DTU HPC system and how to use TopOpt in PETSc on a HPC system, visualize and 3D print results. Niels Aage Department of Mechanical Engineering Technical University of Denmark Email: naage@mek.dtu.dk
More informationBash scripting basics
Bash scripting basics prepared by Anatoliy Antonov for ESSReS community September 2012 1 Outline Definitions Foundations Flow control References and exercises 2 Definitions 3 Definitions Script - [small]
More informationIntel Manycore Testing Lab (MTL) - Linux Getting Started Guide
Intel Manycore Testing Lab (MTL) - Linux Getting Started Guide Introduction What are the intended uses of the MTL? The MTL is prioritized for supporting the Intel Academic Community for the testing, validation
More informationThe cluster system. Introduction 22th February Jan Saalbach Scientific Computing Group
The cluster system Introduction 22th February 2018 Jan Saalbach Scientific Computing Group cluster-help@luis.uni-hannover.de Contents 1 General information about the compute cluster 2 Available computing
More informationCSE 374 Midterm Exam 11/2/15. Name Id #
Name Id # There are 8 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes,
More informationShells and Shell Programming
Shells and Shell Programming Shells A shell is a command line interpreter that is the interface between the user and the OS. The shell: analyzes each command determines what actions are to be performed
More information