linux shell & shell scripting - i - ashok r....

44
IBS 574 - Computational Biology & Bioinformatics” Spring 2018, Tuesday (01/30), 2.00-4.00PM Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D Scientist, Bioinformatics Dept. of Human Genetics, Emory University, Atlanta 1 1/30/2018, 2-4PM

Upload: others

Post on 11-Jun-2020

35 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

“IBS574-ComputationalBiology&Bioinformatics”

Spring2018,Tuesday(01/30),2.00-4.00PM

Linuxshell&shellscripting-I

AshokR.DinasarapuPh.DScientist,Bioinformatics

Dept.ofHumanGenetics,EmoryUniversity,Atlanta

11/30/2018,2-4PM

Page 2: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  KernelisthecorethatprovidesbasicservicesforallotherpartsoftheOS.

•  ShellistheoutermostpartofanOSthatinteractswithusercommands•  commandlineinterpreter•  sh:bash(bourneagainshell),csh,ksh,dash

•  TerminalemulatorgivesusaccesstotheShell•  xterm,rxvt,genome-terminal•  console=physicalterminal

2

Kernel,Shell&TerminalfrequentlyusedtermsinUNIX-likeoperatingsystems(OS)

1/30/2018,2-4PM

Page 3: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

3

Kernel,Shell&TerminalfrequentlyusedtermsinUNIX-likeoperatingsystems(OS)

terminal

1/30/2018,2-4PM

Page 4: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Shellpromptwillusuallyinclude

[root@machinename~]# /root

[user_name@machinename~]$/home/user_name

Console/Terminal

4

Linuxfilesystemhierarchy1/30/2018,2-4PM

Page 5: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

5

Easiestwaytodothisis…

Starttyping!

1/30/2018,2-4PM

Page 6: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  SSHallowsyoutoconnecttoyourserversecurelyandperformLinuxcommand-lineoperations.

[email protected]

Alternatively,https://blnx1.emory.edu:22443/

user_name@blnx1:~$

•  ~meansyourhomedirectory(/home/user_name) •  SSHfromWindows:downloadPuTTY

6

ConnectingServerviaSSH

1/30/2018,2-4PM

