NGS/bioinformatics dictionary

There is a growing need for biomedical researchers to obtain skills in Big Data Science. In order to educate any level of biomedical researchers (*any* = professors, post-docs, students, technologists, community scientists) and increase proficiencies in handling and interpreting Big Data Genomics, I am developing (1) NGS/bioinformatics dictionary (a web-based massive collection of unix/R commands you can use by copying/pasting). (2) Tutorial courses are also provided to any interested audiences to facilitate the use of these commands and promote proficiencies in Big Data Genomics. Here I provide (1) that runs under (2) environment under Penn State College of Medicine’s “comtrain” server, so please be aware some dependencies are difference if you are working in different computational environments.

What’s new

  • first version released based on (2) “NAT (NGS Analysis Training)” 2 (episode 2) class materials (2018.3.1)


Color codes for commands used in this web site:

Yuka’s comment
Commands that are not necessary to run
Commands/items that need to be modified on your own

1. Introduction: useful unix commands

#show current directory

#Lists files  in current directory4

#Lists files in sorted long format with file size
ls -lht

#Lists directories in long format
ls -ld

#Change directory to tempdir
cd tempdir

#Move back one directory
cd ..

#Make a directory called graphics
mkdir graphics

#Remove directory 
rmdir graphics

#Copy file (file1.fastq) into subdirectory
cp file1.fastq subdirectory

#Copy file from subdirectory to current directory
cp subdirectory/file1.fastq . #Don't forget the period "."

#Make backup of file1
cp file1.fastq file1.bak.fastq

#Remove or delete file
rm file1.fastq

#Remove all file
rm *.fastq

#Rename files
mv old.fastq new.fastq

#Move files to subdirectory
mv new.fastq subdirectory

#Look at file, one page at a time
cat test.txt

#Displaying first few lines from a file
head KHTC1.fastq

#Displaying last few lines from a file
tail KHTC1.fastq

#Look at file, one page at a time
more KHTC1.fastq

#kill a process
<CTRL+c> #while holding control key press 'c'

#Finding the number of lines in a file
wc -l KHTC1.fastq

#Find which files contain a certain word
grep "bad word" *

#Change file permissions read only
chmod 640 *.html

#Change file permissions to executable
chmod 750 file.exe

#Compress file
gzip bigfile

#Uncompress file
gunzip bigfile.gz

#Create an archive called subdir.tar of a directory
tar -cf subdir.tar subdir

#Extract files from an archive file 
tar -xvf subdir.tar

#Compress 'subdir' directory and name as 'subdir.tar.gz'
tar -zcvf subdir.tar.gz subdir

#Uncompress and extract 'subdir.tar.gz'
tar -zxvf subdir.tar.gz

#Lists commands you've done recently

#See how much free disk space

#Print system usage and top resource logs

#How to quit a UNIX shell.

#Tab completion

#Iterate through previous commands

#Make a screen called qc
screen -S qc

#Detach screen
<CTRL+a> #while holding control key press 'a' then
<CTRL+d> #while holding control key press 'd' then

#Lists available screen
screen -ls

#Reattach "qc" screen
screen -r qc

#Kill current screen
<CTRL+a> #while holding control key press 'a' 
#and then
#and then

#Kill "qc" screen
screen -X -S qc kill

#down- up- loading files between server and local directories ([accessID] is your PSU ID)

#Mac Terminal: Saving folders and items from to your local computer using "scp".
scp [accessID][accessID]/[Folder]/[file_name.type] /Local/dir/

#Example: Moving a directory (use “-r”) named as NAT2 to your current location (“.”) at end of line.
scp -r [accessID][accessID]/NAT2/ . #Don't forget the period "."

#Example: Moving only fastq files from your NAT2 to current local directory
scp [accessID][accessID]/NAT2/*.fastq . #Don't forget the period "."

#Example: Moving your NAT2 directory to local desktop NAT folder
scp -r [accessID][accessID]/NAT2/ /User/EGL/Desktop/NAT

#Example: Moving only KHTC1.fastq file from your NAT2 to current local
scp [accessID][accessID]/NAT2/KHTC1.fastq . #Don't forget the period "."

#Example: Moving only KHTC1.fastq file from your NAT2 to desktop NAT folder
scp [accessID][accessID]/NAT2/KHTC1.fastq /User/EGL/Desktop/NAT

#You can do other way around (upload folders and items from your local computer to "sftp" command is also useful for this purpose... I will add more examples for "sftp".