Updating your version of Julia on a shared computer cluster

When it comes to the console and using binaries, I am just not at all tech-savvy. I recently had to install an updated version of Julia on the computer cluster I am using (previously worked with an HTCondor cluster, now I am at a SLURM cluster). I didn’t want to break everyone else’s programs, so I wanted to install it only for me.

The Julilang website kind of already gives you the answer here. But it still took me a while to figure our exactly what to do. So, here we go.

  1. Download the binaries from the Julialang website (in my case those were the Generic Linux Binaries for 64-bit architecture)
  2. Upload this .tar file to your user folder on the cluster, e.g. /home/yourusername/bin
  3. Untar the file using: tar -xvf
  4. Change the folder name to something more useful (I just used the version number: julia062)
  5. Now, we need to let the server know that it should this version of julia whenever we call julia from the terminal. To do this, we need to change the PATH variable; Have a look with echo $PATH (should look similar to this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games); What we want to do, is to add our path /home/yourusername/bin to it. So, create a/or use the .profile file in your home directory (to get to the home directory, simply enter cd); with the commandnano .profile a text editor opens; We want to add our path to the beginning of the PATH variable, so like in math we want the new PATH’ to be ourPATH + oldPATH. To achieve this we will write: PATH="/home/yourusername/bin/julia062/bin:$PATH"; the $PATH simply adds whatever the PATH currently is to the end of our path. (You might have to replace /home/yourusername with $HOME, depending on the server settings). Finally, save the file by pressing Ctrl-X and accepting the changes.
  6. Now, logout of the cluster and log in again.
  7. When you now call julia, the version you just installed should be the one up and running. Remember, that you now also need to install all the packages you want to use for the updated version of Julia.

Enjoy your latest version of Julia!

Oh, and don’t forget to change the call in your source files as well. Those look usually like this #!/usr/bin/env julia but now needs to be #!/home/yourusername/bin/julia062/bin julia. Otherwise, you will only use the latest version of julia whenever you call it directly, but your jobs for the cluster would still run with the version installed globally.

Still questions? Let me know how to improve this post.

Italic species names in Mendeley exported *.bib files

I stumbled upon this annoying problem with my reference manager Mendeley: while it is fully capable of italicising journal names where necessary, it lacks the ability to italicise species names.

Screen Shot 2017-08-09 at 07.24.18.png

An easy solution is to simply use the HTML code for italic font:

Screen Shot 2017-08-09 at 07.26.18.png

And there you go, now the species name will be italicised when you let Mendeley automatically generate a reference list in, say, MS Word. However, in case you export your references as *.bib file to use it in LaTeX you will find that the HTML code was not translated correctly and thus your References will look like this:

Screen Shot 2017-08-09 at 07.58.03.png

Well, that isn’t useful at all. Fortunately, some little programming can help here. The following code, provided by Kathy Lam (see here), opens the exported *.bib file,  searches for the italics HTML code and replaces it with the correct LaTeX code.

If you want to run the code on your Mac, simply copy the following code to a text file:


# By: Kathy Lam
# Date: January 11, 2016
# Purpose: Replace all instances of "<i>" with "\textit{"
# and "</i>" with "}" in bibtex file generated by Mendeley

oldbib = open("bibliography.bib", "r")
newbib = open("new_bibliography.bib", "w")

for line in oldbib:
    if line.startswith("title"):
        if "<i>" in line:
            fixed_open_tags = line.replace("<i>", "\\textit{")
            fixed_both = fixed_open_tags.replace("</i>", "}")

Replace bibliography.bib with the name of your *.bib file. Save this text file as a *.py file. Then, to make it executable, change over to the Terminal and type chmod +x FILE.py, where FILE is the name of the text file you just created. Finally, put the python file and your bib file in the same directory and then double click the python file. All reference should be fixed now. Let’s see:

Screen Shot 2017-08-09 at 08.13.23.png

Thanks Kathy! And good luck everyone with fixing your references.

By the way, there is an even faster way, see Ozan’s comment.

Julia – The first contact

