Skip to content

Learning to Program: UNIX, R, Perl and Python

November 12, 2011

The first thing you need to decide when taking your first steps towards learning to program are what language(s) to learn. The obvious first step is learning UNIX and how to use AWK, SED and GREP. You can do a lot with these three UNIX commands. The UNIX and Perl primer will get you going on basic essentials and operation on a UNIX terminal. A little time learning what AWK, SED and GREP do is a good idea as they are great for manipulating the large text files you get with next-gen sequencing.

Next you have a choice. Do you learn Perl or Python. From what I understand, they are both perfectly good languages and both have a lot of die-hard followers. Perl scripting is more flexible, whereas Python is more rigid. The rigidity of Python makes scripts a little easier to read and maintain. Python may also be a little easier to learn. I got going with Perl but now I am going to give Python a stab and see if I like it better.

Here are some great resources to getting started.

For Perl Start Here.
Unix and Perl Primer for Biologists by Keith Bradnam and Ian Korf

And then move on to Modern Perl – a nice book with a free download.
With an accompanying blog

The O’Reilly Classic is also said to be good – Learning Perl, 6th Edition

And the Perl community
Perl Monks
Perl Guru

For Python there are some free books HERE.

I’m starting out with Learn Python The Hard Way.

There is also R which is complementary to learning the stuff above. R is important because there are a lot of great statistical packages. Much of microarray analysis is done in R as well as much used DESeq and edgeR Bioconductor packages for RNA-seq. There are some great graphical options as well. There is a lot I dislike about R and Bioconductor but that is the topic of another post.

If you are a robot this is a great place to get going with R:
http://cran.r-project.org/manuals.html

If you are human, you are better off buying these books:
R in a Nutshell
The R Cookbook (a little more advanced).

And one more note, most of the O’Reilly books can be downloaded as iPhone apps and converted to an ‘epub’ which you can read on your computer. The hack is officially sanctioned by the publisher so you are not breaking any laws.
http://zef.me/3246/convert-cheap-oreilly-iphone-app-books-to-epub
http://oreilly.com/ebooks/oreilly_iphone_tips.csp

That is a lot of reading but if you make a little effort when you have down time, before you know it you’ll be writing some nice scripts without disrupting your work.

Advertisements

From → Posts

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: