Brought on by this post, I thought I should explain about the dangers of Helsinki squirrels.
In most of Helsinki, one is safe from squirrels: you can happily walk through the station in the early hours, and you'll be fine. Places like Kallio and Hertaniemi: no problem. But be careful if you venture into Seurasaari. There you can walk through the forests along the paths. But if you take a wrong turn, you find them staring at you:
As you go further down the path, you will find yourself becoming more nervous - what is that scratching behind you? Does the path lead back to civilisation, or are you going deeper into the wilds? Is that duck in on the schemes?
Then you turn a corner and discover - some of them are armed
Fortunately, the importance of the tourist industry means that Helsinki City Council has the matter in hand. It is bad press to have your visitors mugged by a squirrel, and have their peanuts stolen. Therefore, they have organised special squads, who are trained to track down and kill down these monsters, even the biggest ones.
Read more!
Wednesday, 25 July 2007
Squirrels are dangerous
Posted by
Bob O'Hara
at
22:19
1 comments
Elephants, evolution, and hot testes
Sometimes the news on the BBC World Service brings up strange associations (and I don't mean the Conservative Party). Yesterday morning I heard a report about the latest findings on the evolution of elephants. The first thing that struck me was how good the report was: concise, informative, and went for accuracy rather than sensationalism. The other thing that struck me was that elephants don't have balls.
The BBC report was about a paper in PLOS biology, which reports firstly the first complete mitochondrial sequence of the extinct American mastodon. This sort of thing is now de rigour: extracting DNA from a tooth that is at least 50 000 years old, sequencing all the little bits, and then putting them back together to give an almost complete sequence. They then compare this sequence to sequences of other proboscideans, i.e. African and Asian elephants and a mammoth. From this they could work out the phylogenetic relationship between the species, and the dates when the different species diverged:
The shape of the tree is roughly what was expected. What was interesting what the timings of the divergences. A couple of technical points need to be raised to see why this is interesting. First, any phylogenetic tree gives the distance between different species, but it does not show where the tree started. This is because the processes of sequence evolution are indistinguishable whether we run them forwards or backwards in time. Hence, we can't find the start of the tree - the root. The usual solution to this is to include a species which is known to have been the first to diverge from the rest. This is called an outgroup: often is is selected on the basis of the fossil record.
Previous studies of elephants and their ilk have used the dugong or hyrax as an outgroup. This is a problem because these diverged from the proto-elephants at least 60 million years ago (Mya), but the elephants started diverging from each other less than 30 Mya. Hence, there is a lot of time in which the sequences could have diverged. This affects the dating of the divergences because (a) the molecular clock has had plenty of time to start running faster or slower, and (b) the differences between the sequences can start to saturate. The second point is important because the methods for estimating the times of divergence assume that the number of differences between sequences is proportional to time. When saturation occurs, this is no longer true. Hence, it would be better to use an outgroup that diverged more recently. The mastadon sequence provides this, as the fossil record can be used to date their divergence to about 25 Mya.
With this new outgroup, the divergences are pushed back in time, suggesting the mammoths and elephants diverges about 6 to 9 Mya. As the authors of the paper note, this is about the same time that humans, chimpanzees and gorillas diverged from each other. Now, this might be happenstance, but it could also be related to the changes in the environment at the time, as grassland spread throughout the world.
But, you are wondering, what about the balls? Well, the authors also found that the mutation rate is about half as fast in the elephants as in primates. The authors do not give a good explanation for this (they admit it themselves!). I don't have a good explanation either, but it did remind me of another paper, which was thrust into my hands whilst I was stood on the stairwell of the University of Helsinki museum. This paper pointed out that, according to the fossil record, elephants evolve really quickly, and hence could adapt to varying environments. They then pointed out that elephants don't have scrota: the testicles are kept near the kidneys, rather than migrating to somewhere cooler (this is called testicondy). It is well known that the mutation rate increases with temperature, and this has been used to explain why such a delicate piece of the anatomy hangs around outside the body. The suggestion, therefore, was that having the testicles inside the body increased the mutation rate, and hence induced more variation, so that there was more opportunity for selection to work: in other words, evolution could go faster.
How does this line up with the finding of a low mutation rate in the mitochondria? Well, one reason why mitochondria are studied is that they are only inherited from the mother. So, their evolution is obviously not affected by testicondy. Is it possible that the lower mutation rate in mitochondria offsets the higher rate in male nuclear DNA? It seems curious to me that there would be such a difference. But perhaps the elevated mutation rate in males is enough, so an increased mutation rate in females would increase the mutation rate above the optimum.
Hmmm.
References
Werdelin L., Nilsonne Å., Fortelius M. (1999) Testicondy and ecological opportunism predict the rapid evolution of elephants. Evolutionary Theory 12: 39-45.
Rohland N., Malaspinas A.S., Pollack J.L., Slatkin M., Matheus P., Hofreiter M. (2007) Proboscidean Mitogenomics: Chronology and Mode of Elephant Evolution Using Mastodon as Outgroup. PLoS Biol 5(8): e207 doi:10.1371/journal.pbio.0050207
Read more!
Posted by
Bob O'Hara
at
16:47
0
comments
Labels: elephants, evolution, testicondy
Tuesday, 24 July 2007
Book review: Bayesian Methods for Ecology
Review of Bayesian Methods for Ecology (NHBS) by Mick McCarthy
I've been meaning to write this for a couple of weeks, but I've either been too busy, or the moment I sit down to write it, a cat appears and sits on the keyboard. Well, I sorted the cat problem: he leapt up, I cut his nails.
So, the title of the book is fairly explanatory: it's about Bayesian methods for ecology. It's clearly aimed at ecologists who are not trained in statistics, but who need to use statistical methods. Mick spends a lot of the first half of the book giving the background to Bayesian methods, justifying their use, and criticising the use of hypothesis testing. He then moves on to describing standard models (regression and ANOVA) and how to fit them in a Bayesian way. The final part of the book consists of case studies using Bayesian methods, showing how they work in practice.
On the whole, I really like the book: it provides a simple, easy to follow, explanation of what Bayesian methods are, and how to use BUGS to fit simple models. the latter point is important, as it means that ecologists can see how to use the methods in practice, and the code and data are available on the web.
One thing I did like about the book is its emphasis on using information from outside the data to improve the estimation. This is an aspect if Bayesian methods that I use less than I should, but is perhaps particularly important in practical conservation problems, where there is a lot of background information, and the aim is not to demonstrate some theory (where informative priors can bias the demonstration). If this book encourages scientists to use Bayesian method for problems where several strands of information have to be synthesised, then it will have done a useful service.
I have a couple of criticisms. The first is that I feel the strength of the Bayesian approach is in the way it can handle complex models. This relies on a hierarchical scheme for modelling data. Although this is mentioned, I would have liked to have seem more on it: I think a whole chapter would have been worth aiming for (and possible combining the regression and ANOVA chapters: they're really the same thing). My second criticism is over the excessive use of DIC. This is a criterion for comparing how adequately different models fit to the data. This is really a philosophical complaint: the problem with using criteria like DIC is similar to one problem with hypothesis testing: it says something about the statistical properties of the models, but nothing about the substansive, ecological, properties. Given enough data, DIC will show that the more complex model is better. It will not show whether the extra effects are important in any real way. I would rather see a greater emphasis on examining the parameters, and using them to decide if the more complex model explains anything: does removing the parameters reduce the predictive ability substansively (rather than statistically)?
So, the book isn't perfect, but I would still recommend it to ecologists wanting to understand the basics of Bayesian methods: not only does it give a glimpse of what they can do, but it also allows them to do it. I hope it will help ecologists (and others!) get over the first few steps to doing Bayesian analyses, by giving a simple explanation, and code to run (and change!) on simple problems. After that, what follows is the same, but bigger. Once the first hurdle is passed, more advanced problems can be tackled with the help of Andrew Gelman's latest book, so it should not be too difficult to progress to the complex models of the sort I find myself working on.
Read more!
Posted by
Bob O'Hara
at
13:48
3
comments
Labels: Bayesian, ecology, statistics, technical
Saturday, 21 July 2007
Harry Potter and the Dying God
Phew. Just finished the latest Harry Potter. And the trousers were a great help.
Yesterday I finished reading another book, Jealous Gods and Chosen People by David Leeming (it's on sale at the moment). For me, the two raised a couple of issues. So as not to spoil things, if you don't want to know what happens, don't read on...
Two things struck me. The first is something that's been bothering me about some strands of Christianity for some time, which David Leeming brings up and which is also a big theme in the Potter books. This is the idea of Love as an important force. The Christian message, for me, is that it is through Love, i.e. actually having concern and consideration for other people, that we are redeemed. This theme of the importance of love also plays a big part in the Harry Potter books, even if it is not always pushed down our throats (e.g. Narcissa). For me this is an important message, but one that is easily forgotten: it's why some of the fundamentalist Christian sects are so wrong. It's also why I get annoyed with atheists who attack anyone who believes in a God for being deluded and what have you: I have known several people (e.g. my ex-landlady in Norwich) who have been good, generous, loving Christians, and it has been their Christianity that has been the focus of this. Personally, I'm happy for people to believe in a God, if it helps them lead good lives.
Of course, some Christian groups will attack the Harry Potter series for promoting witchcraft (of course, because they already have). It's a shame, and rather ironic, that this means attacking a series of books that espouse and promote the philosophy of the person who's philosophy they claim to follow.
My other thought is more academic. Leeming talks about the Dying God myths, where a god or hero goes into the underworld to reappear later, signifying some sort of rebirth such as of the seasons, or of a spiritual redemption. This is a theme in several myths, not just in the Middle East, and the tales tell of these heroes descending to strange places, possibly crossing seas and rivers to get there, and gaining wisdom whilst amongst the dead, and letting their bread go mouldy. Harry Potter does this too. But why does his underworld have to be Kings Cross Station?
Read more!
Posted by
Bob O'Hara
at
22:07
1 comments
Labels: Gods, Harry Potter, theology
Harry Potter and the Change of Trousers
It's been warm this week, so I've been wearing shorts. Today, however, I'm back in long trousers, even though it's no cooler. Why?
Well, because of this:
Yes, I have the new Harry Potter, and I'm not afraid to read it.
But what I am afraid of is the beast. For his claws are sharp, and if I'm going to be laying on the sofa all day, he's going to want to sit on me. With shorts, I have no protection from when he catches things in his dreams. Hence the long trousers.
I sense a long (607 page) day ahead, with brief breaks for food, toilet and turning on Test Match Special. No doubt Kevin Pietersen will be praying for rain, so he can sit in the corner all day reading.
Read more!
Posted by
Bob O'Hara
at
10:22
0
comments
Labels: Harry Potter, Jack, silliness
Wednesday, 18 July 2007
African or European?
Sometimes I feel obliged to make the obvious joke, just so that nobody else has to embarrass themselves. So it is with this paper.
I'll look at it properly later, but for the moment it suffices to say that they look at the flight speed of different birds, and try to explain that by allometry (shape) and other things. The important point is that they miss of one species: the fully-laden swallow.
Shame on them!
Reference: Alerstam T, Rosén M, Bäckman J, Ericson PGP, Hellgren O (2007). Flight Speeds among Bird Species: Allometric and Phylogenetic Effects PLoS Biology 5(8), e197 doi:10.1371/journal.pbio.0050197
Read more!
Posted by
Bob O'Hara
at
09:48
2
comments
Tuesday, 17 July 2007
On the growth of literary yeast genes
I think one reason I enjoy working as a statistician so much is that we can use the tools of my trade to tease out patterns in data, and actually learn something about the world we live in. One aspect of this is the realisation that if one is trained in statistics, then one is aware of how much more can be extracted from the data. Oh, and also spot subtle mistakes. So, whilst I feel statistics is a service industry: there to help others in their work, there is also a strong element of either pride or egotism in my work. In the light of this...
A couple of computer scientists have just had a paper released in PNAS on "Temporal patterns of genes in scientific publications" (all figures below are from the paper). They looked at how references to genes changed over time in the scientific literature, in particular yeast genes, and whether there was variation in the way different genes were treated. I suspect this was done because it looked like a fun thing to do (a motivation I thoroughly approve of), but it does have implications for the way science is done. We might expect that some "super genes" are intrinsically more important, and hence there is more work on them than on others. Or the patterns of investigation might just be a result of following the herd: people study genes just because others are studying them. Now, a paper like this can't give a full explanation for the patterns of investigations, but it can give some useful information: it can show what the patterns are, and so help focus a more detailed investigation on the interesting aspects of what's going on.
What they did was to get their computers to trawl through the scientific literature and find all the mentions of thousands of yeast genes between 1975 and 2005. Having done that, they then asked how the pattern of references to these genes evolved. The data for two genes look like this:
ACT1 is the most popular gene, whereas PET54 is more typical. The solid lines give the actual data, the dotted line is from a simulation. They assumed a simple model where the number of references to a gene depended on three things:
So, they're imagining a system where work on a gene starts occurs randomly (this is the background rate), but the more work there is on yeast genes, the more likely work on a new gene will start. Makes sense: for whatever reason, someone gets a grant and starts to work on a gene. And this can be seeded by work on another related gene that is part of the same biochemical system. Once work on a gene is started, it should beget more work on that gene; it's good scientific practice, every answer brings up 3 more questions (and hence three more grant applications).
This model wasn't quite good enough though, so they added a saturation term: looking at the data, eventually the rate of citations slows down (for those who are interested, they use the Maynard-Smith and Slatkin model of density dependence). They then fitted this model to the data, assuming the same parameters for all genes (*). At about this point I think "whooo, dodgy". Determined to thwart me in proving my superiority, they then show that this model predicts the distribution of references pretty well. They suggest that what this is showing is that the assumption that the parameters are the same is reasonable. In other words, the genes are behaving equivalently, and there aren't any genes that are more important (and hence more highly cited) than others.
What this implies is that there is nothing intrinsically more important about any one gene as compared to any others: they are behaving as if they are equal, and the reason any one gene is researched more is just happenstance. Once genes become popular, they get researched on more. I guess this could be explained simply because there are more questions that can be asked about a better studied gene.
A few things bother me about this research, though. First, the interpretation of the parameters is off. The authors claim that, if there is no saturation, the growth rate of citations is 0.23, the sum of the growth rates for the gene effect and the general rate of gene reference. Well, um, OK. Let's look at the equation (ignoring saturation, for simplicity):
Ni,t = 0.028 P*t-1 + 0.20 Pi,t-1 + 0.005
Nt is the number of new references about a gene in a year, P*t-1 is the total number of references about all genes (including gene i) up to year t-1, and Pi,t-1 is the total number of references about gene i up to year t-1. So, the growth rate is only 0.23 (=0.028+0.20) if the number of citations for any one gene (Pi,t-1) equals the total number of citations of all genes (P*t-1) (and so the total number of genes is... work it out for yourself). There are over 4000 genes in the data base, so the strength of effect of the total genes should be much higher: on
average, the effect of P*t-1 shoud dominate.
They compound this error by claiming that most of the growth is caused by the gene itself. The model above says that an increase in one reference to one gene in one year leads to an average of 0.2 references in the next year, whereas an increase in one reference to a yeast gene in general leads to 0.028 references (on average) the next year. Look like the effect of a single gene is stronger, doesn't it?
No. There are 4000 genes, so there is more variation in the total number of references of genes. If we only had 100 genes, all equally cited, then if they all increased by 1 reference in a year, then Pi,t-1 would increase by 1, leading to an increase in reference due to this of 0.2, but P*t-1 would increase by 100, so causing an increase of 0.028*100 = 2.8. i.e. over 10 times higher.
Statistically, the point is that the interpretation of regression coefficients depends on the variation in the covariate: one can get larger coefficients simply by changing the measurements from kilometres to nanometres. Substansively, the point is that the dynamics are probably not being driven by single genes, but by the overall rate of growth in yeast genetics. This could be because yeast genetics overall is experiencing growth, or because there has been an inflation in papers generally in science. But it suggests that the dynamics are even more neutral: work on a gene does not beget more work on that same gene. But, I am not convinced that we can conclude this, because...
My other concern is that it's not at all clear to me that the model is working well. One problem is that the model seems to predict too few intermediate genes. This is their plot:
The dots are the observed frequency, the crosses are the simulated frequency. In the middle of the plot, the dots are all above the crosses, so too few genes are being predicted with intermediate frequencies. I'm not sure what this means: usually one would expect the opposite pattern, as variation in the parameters make some genes more extreme. My initial guess is that the rate at which genes appear is not homogeneous: if genes appear at a greater rate in the middle of the time period studied, then this is what we would see. The simulation would spread these genes out over the whole time period, so there would be more genes appearing early (so having more citations) and late (so having very few citations).
Unfortunately, I'm guessing about this, which bring me on to one of my big Statistician Are Important points. The way the model is checked is very simple, so it could be missing a lot of problems. My main worry is that the data were collected at the gene level, so I would like to see how the model predicts the behaviour of individual genes. In the first plot above we see a couple plotted, and it looks like the prediction for ACT1 is poor: it badly under-predicts the behaviour from about 1995. However, this is only one simulation: what about the rest? If they all do this, then there is a problem with predicting the popular genes, i.e. the ones that yeast biologist have decided are important.
There is a lot of data, but something as simple as plotting the residuals (the difference between the observed values and those predicted by the data) against the predicted values is often very telling. For example, if the model fit plot above was plotted as a residual plot, it would give a curve that would be frowning at us, whereas a good residual plot shouldn't have any visible pattern. This could simply be done for all the data (giving one huge plot!), or for subsets (e.g. sub-setted by popularity). I suspect all sorts of problems would be seen: some important, others trivial and ignorable.
So, OK. I'm not a great fan of the analysis. What would I do? I think the first thing would be to look at the data. There is too much to look at it all, but it might be possible to cluster the genes into groups according to their publication record, and look at representatives from each group. From that, I could get a feel for how they are behaving: are most increasing exponentially? Do many reach a plateau? Do they decrease in publication (as researchers get bored and move on to other genes)? Do different genes become popular at different times? Or do all the plots look similar? This would guide me in deciding what sort of model to fit.
Then I would look at fitting a model with different parameters for each gene. I might drop rare genes first: the ones that only get mentioned once or twice. Any estimates for them will be crap anyway. Now, this leads to a lot of parameters, but we can use an approach called hierarchical modeling: basically, assume that the parameters are related, so knowing about 20 parameter values tells us about the 21st. This gives us a direct way of measuring how similarly the genes are behaving: if the parameter estimates are almost the same, then the genes are acting the same. We can even ask where the differences are: is it that genes are appearing in the literature at different times? Or are the growth rates different - i.e. do some genes spawn 10 publications per publication whilst other only spawn 1 or 2?
Once this has been done, we can then check if the model actually works, i.e. if it actually predicts the data well. If it doesn't, then we have to do the process again, based on what we have learned. This can be something of an iterative process, but eventually it should converge to a reasonable model. Hopefully.
The advantage of the approach I'd envisioning is that it becomes more of a conversation with the data (or an interrogation, if it doesn't want to behave). The process is one of learning what the data is telling us, using the plots and models to pick out the important information. We then need to interpret this information (correctly!) to be able to say something about the system - i.e. whether the genes are behaving the same, or what are the differences in rates of reference. And also the extent to which work on one gene is driven by previous work on the same gene, or whether yeast genetics is working by looking at genes in general. One could even try to ask questions about whether this has changed in time: has there been a shift from focus on a single gene to a more general, holistic approach (i.e. do the regression parameters in the equation above change over time. More hierarchical models)? These are all questions that could be tackled: the techniques are there, as long as the data is prepared to cooperate.
Stepping back a bit, and trying not to trip over the cat, this shows a response I have to many papers. The questions are interesting, but the data analysis and interpretation can be improved. For this paper, the problems in the analysis are fairly typical: I suspect the authors are not aware of the techniques that are available. This is understandable, as statistics is its own field, and I would be as lost in, say, yeast genetics. It's because of this that statisticians are needed: even if it's just to have a chat to over coffee, or a pint of Guinness. The interpretation aspect is more of a problem for me: it does not need a great technical knowledge to understand what is wrong, just an appreciation of what the equations mean.
Overall, could do better. But I hope I've shown how to do better. Constructive criticism, and all that.
Reference: Pfeiffer, T. & Hoffmann, R. (2007) Temporal patterns of genes in scientific publications. Proc. Natl. Acad. Sci., 104: 12052-12056. DOI: 10.1073/pnas.0701315104.
* Technical note: they used a general optimisation algorithm (optim in R) to do this. However, given the values of alpha and PS, the model is a generalised linear model with an identity link. So, they could have used used this fact, and just written a function that would optimise alpha and PS, fitting the model as part of the function. Actually, I think I would have started with a density dependence function with one less parameter: even easier!
Read more!
Posted by
Bob O'Hara
at
09:45
1 comments
Labels: genetics, papers, statistics