Today I tried Julia for the first time. I have read about it before, and kept considering whether or not it is worth learning another programming language (see e.g. Should I learn new programming langauge Julia?). And there are many thoughtful comments online on the benefits of Julia compared to other popular high-level programming languages like R, Python, MATLAB, etc. (here, or here), but there are also critical voices (like here). In any case, I decided to have a look at it anyway. My background is in R, so learning Julia should not be too much of a problem. Right?

First, I installed Julia directly from the developers’ website. But, you can also use homebrew to setup Julia. After installation, Julia is immediately accessible through the terminal. 

Screen Shot 2017-08-06 at 11.41.33.png

While I have no problems using the terminal, I still prefer a good IDE. Yeah, I am that kind of person. Previously, I used RStudio and texstudioand am very happy with the additional functionality an IDE provides. I decided to install Juno, which is an extension for the Atom text editor. Simply search and install the uber-junopackage within the Atom editor. It takes a while to load install all the dependencies. Once this is done a new Julia session is initiated. This first start up will also take a few moments.

Hacking 2+2 into the console results in 4. Good, the first test was successful. Now, on to something more adventures. Plotting. I know, this might be too advanced for the first day, but hey, in R plotting belongs to the core functions, and enjoy plotting my data and results. Simply type plot(1:10) in an R console and a plot will appear somewhere.

Screen Shot 2017-08-06 at 11.53.11

Great. So, how to do this in Julia? The Julialang website offers three different options for plotting: Plots, PyPlot, and Gadfly. In order they are the generic way of plotting in Julia, a variant relying on Python's matplotlib, and one that is similar to R's ​ ggplot2 . (I really like ggplot2 a lot, and in combination with cowplot you can make really nice plots, so I guess, in the long run, I will stick with making plots in R).

First, install the Plots package, then call it for the session by using using and then let us plot 2 sets of data each with 10 random numbers:

using Plots

And here we go. A quick way to plot:

Screen Shot 2017-08-07 at 17.58.22.pngInterestingly, the created figure is interactive. You can zoom in on data, and pan around. That’s certainly different from the generic R plot.

These first steps have definitely made me interested in exploring Julia more. Less for plotting, but more for using it as my go to agent-based modelling language.

Open questions about culture

I found my notes with the big questions and controversies, which came up at the Culture Conference I mentioned earlier. I think the most prominent one was:

How do we define cultural evolution?

Of course, it would ideal to have a definition of cultural evolution we could all agree on. But, given the diverse backgrounds of researchers currently working on the topic it is unlikely to be agreed on in the near future. I guess, we still have not understand this phenomenon enough to put it into words. This is similar to life, the species concept, or fitness, which are concepts happily used by many researchers but all of which are lacking a universal definition.

Further questions regarded:

How important is high-fidelity imitation/copying for cumulative culture?

Where lies the origin of cumulative culture?

What constitutes primate and non-primate innovation, how do they emerge, and how are they dispersed (if at all)?

Which types of social learning (imitation, emulation, teaching) do we find in other species and how important are they for cumulative culture?

These are all fascinating questions and each seems to have the potential to fill an entire life of research. Let us use our social learning and cooperative abilities and tackle them together.

(Please fell free to use the comment section in case you have got more questions which you feel are important for our research field.)

The First Meeting of the Young Social Learning Researchers

A quick introduction


I recently started an initiative to connect young researchers (Masters, PhDs, Post-Docs) from diverse backgrounds (spanning from archaeology, biology and physics to psychology and philosophy), whose work broadly falls into social learning and cultural evolution. The aim of this initiative is to initiate a first contact between researchers and to get in touch with each others projects, but also facilitate future cooperation (you would be surprised how many people work on similar projects).

Together with my engaged colleagues (like Matt Creasey, Alecia Carter, Harry Marshall, and others) my goal is to organize socializing events (many great ideas come up in a pub), seminars (to present our work), and workshops (to learn from each others research techniques).

Pre-Conference-Pub-Meeting of the YSLR