Page 7: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  WhatisthedefaultShellforblnx1?Usage:ls–la/bin/*sh /bin/sh->dash

•  Whatisthedefaultterminalemulator?Usage:ls-la/usr/bin/*terminal*

/usr/bin/gnome-terminal

•  Whatisphysicalterminal?

7

Console/Terminal

1/30/2018,2-4PM

Page 8: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Somesimplecommands:•  env (currentenvironment)•  date (fordate)•  cal (forcalendar)•  dforfree (diskspaceormemory)•  exit (closeterminal/session)

Usage:env (thenpressenterkey)

8

Console/Terminal

1/30/2018,2-4PM

Page 9: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

NavigationofthefilesystemCommands:pwd,ls,cd

•  pwd (print/currentworkingdir)•  ls (listingdirectoriesandfiles)

ls-l (longlistingformat)ls-la (withhiddenfiles)

Usage:pwd /home/user_name

Usage:ls-l91/30/2018,2-4PM

Page 10: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  mkdir makeasub-directory

Usage:mkdirdocument

mkdir-pdocument/resumemkdir-pdocument/{resume,cv,address}

•  cdchangedirectory

Usage:cddocument/resume (enterdir)

cd../.. (returntopreviousdirectory) 10

NavigationofthefilesystemCommands:pwd,ls,cd,mkdir

1/30/2018,2-4PM

Page 11: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

cd~ (changetohomedir)cd (changetohomedir)

cd/ (changetorootdir)

cddocument (relativepath)cd~/document (absolutepath)cd/home/user_name/document

*with$HOMEenvironmentvariable11

NavigationofthefilesystemCommands:pwd,ls,cd

1/30/2018,2-4PM

Page 12: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Ifadirectorynamehaswhitespace–

mkdir‘MyData’

Usage:cdMy\Data cd"MyData” cd'MyData'

12

NavigationofthefilesystemCommands:pwd,ls,cd,mkdir

Anon-quotedbackslash,\,isusedasanescapecharacterinbash.

1/30/2018,2-4PM

Page 13: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Chooseatexteditor:emacs,Vim

Usage:vihome.txt

INSERTmode:presskeyslikeiORa&starttyping."i"willletyouinserttextjustbeforethecursor."I"insertstextatthebeginningofthecurrentline."a"willletyouinserttextjustafterthecursor,and"A"willletyoutypeattheendofthecurrentline.

Create/Edittextfiles

131/30/2018,2-4PM

Page 14: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Typethefollowingtext:

Create/Edittextfiles

Street:201DowmanDriveCity:AtlantaState:GeorgiaCountry:USAZip:30322

141/30/2018,2-4PM

Page 15: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

SAVEmode:pressesckeyAND:q!fornottosaveOR

:xtosaveandexit.

15

HowTo:SavefileinViTextEditor

1/30/2018,2-4PM

Alternatively,use:wqforwriteandquit(saveandexit)

Page 16: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Chooseatexteditor:emacs,Vim

Usage:vicollege.txt

Create/Edittextfiles

16

Street:954GatewoodRdCity:AtlantaState:GeorgiaCountry:USAZip:30329

1/30/2018,2-4PM

Page 17: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Listingfiles,directories&it’scontents

17

•  Listfilesrecursively Usage:ls-R

document/resumedocument/cvdocument/addresshome.txtcollege.txtMyData

1/30/2018,2-4PM

Page 18: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Listingfiles,directories&it’scontents

18

CopyMoveSymlink

•  Listfilesrecursively Usage:ls-R

document/resumedocument/cvdocument/addresshome.txtcollege.txtMyData

1/30/2018,2-4PM

Page 19: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Copyafile

Usage:cphome.txtdocument/address/

•  Copyallfiles

Usage:cp*.txtdocuments/address/

“cp”–keepstheoriginalfile&makesaduplicateofit

19

CAREFUL!Ifthedestinationfilealreadyexists,itwillbeoverwrittenwithoutaconfirmationprompt.Use“cp-i”interactiveoptionforaprompt.

1/30/2018,2-4PM

Page 20: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Moveafile

Usage:mvhome.txtdocument/cv/

•  Moveallfiles

Usage:mv*.txtdocument/cv/

Renamefiles&directoriesusing“mv”movecommand

20

CAREFUL!Ifthedestinationfilealreadyexists,itwillbeoverwrittenwithoutaconfirmationprompt.Use“mv-n”interactiveoptionforaprompt.

1/30/2018,2-4PM

Page 21: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  ln:createshardlink,defaultln~/document/cv/home.txt~/document/resume/

•  ln-s:symboliclinkln-s~/document/cv/college.txtdocument/resume/

Symboliclinkisaspecialkindoffilethatpointstoanotherfile

211/30/2018,2-4PM

Page 22: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  view/read Usage:cathome.txt

•  concatenate&viewUsage:cathome.txtcollege.txt

•  concatenate&redirectionUsage:cathome.txtcollege.txt>add.txt

Thecatcommandisusedfor:

22

WARNING:ifadd.txtalreadyexists,itwillbeover-written.Use>>toappendtheoutputtotheexistingfile.

1/30/2018,2-4PM

Page 23: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  less(readwithcursor)Usage:lessadd.txt

•  more(readpagebypage)Usage:moreadd.txt

“moreorless”:terminalpagercommandsinUnix-likesystems

23

Theprogramlessormoredoesnotrequirethewholefiletobeloadedinmemorytoviewpartsofit.

1/30/2018,2-4PM

Page 24: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Viewthefirst5lines Usage:head–n5add.txt

•  Viewthelast4linesUsage:tail–n4add.txt

head&tailletsyouseethefirst&lastfewlinesofatextfile

24

Bydefault,headortailreturnsthefirstorlast10lines,respectivelyofeachfilethatisprovidedtoit.

1/30/2018,2-4PM

Page 25: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  sendingdatafromoneprogramtoanother Usage:cathome.txt|less

•  Redirectingtoafile Usage:head-2home.txt>lines.txt

wc-l<home.txt>count.txt

“pipe&redirect”

251/30/2018,2-4PM

Page 26: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Whatdoes“>/dev/null2>&1”mean?

•  ArithmeticinPOSIXshellsisdonewith$anddoubleparentheses:

echo$((2+2)) STDIN (<0):keyboard STDOUT (>1):screen STDERR (>2):screen

echo$((2+2))>result.txt

(STDOUTredirectedintoafile,result.txt)

echo$((2+2))>/dev/null2>&1

(TolistenonlytoSTDERR(2>&1),STDOUTredirectedinto/dev/null&STDERRredirectedtoSTDOUT).

261/30/2018,2-4PM

Page 27: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Whatdoes“>/dev/null2>&1”mean?

•  ArithmeticinPOSIXshellsisdonewith$anddoubleparentheses:

echo$((2+2))>/dev/tty STDIN (<0):keyboard STDOUT (>1):screen STDERR (>2):screen

echo$((2+2))>result.txt

(STDOUTredirectedintoafile,result.txt)

echo$((2+2))>/dev/null2>&1

(TolistenonlytoSTDERR(2>&1),STDOUTredirectedinto/dev/null&STDERRredirectedtoSTDOUT).

27

/dev/ttyisaspecialfile,representingtheterminalforthecurrentprocessUse,ps–a(toseeprocessesattachedtottys)InLinux,theconsoleappearsasseveralterminals(ttys)

1/30/2018,2-4PM

Page 28: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

28

Createafile(test_error.sh)withthefollowingtwolinesofcode#!/bin/shecho$((2+'x'))Runas./test_error.sh./test_error.sh2>/dev/tty./test_error.sh2>error_file

1/30/2018,2-4PM

Page 29: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Searchafileforkeywords

Usage:grepStateadd.txt

•  ignorecaseoption Usage:grepstateadd.txt grep-istateadd.txt

SearchingaPATTERNwithgrep

29

"globalregularexpressionprint"

Regularexpressionsareusedtosearchandmanipulatethetext,basedonthepatterns[Beginningofline(^);Endoftheline($)]

1/30/2018,2-4PM

Page 30: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

1  India2  USA3  Ireland4  UK5  Canada

30

“jointwofiles”

Usage:joincountry.txtcity.txt>file.txt

Usage:vicountry.txt

Usage:vicity.txt

1  NewDelhi2  WashingtonDC3  Dublin4  London5  Toronto

•  Joinstherowsoftwofileswhichshareacommonfieldofdata.

1/30/2018,2-4PM

Page 31: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Threemaintypeofpermissions•  Read(r),write(w),andexecute(x)•  3typesofusers(user,group&other)

Usage:ls-l

Changethepermissionsoffiles

311/30/2018,2-4PM

Page 32: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Threemaintypeofpermissions•  Read(r),write(w),andexecute(x)•  3typesofusers(user,group&other)

Usage:chmodu=rwx,g=rx,o=rhome.txt

Changethepermissionsoffiles

321/30/2018,2-4PM

Page 33: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Threemaintypeofpermissions•  Read(r),write(w),andexecute(x)•  3typesofusers(user,group&other)

Usage:chmodu=rwx,g=rx,o=rhome.txt

Changethepermissionsoffiles

33

Usage:chmod754home.txt

4standsfor"read",2standsfor"write”,1standsfor"execute",&0standsfor"nopermission"

1/30/2018,2-4PM

Page 34: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

34

Createafile(test_error.sh)withthefollowingtwolinesofcode#!/bin/shecho$((2+'x'))Runas(chmod+xtest_error.sh)./test_error.sh./test_error.sh2>/dev/tty./test_error.sh2>error_file

1/30/2018,2-4PM

Page 35: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  rmremovesfilesblindly,withnoconceptof'trash’!!!

•  Removeafile Usage:rmdocument/cv/add.txt

•  RemovedirectoryrecursivelyalongwithallofitscontentsUsage:rm-rdocument

Deletefiles&directories

35

Write-protectedfilesprompttheuserforaconfirmation(withayandann)beforeremoval.Use-f(i.e.,force)toremoveallspecifiedfiles,whetherwrite-protectedornot.

1/30/2018,2-4PM

Page 36: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

HowtosetupcommandaliasesinLinux

•  Openyour.bashrcvi~/.bashrc

•  Addthealiasaliasu="cd..;ls”

•  PathadjustmentsexportPATH="$PATH:/<here_new_path>”

•  Reloadthe“.bashrc”file source~/.bashrc

361/30/2018,2-4PM

Page 37: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

Listofarchiveand/orcompressionformats

Fileextension Officialname Description.tar Tapearchive Archiving.bz2 bzip2 Compression.gz gzip Compression.tar.gz(.tgz) tarwithgzip both.tar.bz2 tarwithbzip2 both.zip ZIP both

DataarchivinginLinux

371/30/2018,2-4PM

Page 38: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

•  Tocompressasinglefile(.gz)

Usage:gziphome.txt

•  Archive&compress

Usage:tar-jcvfhome.tar.bz2home.txt

j:usebzip2compress(z:usegzipcompress)c:compressv:verbosef:file

Data/Filecompression

381/30/2018,2-4PM

Page 39: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

wgethttps://github.com/samtools/samtools/releases/download/1.3.1/samtools-1.3.1.tar.bz2

•  Viewthecontentsofatar.bz2file

Usage:tar-jtvfsamtools-1.3.1.tar.bz2

•  ExtractthecontentsUsage:tar-jxvfsamtools-1.3.1.tar.bz2

Data/Filedecompression

39

t:listthecontents;x:extractthecontentsofanarchive

Downloadfileusingwget

1/30/2018,2-4PM

Page 40: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

WhatisSAMTOOLS?

40

•  SAMTOOLSisasuiteofprogramstohandlehigh-throughputsequencingdata.

•  UsesSAM(SequenceAlignment/Map)/BAM(BinaryAlignment/Map)files.

•  VariantCallFormat(VCF),mostlikelystoredinacompressedmanner.samtoolsmpileup|\

bcftoolscall>name.vcf1/30/2018,2-4PM

Page 41: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

41

•  CompressingVCFfileswithBGZipandindexingitwithTabixisthestandardwayVCFfilesarestored.

•  bgzip–Blockcompression/decompressionutility.

•  tabix–GenericindexerforTAB-delimitedgenomepositionfiles.

•  DownloadBGZip’pedVCFfilefromhttp://vat.gersteinlab.org/datasets.php

VCFfilecompressionwithBGZip&indexingitwithTabix

1/30/2018,2-4PM

Page 42: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

VCFfilecompressionwithBGZip&indexingitwithTabix

42

•  View/Readcompressedfilegzip-cdCEU.low_coverage.2010_07.indel.genotypes.vcf.gz|head-20zcatCEU.low_coverage.2010_07.indel.genotypes.vcf.gz|head-20

•  Decompress,gzip(compress)&indexgunzipCEU.low_coverage.2010_07.indel.genotypes.vcf.gzgzipCEU.low_coverage.2010_07.indel.genotypes.vcftabixCEU.low_coverage.2010_07.indel.genotypes.vcf.gzNotaBGZFfile:CEU.low_coverage.2010_07.indel.genotypes.vcf.gztbx_index_buildfailed:CEU.low_coverage.2010_07.indel.genotypes.vcf.gz

•  Decompress,bgzip(compress)&indexgunzipCEU.low_coverage.2010_07.indel.genotypes.vcf.gzbgzipCEU.low_coverage.2010_07.indel.genotypes.vcftabixCEU.low_coverage.2010_07.indel.genotypes.vcf.gzCEU.low_coverage.2010_07.indel.genotypes.vcf.gz.tbi1/30/2018,2-4PM

Page 43: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

43

Rsync(RemoteSync)commandforcopyingandsynchronizingfiles&directoriesremotelyaswellaslocallyinLinux/Unixsystems

rsync–av~/script/[email protected]:~/[email protected]'spassword:buildingfilelist...doneCorrPlot.Rsent3310bytesreceived42bytes103.14bytes/sectotalsizeis3177speedupis0.95

1/30/2018,2-4PM

Page 44: Linux shell & shell scripting - I - Ashok R. Dinasarapuadinasarapu.github.io/files/2018_Linux_Shell_I.pdf · 2020-05-07 · Linux shell & shell scripting - I Ashok R. Dinasarapu Ph.D

44

Thank you

Practice Makes Perfect

1/30/2018,2-4PM