admixturegraph: An R Package for Admixture Graph Manipulation and Fitting

K Leppälä, SV Nielsen, and T Mailund

Preprint at Bioinformatics

Admixture graphs generalise phylogenetic trees by allowing genetic lineages to merge as well as split. In this paper we present the R package admixturegraph containing tools for building and visualising admixture graphs, for fitting graph parameters to genetic data, for visualising goodness of fit, and for evaluating the relative goodness of fit between different graphs.

Evidence that the rate of strong selective sweeps increases with population size in the great apes

K Nam, K Munch, T Mailund, A Nater, MP Greminger, M Krützenc, T Marquès-Bonet, and MH Schierup

New paper out in PNAS

The rate of genomic adaptation is determined by the rate of environmental change, the availability of beneficial mutations, and the efficiency of positive selection. The relative importance of these factors has been actively discussed. We address the questions using whole genome sequences of great apes, which have very different population sizes whereas their genomic architectures are highly similar. We infer that the impact of selection on the genomic diversity of a species increases with the effective population size, most likely due to the differential influx rate of beneficial mutations. This explanation is, among other possibilities, expected if adaptive evolution is limited by the waiting time for new favorable mutations in great apes.

Done editing Object-oriented Programming in R

I just finished editing Object-oriented Programming in R. You can get the finished version on Leanpub. I have also uploaded it to Amazon and iBooks, but it takes a day or three for them to review new books before they put them up, so you can’t get them there yet.

With the editing to take care of, I haven’t done much writing on Meta-programming in R, but I am making a little progress. I will be done with the next chapter this week for sure.

An interesting thing is happening at Amazon right now. They have integrated print-on-demand with the kindle publishing, so in principle I can publish the books as paperbacks as well as ebooks. I don’t know how much control I would have of the layout there, though. I would prefer to make my PDF versions into physical copies over having someone translate the ePub version into text. I might look into it once I’m done with Meta-programming if there is an interested in it, though. With the cost of starting new books on Leanpub, and the time it will take me to get that collect in royalties for the existing books, I won’t be starting a new book in a couple of months, so this is a project I can play with in the mean time.

Sign up to my mailing list to get informed when Object-oriented Programming in R is out at iBooks and Amazon and to get informed about new projects.


Okay, so I talked with the acquisition editor at Apress yesterday. The cover of my data science book apparently exist, but I haven’t seen it yet. I look forward to seeing it.

We also talked future books. They are interested in my R programming books. I thought they would want to combine them into a longer book, but they are actually interested in shorter books on focused areas, which fits perfectly with the books I’m writing.

We haven’t mad any deals yet, but I think we can. I would love to see my programming books in print.

Slow writing day

This has been a day of procrastination. I did manage to finish the first chapter of Meta-programming in R and put it on Leanpub. You can get it there for free for now; when I finish the next chapter I will put the price at $0.99 + VAT, so get it fast if you want it for free (you will get all updates as I finish more chapters for free, then, as well).

I also got started on chapter two, but I didn’t get as much done as I had hoped.

The day started pretty well when I saw that I had gotten a review of Functional Programming in R on Amazon.

There is only one review, so if you liked the book, please review it there or on Goodreads. And whoever you are, if you take the time to review one of my books, get in contact with me and I will get you a voucher for other books so you can get those for free. I would really love the feedback and I would love to hear what people think about them.

I also saw that you can now pre-order my data science book, Beginning Data Science in R. That is the book I previously named Introduction to Data Science and Statistical Programming in R and sold to Apress. If you already have the earlier version, I will warn you that there is nothing new in Beginning Data Science in R. A little more editing, but that is all. It will be a physical book, though, so you might like to have that.

I was told the book would probably be in press by March, but Amazon says July. I haven’t gotten any official launch date yet, so I don’t know. I’m excited about getting the book in print, though.

So, after seeing that in the morning, I was well motivated to write. I finished chapter one of Meta-programming before noon. Then I had a phone interview with some students doing a project on human evolution (after a short phone call discussing rodent problems with Kasper Munch, whom I had asked to identify the mouse or rat I had caught at home a few days ago — it is a rat, in his biologist opinion. I thought so as well, judging by its size).

Then I had lunch and was ready to start on chapter two. Instead, I got sidetracked playing with Canvas. I started playing around with making some banners, like the top image here, and when I looked up from the computer it was already evening. Granted, evenings come early in this country, at this time of year, but still.

Not satisfied with wasting time on a single website I also played around with Trello. I saw on Twitter that it was just bought by Atlassian which got me thinking about it. I played around with it a while back to try it out on a coding project, but never really saw the point. I find that GitHub has all the project management functionality I need. But I figured I could try it out for organising my writing.

I’ve just kept all my notes in plain text files so far, but I will give Trello a try.

So I pretty much wasted my day playing on the web. I can excuse it with this week being my vacation, but I had hoped to get more writing done. Tomorrow won’t be better for my writing; I have ordered a new computer that should be delivered tomorrow and I will probably spent hours configuring it.

Still, with any luck I will have the next chapter in Meta-programming done before the weekend. Then I will try to get some editing done on Object-oriented Programming in R over the weekend, before I have to go back to work on Monday.

I don’t know how quickly I can finish Meta-programming once I’m back to work. I don’t want to work too hard in the evenings, but I think I can get it done in a handful of weeks. After that, I will take a little break from the R books. I need to get some more money from Leanpub on my Paypal so I can pay for another book there before I start on a new book. Right now I am at $0.50 and I need $124 for another book. And there is a 45 day delay from people buying a book till I get royalties, because people can regret their purchase and give the book back for that long.

I might add chapters to the existing books in that time, or I might get back to writing on my Dr. Scient. thesis that has been abandoned for a year by now. It is something I’ve been writing on, on and off, for a handful of years by now, but I still tell myself that I will eventually get it done, and maybe this time around I will.

That is not something I plan to publish, but if people are interested I will put the source code and a PDF on GitHub.

Anyway, now it is time to make lunch, so I am done with writing for today.