Blog Archives

R: how not to use savehistory() and source()

December 2, 2013
By
R: how not to use savehistory() and source()

Admitting to stupidity is part of the learning process. So in the interests of public education, here’s something stupid that I did today. You’re working in the R console. Happy with your exploratory code, you decide to save it to a file. Then, you type something else, for example: And then, decide that you should

Read more »

Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

October 29, 2013
By
Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

You can guarantee that when scientists publish a study titled: Determining the Presence of Periodontopathic Virulence Factors in Short-Term Postmortem Alzheimer’s Disease Brain Tissue a newspaper will publish a story titled: Poor dental health and gum disease may cause Alzheimer’s Without access to the paper, it’s difficult to assess the evidence. I suggest you read

Read more »

Microarrays, scan dates and Bioconductor: it shouldn’t be this difficult

August 21, 2013
By
Microarrays, scan dates and Bioconductor: it shouldn’t be this difficult

When dealing with data from high-throughput experimental platforms such as microarrays, it’s important to account for potential batch effects. A simple example: if you process all your normal tissue samples this week and your cancerous tissue samples next week, you’re in big trouble. Differences between cancer and normal are now confounded with processing time and

Read more »

Interestingly: the sentence adverbs of PubMed Central

July 15, 2013
By
Interestingly: the sentence adverbs of PubMed Central

Scientific writing – by which I mean journal articles – is a strange business, full of arcane rules and conventions with origins that no-one remembers but to which everyone adheres. I’ve always been amused by one particular convention: the sentence adverb. Used with a comma to make a point at the start of a sentence,

Read more »

-omics in 2013

June 24, 2013
By
-omics in 2013

Just how many (bad) -omics are there anyway? Let’s find out. 1. Get the raw data It would be nice if we could search PubMed for titles containing all -omics: However, we cannot since leading wildcards don’t work in PubMed search. So let’s just grab all articles from 2013: and save them in a format

Read more »

Using the Ensembl Variant Effect Predictor with your 23andme data

June 3, 2013
By
Using the Ensembl Variant Effect Predictor with your 23andme data

I subscribe to the Ensembl blog and found, in my feed reader this morning, a post which linked to the Variant Effect Predictor (VEP). The original blog post, strangely, has disappeared. Not to worry: so, the VEP takes genotyping data in one of several formats, compares it with the Ensembl variation + core databases and

Read more »

A brief note: R 3.0.0 and bioinformatics

April 3, 2013
By
A brief note: R 3.0.0 and bioinformatics

Today marks the release of R 3.0.0. There will be plenty of commentary and useful information at sites such as R-bloggers (for example, Tal’s post). Version 3.0.0 is great news for bioinformaticians, due to the introduction of long vectors. What does that mean? Well, several months ago, I was using the simpleaffy package from Bioconductor

Read more »

R/ggplot2 tip: aes_string

February 25, 2013
By
R/ggplot2 tip: aes_string

I’m a big fan of ggplot2. Recently, I ran into a situation which called for a useful feature that I had not used previously: aes_string. Imagine that you have data consisting of observations for several variables – let’s say A, B, C – where each observation is from one of two groups – call them

Read more »

Basic R: rows that contain the maximum value of a variable

February 12, 2013
By
Basic R: rows that contain the maximum value of a variable

File under “I keep forgetting how to do this basic, frequently-required task, so I’m writing it down here.” Let’s create a data frame which contains five variables, vars, named A – E, each of which appears twice, along with some measurements: Now, let’s say we want only the rows that contain the maximum values of

Read more »

Addendum to yesterday’s post on custom CSS and R Markdown

August 27, 2012
By
Addendum to yesterday’s post on custom CSS and R Markdown

Updates from RStudio support: (1) “Thanks for reporting and I was able to reproduce this as well. I’ve filed a bug and we’ll take a look.” (2) Taking a further look, this is actually a bug in the Markdown package and we’ve asked the maintainer (Jeffrey Horner) to look into it. As juejung points out

Read more »