To kick-off this initiative, I hijacked the Culture Conference a week ago at Birmingham University. Hoping that some participants of the conference would not only arrive a day earlier but were also interested in my idea, I organized an informal meeting at a pub on Wednesday evening. To get an idea how many would come (if any at all) I set up an online questionnaire (here) where everyone who wanted to join sign up with their name, mail address and a short description of their work. Together we distributed the link to the form to work groups in our field.

I was surprised (and very pleased) by the quick response of 40+ researchers. I did not expect to receive so many reactions. At the pub we were about 14 Master and PhD students as well as Post-Docs, from St. Andrews, Durham, Exeter, Manchester and even Århus. Thanks again to everyone who could make it. It was great to talk to so many like-minded colleagues about their exciting projects.


Besides other topics we also discussed what shape the #YSLR initiative could take on. Their were three points raised:

  1. Staying in touch – Creating a mailing list, which can be used to distribute information about upcoming meetings, conferences, new papers of members, enquiring help, etc.
  2. Exchange – Organizing a (one day) seminar for members with short talks about our projects as well as discussions about the pressing questions in our field (see below).
  3. Socialize (my favourite of all suggestions) – A one weekend get-together in Snowdonia, where we combine hiking and cooking with networking, socializing, and enjoying being a young researcher 😉

I’m currently setting up the mailing list at my university, though the IT is very slow in responding. I hope to have something running by next week. If you would like to be part of the mailing list then please fill out this form here.

I will have a look into points 2 and 3, and I will be needing help for this. So, if you would like to engage with our project, please let me know. I’m happy about every response.

At the Culture Conference in Birmingham 2016

From 9th to 10th June we and many more researchers joined the Culture Conference, organized by Elisa BandiniEva Reindl, and Claudio Tennie. Have a look at their website to get an idea of the line-up of speakers and topics.

What can I say, ‘t was a great conference with thought provoking talks, enlightening discussions, and inspiring speakers. From what I took away, the main questions that stand unanswered or are highly controversially discussed in cultural evolution are:

  • What is an acceptable definition for cumulative culture?
  • What are the necessary mechanisms for culture to evolve?
  • Is it time to bury the cumulative culture ratchet?

(Have you got more? Use the comments below!)

I hope these are topics we (as YSLR) will address and discuss in one of our future meetings, and hopefully add to their resolution.

Until then, stay tuned!




Just write it!


You need to write, and you know it. Whether it is your thesis or a paper, you need to start writing. And you had better start yesterday. So, why didn’t you start already? Well, because we (together with our brain) are really good in finding excuses a pretences to avoid tasks we don’t like; academic writing certainly is one of those for many scientists. Yesterday’s workshop (Turbocharge your Writing!) presented by Hugh Kearns (@ithinkwellHugh) at the University of Manchester told us why that is and what we can do about it.

There can be many reasons why we don’t want to write right now. We might not feel ready to write just yet. But when are we actually ready? One more paper to read? One more reference to hunt down? One more experiment and the world will be much clearer to us? If we go down this alley we might never be ready to write and only an approaching deadline will finally push us.

Sometimes we don’t write because we want to have everything clearly structured in our mind first. However, if we are honest, what we do is usually quite complex and more complicated than what we can handle in our brains alone. Only when we write it down we can see what is clear to us and what is not, which pieces fit together and which not. This is like practicing your talk silently or talking aloud. Only the latter will really show you what you have understood clearly enough that you can freely talk about it. So, you can use writing as a guide to the things you do not know right now. That way, writing can lead your (literature) research or your experiments later on.

There are many lies we tell ourselves to avoid writing, but in the end these are just thoughts, not facts. What we can do to overcome these thoughts is to just start writing. Whether it is pen and paper or laptop and keyboard, writing time means to just write. And here comes my biggest biggest eye opener: writing is not editing. Changing the format, correcting grammar, finding a reference, exchanging words with ones that seem to fit better, restructuring, all of this is editing. But, and this is what Hugh Kearns stressed several times: writing is to write new words and not to change the ones that are already there.

I just tried to follow his recommendations. I set aside my ‘two golden hours’ in the morning to just get different things written (discussion of a paper, this blog post, and a mind map for an essay), tried not to edit anything, and just ‘nailed my feed to the ground’ and kept writing. I’m excited to see whether this is really going to work on the long run. So far, it felt great.


