Unix - Basics Course on Unix and Genomic Data Prague, January 2017

Similar documents
Handling important NGS data formats in UNIX Prac8cal training course NGS Workshop in Nove Hrady 2014

Introduction to UNIX command-line

Using Linux as a Virtual Machine

CSCI 2132 Software Development. Lecture 4: Files and Directories

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

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

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

Introduction to Linux. Roman Cheplyaka

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

Computer Systems and Architecture

Computer Systems and Architecture

Recap From Last Time:

Introduction to UNIX command-line II

BGGN 213 Working with UNIX Barry Grant

CS 460 Linux Tutorial

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

Files

Lab Working with Linux Command Line

Introduction. File System. Note. Achtung!

System Administration

Utilities. September 8, 2015

DATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan

Why learn the Command Line? The command line is the text interface to the computer. DATA 301 Introduction to Data Analytics Command Line

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

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

Chapter 4. Unix Tutorial. Unix Shell

Introduction to Linux

Advanced Linux Commands & Shell Scripting

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

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

This is Lab Worksheet 3 - not an Assignment

Useful Unix Commands Cheat Sheet

Files and Directories

Introduction to Unix: Fundamental Commands

The Unix Shell. Pipes and Filters

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Scripting Languages Course 1. Diana Trandabăț

Introduction to Linux

Modern C++ for Computer Vision and Image Processing. Igor Bogoslavskyi and Cyrill Stachniss

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Shell Programming Overview

Introduction: What is Unix?

UNIX Quick Reference

Systems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab

Unix Tools / Command Line

Short Read Sequencing Analysis Workshop

CHEM5302 Fall 2015: Introduction to Maestro and the command line

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Lecture 01 - Working with Linux Servers and Git

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

Perl and R Scripting for Biologists

Command-line interpreters

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Linux command line basics II: downloading data and controlling files. Yanbin Yin

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

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Introduction To. Barry Grant

Introduction to Unix and Linux. Workshop 1: Directories and Files

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

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Lab #1 Installing a System Due Friday, September 6, 2002

Unix basics exercise MBV-INFX410

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Std: XI CHAPTER-3 LINUX

Basic Linux (Bash) Commands

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

Genomics tools: making quickly impressive outputs

Introduction To. Barry Grant

Introduction to the shell Part II

An Introduction to Linux and Bowtie

Password Management Guidelines for Cisco UCS Passwords

A Hands-On Tutorial: RNA Sequencing Using High-Performance Computing

Lab 2: Linux/Unix shell

Chapter-3. Introduction to Unix: Fundamental Commands

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

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

SPEECH RECOGNITION COMMON COMMANDS

EECS2301. Lab 1 Winter 2016

Introduction to Linux

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Introduction to Linux/Unix. Xiaoge Wang, ICER Jan. 14, 2016

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

Introduction of Linux

The Directory Structure

Introduction to the Linux Command Line

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Lab 1 Introduction to UNIX and C

Appendix C. Numeric and Character Entity Reference

5/8/2012. Creating and Changing Directories Chapter 7

Intro to Linux & Command Line

NGS Course Nove Hrady Documentation

UNIX and Linux Essentials Student Guide

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

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Transcription:

Unix - Basics Course on Unix and Genomic Data Prague, January 2017 Libor Mořkovský, Václav Janoušek, Anastassiya Zidkova, Anna Přistoupilová, Filip Sedlák http://ngs-course.readthedocs.org/en/praha-january-2017/

user@localhost:~$ This is where all begins...

Command line To type commands (syntax): name ( flag(=flag-parameter)) (input) (output) head n 20 file.txt > file-out.txt ** man command google it

Take a break and check your keyboard [] - squared brackets {} - curly brackets <> - angle brackets (smaller-than, bigger-than sign) () - parentheses ~ - tilde / - slash \ - back slash - pipe ^ - caret $ - dollar sign : - colon ; - semicolon. - dot, - comma # - hash _ - underscore - - dash * - asterisk! - exclamation mark? - question mark & - ampersand @ - at sign '' - quotation mark single "" - quotation mark double

Basic Structure / bin home data-shared lib user fastq bed_examples docs projects papers sw...

