MBV4410/9410 Fall Bioinformatics for Molecular Biology. More Unix

Similar documents
The Shell. EOAS Software Carpentry Workshop. September 20th, 2016

Linux Bootcamp Fall 2015

Reading and manipulating files

The Unix Shell. Pipes and Filters

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Introduction: What is Unix?

Unix basics exercise MBV-INFX410

Computer Systems and Architecture

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Computer Systems and Architecture

Lab Working with Linux Command Line

Introduction to the Linux Command Line

Advanced Linux Commands & Shell Scripting

Recap From Last Time:

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

BGGN 213 Working with UNIX Barry Grant

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

CS CS Tutorial 2 2 Winter 2018

Practical Session 0 Introduction to Linux

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

A Brief Introduction to the Linux Shell for Data Science

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Utilities. September 8, 2015

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Introduction to Linux

Lecture 2: Tools & Concepts

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Introduction to UNIX command-line

Session 1: Accessing MUGrid and Command Line Basics

Scripting Languages Course 1. Diana Trandabăț

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

Linux for Biologists Part 2

Introduction to Linux for BlueBEAR. January

Shell Programming Overview

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Introduction to Linux. Fundamentals of Computer Science

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Chapter 4. Unix Tutorial. Unix Shell

Introduction to Linux

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Introduction to UNIX Command Line

CS197U: A Hands on Introduction to Unix

Shell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

INTRODUCTION TO BIOINFORMATICS

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

Essential Linux Shell Commands

Common File System Commands

Introduction to the UNIX command line

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection

CS 25200: Systems Programming. Lecture 11: *nix Commands and Shell Internals

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Topic 2: More Shell Skills

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010

CS 460 Linux Tutorial

Introduction. File System. Note. Achtung!

Intro. To Unix commands. What are the machines? Very basics

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Pivotal Capgemini Just Do It Training HDFS-NFS Gateway Labs

Linux Introduction Martin Dahlö

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Introduction to Unix: Fundamental Commands

Unix Essentials. BaRC Hot Topics Bioinformatics and Research Computing Whitehead Institute October 12 th

Table 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

Introduction To Linux. Rob Thomas - ACRC

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Linux Introduction Martin Dahlö Valentin Georgiev

Introduction to UNIX command-line II

27-Sep CSCI 2132 Software Development Lab 4: Exploring bash and C Compilation. Faculty of Computer Science, Dalhousie University

Command Line Interface The basics

Linux & Shell Programming 2014

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More

Arkansas High Performance Computing Center at the University of Arkansas

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Linux Shell Script. J. K. Mandal

Introduction to the Linux Command Line. Ken Weiss HITS Computational Research Consulting Division

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

CSCI 2132 Software Development. Lecture 4: Files and Directories

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Getting your department account

Recap From Last Time: Setup Checklist BGGN 213. Todays Menu. Introduction to UNIX.

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Module 1. - System set-up and data-set construction. Center for Biological Sequence Analysis. Tammi Vesth, PhD student

COSC UNIX. Textbook. Grading Scheme

A Brief Introduction to Unix

Running Programs in UNIX 1 / 30

STA 303 / 1002 Using SAS on CQUEST

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Basics. proper programmers write commands

No Food or Drink in this room. Logon to Windows machine

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Linux environment. Graphical interface X-window + window manager. Text interface terminal + shell

Cloud Computing and Unix: An Introduction. Dr. Sophie Shaw University of Aberdeen, UK

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Unix Workshop Aug 2014

Transcription:

MBV4410/9410 Fall 2017 Bioinformatics for Molecular Biology More Unix

Transfer files You must be able to transfer files between a Unix server (such as freebee.abel.uio.no or login.abel.uio.no) and your laptop (both ways). You can use software such as WinSCP or Fetch. Or the command line with scp (on Windows you need Cygwin with scp installed).

Copy files to and from UiO home area (Terminal/ Cygwin etc.)

Copy files to and from UiO home area (graphical)