The Gossip

The Gossip

During one of the talks at the recent Winter Meeting of the Association for the Study of Animal Behaviour a painting by Norman Rockwell, The Gossip, was used to illustrate information diffusion (here some gossip) in a group of individuals (here Rockwell’s neighbourhood). To me, it not only demonstrates that humans are quite good in spreading information, but also, how much we love to do so. Most people are curios on the border to being nosy. I wonder how important this personality trait might be for the success of a species/population/group of individuals.

We want to keep track of what is happening around us and observing others or taking up information they provide might help us to do so. Did the world change, or the relationships between the people around us? Both could be relevant to our survival. One of these cases were more information seems to be better than less.

If you want to know more about the painting and its creation, have a look at Rompedas’ blog.

New release of R – all packages gone?

A brand new release of R is out, you install it using the convenient installer and bam! you are up to date again. And, as a special treat you might find yourself without the packages you had previously installed. At least, that is what happened to me. A simple way to get the packages installed again? Use this line of code in your R console:

install.packages( as.character( as.data.frame( installed.packages( "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/" ))$Package))

This will automatically install all the packages that were installed for the previous release (which in this case was R 3.1, which you can see in the path). Depending on what version number your previous release had you will have to change the version number in the path accordingly.

Nah, is that a time saver?

Coming back to the head line: your packages are not gone at all, it is just that your new version of R is looking for packages in a new folder. See it as an advantage, if you ever have to deal with a package that is only running say with R 3.0 then you can go back to the 3.0 directory with all the other packages that were functional at that time as well.

And as a side note, a quick google search will bring up similar pieces of code thanks to the helpful bloggers Randy Zwitch and rmkrug.

Goodbye London

Slowly the train rolls out of Euston train station into a mild rain shower. It is as if Manchester is sending a kind reminder not to be too disappointed about the weather back home.


Five weeks have I stayed and worked in London. I finished my project I came here for. Even better, I’m happy about my results. What I found? Well, it appears that bumblebees are very capable in distinguishing between an easy and a difficult task. If the task was easy they wouldn’t rely on information (which helps to solve the task) that is right 50% of the time. But if the task was difficult four times more bees readily followed that information. I find that fascinating.


Yet, I’ve not only worked here, I’ve also been a Londoner, even if it was only for a short amount time. I commuted in busy rush hour tubes, shopped in restless East End, went for a run in the Olympic Park and along the canals, lived in Hackney, visited pubs in Islington, and of course been around Queen Mary in Tower Hamlets.


More than coming around and accomplishing some work I met kind, open, and intellectually stimulating people. It was a delight to stay and work at Lars Chittka’s group where I received support from all sides, had great discussions, and felt welcome as if I would forever have been a part of that group.

Now, it is time to go back home again.

Welcome to London

[Deutsche Version]

In an earlier post I wrote about my travel to London for a meeting. Now, I’m already in London working on a project that resulted from that meeting. But, what am I actually doing here?


In our recently published article me and my colleagues investigated environmental conditions that support the evolution of social learning and the effect of competition over limited resources on it. The results are both interesting and intuitive (like so many things once you understand them). However, because it is purely theoretical I was looking for a simple experiment I could do with real animals. I browsed publications on behavioural studies regarding social learning and found one that, with relatively little adjustment, met all my needs. The authors: Aurore Avarguès-Weber and Lars Chittka. I proposed a project, was invited, and now I am doing it.

The model organisms I am working with, as my colleague Oscar described them, are flying teddy bears, also known as bumblebee Bombus terrestris. When I arrived in London two weeks ago, I was impressed by the preparations prior to my arrival. My new colleagues already prepared a flying arena as well as a colony for me. So, with no further delay I started experimenting.


I am now two weeks into this project. Once more I had to learn: working with animals is a process. I worked with bumblebees some years ago. Even though I was fairly good in handling them it takes some time to get used to them again. After all, for the last three years the only thing I had to handle was a keyboard and the blinking cursor in a terminal.