Moving Around / bin home data-shared lib user fastq bed_examples docs projects papers sw pwd ls ls ~ ls / ls.. ls../.. cd cd ~ cd / cd.....

Absolute vs. Relative Path / bin home datashared lib user fastq bed_examp les Exercise: Use absolute and relative path in to move from 'docs' (blue) to 'fastq' (red) docs project s papers sw...

Absolute vs. Relative Path / bin home datashared lib user fastq bed_examp les Exercise: Use absolute and relative path in to move from 'docs' (blue) to 'fastq' (red) docs project s papers sw... cd /data/fastq cd../../../data/fastq

Absolute vs. Relative Path / bin home data-shared lib user fastq bed_examples Exercise: Use absolute and relative path in to move from 'docs' (blue) to 'projects' (red) docs projects papers sw...

Absolute vs. Relative Path / bin home data-shared lib user fastq bed_examples Exercise: Use absolute and relative path in to move from 'docs' (blue) to 'projects' (red) docs projects papers sw... cd /home/user/projects cd../projects

Moving/coping files/directories Try these tools to: make new files/(sub)directories move/rename them remove them touch # make empty file(s) mv # move/rename files cp ( r) # copy files (-r directories) mkdir ( p) # make directory (-p subdirectory) rm ( r) # remove file (-r non-empty directory)

Moving/coping files/directories Prepare FASTQ data file: cd ## Go to home directory mkdir projects/fastq ## Make a new dir ## Copy a fastq file to the new dir: cp /data/fastq/fastq.tar.gz projects/fastq/. cd projects/fastq tar zxvf fastq.tar.gz ls

Viewing compressed data/ Uncompressing data tar xzvf fastq.tar.gz ## tarball archive + gzip (multiple files into one archive) gunzip file.gz ## only gzipped (only one file) zcat fastq.tar.gz less ## view content of a compressed file

Viewing plain text file content less SN tail n 8 head n 8 cat nano ** TAB comple3on

Pipes ' ' Chaining standard input and output: stdin head stdout stdin tail stdout head -8 file.fastq tail -4 less < file.fastq head 8 tail 4 less

Pipes ' ' - Exercise How many reads are there? What does exactly 'wc' command do? cd ~/projects/fastq cat HRTMUOC01.RL12.00.fastq wc l expr XXXX / 4 ## Or echo $((XXXX/4))

Globbing/Wildcards (*,?, [class]) What if I need to choose multiple files? cat file.*.fastq wc l cat file.0?.fastq wc l cat file.0[1-9].fastq wc -l

Variables/Lists Variable: storage location paired with an associated symbolic name CPU=4 echo $CPU FILE=~/projects/fastq/HRTMUOC01.RL12.00.fastq echo $FILE

Variables/Lists echo file{1..9}.txt LST=$( echo file{1..9}.txt ) echo $LST LST2=$( ls ~/projects/fastq/*.fastq ) echo $LST2

Loops Repeat a command (set of commands) multiple times: LST=$( echo file{1..9}.txt ) for I in $LST do echo $I; done

Loops Repeat a command (set of commands) multiple times: FILES=$(ls ~/my_data/fastq/*.fastq) for I in $FILES do echo $I; head n 1 $I wc c; done

Multiple Windows in Unix Yes, you can have them... + protection from unexpected network fails screen screen ls screen r XXXX.NNNNNN.XXXX screen X S XXXX.NNNNNN.XXXX quit ctrl+a c ctrl+a space ctrl+a d

Installing Software in Unix The easiest way is to use package manager (apt-get) Otherwise one needs to download the source code and compile it on its own (canonical way in Unix): wget O -..url.. tar xvz cd..unpacked directory.../configure # configuration of MAKE file based on the OS make # actual compilation of source code sudo make install # installation of binaries

htop Package manager sudo apt-get install htop

bedtools2 wget wget https://github.com/arq5x/bedtools2/ releases/download/v2.25.0/bedtools-2.25.0.tar.gz tar -zxvf bedtools-2.25.0.tar.gz cd bedtools2 make ** if you need the most recent (development) version use 'git clone'

That's all for today...