Unix

benchmarking for shuf vs fast_sample

Sometimes we want to randomly select a proportion of lines from a txt file. The easiest way is to use the Unix command shuf. On a mac machine, you can…

csvkit to manipulate csv at command line, Rio to interact with R at command line

I came across csvkit long time ago, but I just began to use it and found it is very handy. It is a python utility to manipulate csv files at command line.…

speed up grep

I had a list of gene names in txt file. There are around 500 genes with one gene name in one line, and I want to filter the gtf file from ensemble…

everyone will write a blog post on dplyr

dply is a nice R package to manipulate big data. There are several good tutorials I came across:

make a soft link

I got to know the ln linux command when I was reading The linux command line. I did not realize why I need this command to make links to the same data or file.

rename a bunch of files with bash by regular expression

I am at the MSU NGS 2014 course. My colleague wanted to follow the khmer protocol with his own data, but one of the steps has to use a certain file name…

linux commands basics

I am attending the NGS course at MSU. This is a great course with great instructors and friendly colleagues.\ I highly recommend this course to everyone.

Unix sort except the first line

Many times I have a file with a header needs to be sorted, but I do not want to sort the header.\ I saw it on Twitter:

manipulate GTF file with AWK

AWK is awesome! or I should say linux is awesome!\ I had a post for linux one-liners here useful unix one liners for bioinformatics

explain shell

I just got to know this website from twitter explain shell\ It is very useful, especially when I have a complex linux command and can not figure out what\…