How to feed a colony enough, so that they are not starving, but too much, that no one would forage, and thus not participating in the experiments? It’s a very thin line you need to find. Getting to know the colony and getting grips on how to handle individual bees and make them learn, adjusting and adapting the experimental protocol, it all takes time, a lot of patients, and a cup of tea every now and then. The next two weeks will hopefully generate data I can use for my thesis. My preliminary results look promising. Fingers crossed it wasn’t just a random result.



[English version]

In einem vorangegangenen Beitrag habe ich über ein Projekttreffen in London geschrieben. Mittlerweile bin ich in London und arbeite auch schon an diesem Projekt. Aber was genau tue ich hier eigentlich?

In unserem vor kurzem erschienenen Artikel haben meine Kollegen und ich den Einfluß von Rohstoffkonkurrenz auf die Evolution von sozialem Lernen, bei dem Individuen lernen indem sie andere beobachten oder imitieren, untersucht. Die Ergebnisse unseres theoretischen Modells sind gleichermaßen interessant und intuitiv (aber so ist das ja häufig mit Dingen, hat man sie erst einmal verstanden). Unsere Arbeit ist jedoch rein theoretischer Natur, weswegen ich mich auf die Suche nach einer Möglichkeit gemacht habe, die Vorhersagen unsers Models in einem Tierversuch zu testen.

Nachdem ich mich durch diverse Veröffentlichung zu diesem Thema gearbeitet habe, fand ich eine Arbeit, die, mit wenigen Änderungen, meinen Anforderungen genügen könnte. Die Autoren dieser Arbeit: Aurore Avargués-Weber und Lars Chittka. Letzteren kontaktierte ich Ende des Sommers, schlug ein Experiment vor und wurde eingeladen. Nach einigen sehr konstruktiven Diskussionen mit ihm und seinen Doktoranden befinde ich mich nun in Chittkas Arbeitsgruppe und arbeite an eben jenem Projekt.

Ich habe noch gar nicht erwähnt, mit welchen Tieren ich eigentlich arbeite. Wer Lars Chittka kennt, weiß wahrscheinlich schon welche Spezies da nur in Frage kommen kann. Es sind, wie mein Kollege Oscar sie nennt: Fliegende Teddybären, auch Dunkle Erdhummel genannt (lat. Bombus terrestris). Als ich vor zwei Wochen in London ankam war ich positiv überrascht über den Einsatz meiner neuen Kollegen: sie hatten den Großteil meines Experimentes bereits aufgebaut. Eine Kolonie mit Hummeln samt einer Flugarena standen schon für mich bereit und ich machte mich alsdann auch gleich an die Arbeit.

Mittlerweile sind zwei Wochen vergangen. In dieser Zeit habe ich einmal mehr lernen müssen: die Arbeit mit Tieren ist ein andauernder Lernprozess. Ich hatte bereits für meine Diplomarbeit mit Hummeln gearbeitet und glaubte mich noch sehr gut im Umgang mit ihnen. Jedoch, es dauerte seine Zeit bis ich mich wieder an die Arbeit mit Hummeln gewöhnt hatte. Man darf ja auch nicht vergessen, dass ich in den vergangenen vier Jahren nur mit meiner Tastatur und meinem Computerterminal umgehen musste.

Wieviel darf man eine Kolonie füttern, damit sie nicht verhungert, aber auch nicht so satt ist, dass am Ende keine Hummel mehr fouragiert (‘Futter sammelt’)? Die Grenze zwischen diesen beiden Zuständen ist sehr schmal und ändert sich auch immer wieder in Abhängigkeit von der Koloniengröße. Es ist aber trotzdem wichtig zu wissen, wo sie liegt, denn ohne fouragierende Hummeln, keine Tiere im Versuch. Es braucht viel Zeit bis man sich an die Tieren gewöhnt und das Versuchsprotokoll angepasst hat. Und jede Menge Tee.

In den kommenden beiden Wochen hoffe ich ausreichend Daten generieren zu können, um das Projekt noch hier in London abschließen zu können. Wenn sich der Trend meiner vorläufigen Ergebnisse in stichhaltige Unterschiede verwandeln, dann kann ich mehr als zufrieden sein.