Blog Archives

More Haskell: a bootstrap

February 16, 2013
By
More Haskell: a bootstrap

So my playing around with Haskell goes on. You can follow the progress of the little bootstrap exercise on github. Now it’s gotten to the point where it actually does a bootstrap interval for the mean of a sample. Consider the following R script: 10.31 2.5% 97.5% 9.72475 10.85200 So, that was a simple

Read more »

Using R: accessing PANTHER classifications

February 10, 2013
By
Using R: accessing PANTHER classifications

Importing, subsetting, merging and exporting various text files with annotation (in the wide sense, i.e. anything that might help when interpreting your experiment) is not computation and it’s not biology either, but it’s housekeeping that needs to be done. Everyone has a weapon of choice for general-purpose scripting and mine is R. Yes, this is

Read more »

A slightly different introduction to R, part III

February 2, 2013
By
A slightly different introduction to R, part III

I think you’ve noticed by now that a normal interactive R session is quite messy. If you don’t believe me, try playing around for a while and then give the history() command, which will show you the commands you’ve typed. If you’re anything like me, a lot of them are malformed attempts that generated some

Read more »

Using R: writing a table with odd lines (again)

January 31, 2013
By
Using R: writing a table with odd lines (again)

Let’s look at my gff track headers again. Why not do it with plyr instead? d_ply splits the data frame by the feature column and applies a nameless function that writes subsets to the file (and returns nothing, hence the ”_” in the name). This isn’t shorter or necessarily better, but it appeals to me.

Read more »

Using R: writing a table with odd lines (GFF track headers)

January 28, 2013
By
Using R: writing a table with odd lines (GFF track headers)

The other day, I wanted to add track lines to a GFF file, so that I could view different features as separate custom tracks in a genome browser. The need to shuffle genome coordinates between different file formats seems to occur all the time when you deal with some kind of bioinformatic data. It’s usually

Read more »

A slightly different introduction to R, part II

January 27, 2013
By
A slightly different introduction to R, part II

In part I, we looked at importing data into R and simple ways to manipulate data frames. Once we’ve gotten our data safely into R, the first thing we want to do is probably to make some plots. Below, we’ll make some simple plots of the made-up comb gnome data. If you want to play

Read more »

A slightly different introduction to R, part I

January 19, 2013
By
A slightly different introduction to R, part I

Note in Swedish: Jag hoppas läsaren ursäktar att jag skriver på engelska då och då. This will be a brief introduction to using the statistics software R for biologists who want to do some of their data analysis in R. There are plenty of introductions to R (see here and here, for example; these are

Read more »