Moving files with the mv command Move file1.txt to directory mvtest Pro tip: mv command can also rename files! ( moves file to a new filename)

Non-printing characters Use cat -v to see invisible characters. Typically End of Line (EOL) characters MS Windows newline character

Non-printing characters EOLs differ between Windows and Unix (including Mac) languages Use dos2unix command to go from MS Windows to Unix Use unix2dos command to do the reverse NB! dos2unix might have to be installed. Already installed on freebee

Everything on a single line!

Delete files with the rm command NB! There s no trash can on Unix! Your files are immediately deleted! Delete empty directories with rm r Delete directories AND files within with rm rf Use with caution!! (rm i)

Viewing files Pro tip: Use the different options to tweak the output cat displays the entire content on the screen less displays the content on the screen one file/line at a time (press q to exit). head/tail displays the first or last lines of a file

Downloading files from the internet The wget command should work on freebee Other options are curl or ftp Right-click and copy the link!

Back up your data! Don t store only on your laptop Use M: on UiO machines (login.uio.no) Same as ~/ in Unix environment ~/pc/desktop on login or freebee is the same as M: on UiO machines

Putty log on to home area

Putty log on to freebee

Graphical interface for file transfer WinSCP (https://winscp.net/) - on the Desktops Fetch (http://fetchsoftworks.com/)

Some interactive exercises on Pipes and Filters Log in to freebee.abel.uio.no Download the file shell-novice-data.zip: wget http://folk.uio.no/jonbra/mbv-inf4410_2017/shell-novicedata.zip Unzip the file. It creates a directory called data-shell. Go into data-shell

Wildcards * Matches zero or more characters? Matches a single character Run wc *.pdb inside molecules

Which ls command produces this output? 1. ls *t*ane.pdb 2. ls *t?ne.* 3. ls *t??ne.pdb 4. ls ethane.*

You have a directory containing the files: 2015-10-23-calibration.txt 2015-10-23-dataset1.txt 2015-10-23-dataset2.txt 2015-10-23-dataset_overview.txt 2015-10-26-calibration.txt 2015-10-26-dataset1.txt 2015-10-26-dataset2.txt 2015-10-26-dataset_overview.txt 2015-11-23-calibration.txt 2015-11-23-dataset1.txt 2015-11-23-dataset2.txt 2015-11-23-dataset_overview.txt You back up the data, and send some of the files to Bob: $ cp *dataset* /backup/datasets $ cp calibration /backup/calibration $ cp 2015- - ~/send_to_bob/all_november_files/ $ cp ~/send_to_bob/all_datasets_created_on_a_23rd/ Fill in the blanks: $ cp *calibration.txt /backup/calibration $ cp 2015-11-* ~/send_to_bob/all_november_files/ $ cp *-23-dataset* ~/send_to_bob/ all_datasets_created_on_a_23rd/

What Does >> Mean? What is the difference between: $ echo hello > testfile01.txt and: $ echo hello >> testfile02.txt Hint: Try executing each command twice in a row and then examining the output files.

Appending data Consider the file data-shell/data/animals.txt. After these commands, select the answer that corresponds to the file animalsupd.txt: $ head -3 animals.txt > animalsupd.txt $ tail -2 animals.txt >> animalsupd.txt 1. The first three lines of animals.txt 2. The last two lines of animals.txt 3. The first three lines and the last two lines of animals.txt 4. The second and third lines of animals.txt

Piping commands together In our current directory, we want to find the 3 files which have the least number of lines. Which command listed below would work? 1. wc -l * > sort -n > head -n 3 2. wc -l * sort -n head -n 1-3 3. wc -l * head -n 3 sort -n 4. wc -l * sort -n head -n 3

Markdown (just for information) https://daringfireball.net/projects/markdown/basics https://www.cs.colorado.edu/~kena/classes/5828/f16/ lectures/04-markdowngithub.pdf Good practice to always write notes in a text file with markdown formatting.