Unix

useful unix one liners for bioinformatics

I have been using ubuntu 12.04LTS for one year, and I really love it and do not look back at windows at all. Currently, I have dual booting system for linux…

choose random lines from a file

I have a bed file which contains promoter regions. I want to get 1000 random promoters from it. First I think I would write a python script using the random…

Three ways to change a space delimited file to a tab delimited file

Let’s create a space delimited file:

Amazing GNU sort

I just came across this on Biostar:

The Backtick in the linux command

I was doing my first RNA-seq mapping by Tophat, I downloaded the SRA file from GEO and dump them to fastq files (you need to install the sra-toolkit from…

RNA-seq step by step demonstration

Align RNA-seq with Tophat

install bioawk in unbuntu

Bioawk is written by Heng Li, and it can handle formats like:

book recommendation: Sed & Awk 101 Hacks

I highly recommend this book for text manipulation

use sed to print out every n lines, split pair-end FASTQ file

#print out the first two lines of every 4 lines. -n flag suppress all of the other lines and only print the line\ you specified. -e option tells sed to…

linux command join

Linux command join serves for this purpose.\ note that two files need to be sorted first.