Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Tuesday, 27 May 2014

PH525x Data Analysis for Genomics

Source: http://media-cache-ec0.pinimg.com/736x/ac/5d/b1/ac5db17580e6bd3ad70f2584b0cb3cc8.jpg
I need a change of learning pace. I've realised it for a while now, but yes, I procrastinated like crazy and persisted in stubbornness. Ahh... well, yeah. I've heard about edX a while ago, but thanks to the procrastinator who lives in me, I've delayed utilising this very good website properly. It is high time to enter into a learning frenzy before I fly off to Krakow next Thursday.

I've signed up for two courses, one is "Data Analysis for Genomics". This program is conducted by Professor Rafael A Irizarry and Dr. Michael Love from Harvard University, which is the founder of edX. Actually the course started on 7th April but I signed up to audit for this course a few minutes ago. Fingers crossed it will help me in my PhD. I'm a bit desperate, but I guess being desperate right now can be a good thing rather than being desperate at the end of my first year not knowing if I'll successfully proceed to my 2nd year or not.

You could find out more about this leader of an online learning movement, MOOCs (Massive Open Online Courses), on their website (click on the edX image below). As mentioned, the founders of edX are Harvard University and the MIT (Massachusetts Institute of Technology). edX offers online college courses to everyone and anyone in the world. I guess the only reason one will not learn is when one decides not to learn.

So wish me luck and pray for me!

Cheers!




Tuesday, 13 May 2014

PLINK by Purcell

Source: http://pngu.mgh.harvard.edu/~purcell/plink/gplink.shtml 

Today's task is simple - to start learning PLINK. The version which I am learning is the command-prompt version of PLINK on UNIX server, which the diagram shows the gPLINK, which is the Java-based software package which can run most of the common PLINK operations. I supposed gPLINK is more user-friendly towards Windows users (like me) who are used to perpetual mouse-clicking rather than using the keyboard. However, it will be more logical for me to utilise our group server, so I'm trying to pick up the UNIX version of it. Right now, I'm learning it using the tutorial provided on the PLINK webpage.

Source: http://pngu.mgh.harvard.edu/~purcell/plink/img/gp_overview2.png
Some brief introduction of PLINK. It was developed by Shaun Purcell, and it's a free open source whole genome association analysis toolset. PLINK itself is used solely to analyse genotype/phenotype data. With the development of gPLINK and Haploview, subsequent visualisation, annotation and storage of results could be performed. By which is a GREAT news for newbies like me!

Let's recount what I find fascinating, which would amuse any normal computer scientist immensely, is that I could call out the command rm to delete the files which I no longer needed on the UNIX server. The ability to finally understand the difference between PED and BED files mentioned on ADMIXTURE. Oh wow! That is a relief! BED is the binary PLINK file which saves space and speeds up subsequent analyses. Tested it using the example dataset "hapmap1":

  1. plink --file hapmap1 --xxxx --xxxx xxxx --out xxxx 
  2. plink --bfile hapmap1 --xxxx --xxxx xxxx --out xxxx

The first one used a normal PLINK file (PED), while the latter used a binary PLINK file (BED). Guess what? The first command took about 5 secs while the second took a sec. It did speed up the analysis! Ok, it is well-known, but it fascinated me.

The first figure is an overview of a structure of the start and end of PLINK really. How PLINK command(s) would eventually generate information which could help others to understand what the scientist has been testing on (or trying to find out). It is important that there is a visualisation of the information, rather than just boring numbers (sorry fellow Mathematicians, I know numbers amuse you, but for general audience, colourful charts still stand out).

Best thing of all, an answer to my previous error, where I need to "apply genotype filter to dataset", appeared after going through the first part of the tutorial. YAY!

Friday, 9 May 2014

Sketches

Source: http://fc04.deviantart.net/fs71/i/2012/312/6/c/how_to_paint_digitally_over_a_pencil_sketch__gimp__by_crystal_89-d5kbt1t.jpg

Every artist knows that the first step to amazing paintings is sketching the art framework. The counterpart of artists would usually be the scientists (very loosely I defined it here). I'm guilty as charged when it comes to strictly sketching my experiments, since we somewhat know what is the concepts. I'm not saying that all scientists are like me, I know of many colleagues who have meticulous planning methods.

Upon attending programming classes for absolute beginners, I realised one repetitive warning from all lecturers - PLAN the logic of programming even before starting. For the past two days, I worked on the basis that I need to know this and that, without realising how dodgy it has become. This morning, I woke up thinking about it after some hiccups last night trying to figure out the meaning of the error I got trying to run ADMIXTURE. Apparently, I need to apply filters to the dataset. Yes, I have NO idea how to apply filters. Froze me on track.

Then, I began to liken myself as an artist, of a different field. Not the colourful flowers blooming in the middle of spring, but a starter of another type of bloom - the programming one. Running back to the previous checkpoint, I'm giving myself some time this morning to sketch the structure of the whole process before I get into the minute details of each step. Yes, ADMIXTURE is just part of the whole process and I was obsessed with it the whole of yesterday.

Source: http://isaiahbowling.com/wp/wp-content/uploads/2011/02/Example_looping_program-full.jpg

This is an example of planning a looping program. Not sure what language they are using. So any computer scientist who might know, please drop a comment! Thanks!