+ Introduction to Unix Joey Azofeifa Dowell Lab Short Read Class Day 2 (Slides inspired by David Knox)

Slides:



Advertisements
Similar presentations
Introduction to Linux command line for bioinformatics Wenjun Kang, MS Jorge Andrade, PhD 6/28/2013 Bioinformatics Core, Center.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
UNIX Command-line Introduction Terence Parr. Navigating  cd  pwd  ls  pushd/pod  cd  pwd  ls  pushd/pod.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Learning basic Unix command IT 325 operating system.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
CHAPTER 1 UNIX FOR NONPROGRAMMERS By U ğ ur Halıcı.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Basic unix commands that everyone should know (Even if you have a mac) Slightly more advanced:
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
Introduction to Programming Using C An Introduction to Operating Systems.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Unix Environment Basics CSCI-1302 Lakshmish Ramaswamy.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Learning basic Unix command It 325 operating system.
Operating Systems and Using Linux Courtesy of John Y. Park 1.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Learning Unix/Linux Based on slides from: Eric Bishop.
Using UNIX Charles Duan FAS Computer Services June 12, 2016.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
Stubbs Lab Bioinformatics - 2 Retrieving sequence data files and Linux commands Nov 17, 2016 Joe Troy.
Chapter 11 Command-Line Master Class
Prepared by: Eng. Maryam Adel Abdel-Hady
Linux 101 Training Module Linux Basics.
Andy Wang Object Oriented Programming in C++ COP 3330
Part 1: Basic Commands/Utilities
Some Linux Commands.
INTRODUCTION TO UNIX: The Shell Command Interface
Tutorial of Unix Command & shell scriptS 5027
Basic UNIX OLC Training.
Tutorial of Unix Commands
Tutorial of Unix Command & shell scriptS 5027
Introduction to Linux Week 0 - Thursday.
CS 60 Discussion Review.
Tutorial of Unix Command & shell scriptS 5027
The Unix File System.
Lab 00 Discussion Linux Basics
Introduction Paul Flynn
Andy Wang Object Oriented Programming in C++ COP 3330
Tutorial Unix Command & Makefile CIS 5027
Lab 2: Terminal Basics.
Short Read Sequencing Analysis Workshop
Presentation transcript:

+ Introduction to Unix Joey Azofeifa Dowell Lab Short Read Class Day 2 (Slides inspired by David Knox)

+ Overview of Computer Architecture Central Processing Unit “CPU” Random Access Memory “RAM” Disk Storage Input / Output Devices (I/O) …how we do we manage these resources

+ The Operating System (OS) is responsible for managing the resources Central Processing Unit “CPU” Random Access Memory “RAM” Disk Storage Input / Output Devices (I/O)

+ How do we interact with the OS? Central Processing Unit “CPU” Random Access Memory “RAM” Disk Storage Input / Output Devices (I/O) Today: through the shell/command line

+ Directory trees encode file system = /joeyazo/Desktop/Lab/Talks/2015/ShortReadDay_2

+ Why are they called directory trees? … … … … … … …

+ Logging into Vieques Open your terminal (MAC) or PuTTy (PC) Login onto the server: ssh Do you see this?

+ Moving through your directories/folders (pwd, ls, cd) $pwd “this provides the current directory tree”, what do you see? $ ls “stands for list”, lists the contents of the working directory (or the director/folder you are currently in) $ cd /projects/sreadgrp/homeworkfiles “stands for change directory and provide the file desination you want to go to” $pwd (what do you see now?) $ls (what do you see?) …now move back into your home directory (shortcut: $ cd ~) “$___” means You run this command

+ Copying files from place to another (cp) $ Make a folder (make sure you are in your home directory, ($cd ~) or ($cd /Users/yourUserName/ ) )! $mkdir Day2 $cd Day2 $pwd Copy a file into your new folder! cp (what you want to copy) (where you want it to go) $cd /projects/sreadgrp/homeworkfiles/genomes/S288c/ $cp saccharomyces_cerevisiae.gff /Users/yourUserName/Day2/ $ls –l /Users/yourUserName/Day2/ (what do you see now?) Tab complete is your best friend! “$___” means You run this command

+ Using Wild Cards (*) $ ls *.txt means list all files that end with.txt (this is called a “regular expression”); ls *.fasta means list all the files that end with.fasta. You can use this * prefix with most unix commands Make a new folder in Day2/ called fastaFiles/ $mkdir FastaFiles (make sure you are in /Users/yourUserName/Day2/; “cd” in if you need to and check through “pwd”) $cd /projects/sreadgrp/homeworkfiles/genomes/S288c/ $ls *.fasta what do you see now? $cp *.fasta /Users/ /Day2/FastaFiles $ls /Users/ /Day2/FastaFiles what do you see now? Make a new folder gffFiles in /Users/yourUserName/Day2/ $cd /Users/yourUserName/Day2/ $mkdir gffFiles $mv *.gff gffFiles/ (mv stands for moves; remember you need to be /projects/sreadgrp/homeworkfiles/genomes/S288c/ or give full path for mv wild card command! ) $ls –l gffFiles/ (what do you see now?) “$___” means You run this command

+ Looking at the contents of your files (wc, head, tail, cat) $cd /Users/yourUserName/Day2/FastaFiles $head orf_coding_all.fasta (what do you see) By default head shows the first 10 lines, we can make it arbitrary $head -100 orf_coding_all.fasta (shows the first 100 lines) (now show the first 200 lines) $tail orf_coding_all.fasta (shows the last 10 lines by default) (similar to the “head” command, show the last 100 lines) $wc orf_coding_all.fasta (what do you see?, wc stands for word count) $wc –l orf_coding_all.fasta (what do you see ?) $wc –help (this gives you all the command options you can use with wc) Now find the byte count, how many megabytes is that? Remember for one megabyte there 1,000,000 bytes. $cat orf_coding_all.fasta (prints the ENTIRE contents of the file…I wouldn’t run this out right? WHY?) “$___” means You run this command

+ Removing Files (rm) beware… Change directories into Day2/FastaFiles/ $cd /Users/yourUserName/Day2/FastaFiles Remove the file orf_coding_all.fasta; remove template $rm $rm orf_coding_all.fasta $ls (what do you see now?) Recopy orf_coding_all.fasta from /projects/sreadgrp/homeworkfiles/genomes/S288c/ $cp /projects/sreadgrp/homeworkfiles/genomes/S288c/orf_codi ng_all.fasta /Users/yourUserName/Day2/FastaFiles “$___” means You run this command

+ Redirecting output (| and >) Find all the lines that contain “>”; use the “grep” command stands for get regular expression $grep “>” orf_coding_all.fasta (what happened?) Lets count the number of lines that contain “>” $grep “>” orf_coding_all.fasta | wc –l Now lets send (redirect) all the lines containing “>” to a new file; here we sending the output from one command to a file! $grep “>” orf_coding_all.fasta > header_lines $head header_lines (what do you see now?) “$___” means You run this command

+ Searching through files (grep) $cd /Users/yourUserName/Day2/gffFiles/ $grep ’FLO11' saccharomyces_cerevisiae.gff now count the number lines that just contain “FLO”; how many do you see? “$___” means You run this command

+ Searching through your directory trees (find) command skeleton: find -name Find all gff files from /projects/sreadgrp/ $find /projects/sreadgrp/ -name "*.gff*” This is a little advanced; take all the output from find and run a command over them! Skeleton find - name -exec {} \; Take the output from find, grabbing.gff files and count number FLO11 ocurrences $find /projects/sreadgrp/ -name "*.gff*" -exec cat {} \; | grep ".*FLO11.*" | wc -l “$___” means You run this command

+ The Last Bit: File Permissions (chmod) Template: $chmod Change into Day2/FastaFiles/ $cd /Users/YourUserName/Day2/FastaFiles Change the file permissions so that YOU can read, people in your group can read and execute and others can just read $chmod u=rwx,g=rx,o=r orf_coding_all.fasta the u ser can r ead, w rite, and e x ecute it; members of your g roup can r ead and e x ecute it; and o thers may only r ead it. Change the filer permissions so that EVERYBODY can read,write and execute orf_coding_all.fasta “$___” means You run this command

+ All DONE!