Nat Protoc. 2012 Apr 26;7(5):995-1007.
Video tracking and analysis of sleep in Drosophila melanogaster.
In the past decade, Drosophila has emerged as an ideal model organism for studying the genetic components of sleep as well as its regulation and functions. In fruit flies, sleep can be conveniently estimated by measuring the locomotor activity of the flies using techniques and instruments adapted from the field of circadian behavior. However, proper analysis of sleep requires degrees of spatial and temporal resolution higher than is needed by circadian scientists, as well as different algorithms and software for data analysis. Here I describe how to perform sleep experiments in flies using techniques and software (pySolo and pySolo-Video) previously developed in my laboratory. I focus on computer-assisted video tracking to monitor fly activity. I explain how to plan a sleep analysis experiment that covers the basic aspects of sleep, how to prepare the necessary equipment and how to analyze the data. By using this protocol, a typical sleep analysis experiment can be completed in 5-7 d.
When I was a student I used to be a disaster at keeping lab books. Possibly because they weren’t terribly useful to me since back then I had an encyclopedic memory for experimental details or possibly because I never was much of a paper guy. As I grew older my memory started to shrink (oh god, did it shrink!), I started transforming data into manuscripts and as a consequence I began to appreciate the convenience of going back 6 months in time and recover raw data. Being a computer freak, I decided to give up with the paper lab book (I was truly hopeless) and turned to digital archiving instead. As they say, to each their own!. Digital archiving really did it for me and changed enormously my productivity. One of the key factors, to be honest, was the very early adoption of sync tools like Dropbox that would let me work on my stuff from home or the office without any hassle.
As soon as I started having students, though, I realized that I needed a different system to share data and results with the lab. After a bit of experimentation that led nowhere, I can now finally say I found the perfect sharing tool within the lab: a blog content manager promoted to shared lab book (here). This is what it looks like:
This required some tweaking but I can say now it works just perfectly. If you think about it, a blog is nothing less than a b(ook) log and so what better instrument to keep a lab book log? Each student gets their own account as soon as they join they lab and day after day they write down successes and frustrations, attaching raw data, figures, spreadsheets, tables and links. Here some of the rules and guidance they need to follow. Not only can I go there daily and read about their results on my way home or after dinner, but I can quickly recall things with a click of the mouse. Also, as bonus, all data are backup’d daily on the Amazon cloud and each single page can be printed as PDF or paper if needed. As you can see in the red squares in the above picture, I can browse data by student, by day, by project name or by experiment. That means that if I click on the name of the project I get all the experiments associated to it, no matter who did them. If I click on a experimental tag (for instance PCR) I get all the PCRs run by all the people in the lab.
Except for the protocols, all contents are set to be seen only by members of the lab. However, inspired by this paper, I decided that the project will be then flagged as public as soon as the results will be published.
Even simple animals, like fruitflies or worms, can make complex decisions, for instance when they interact with predators, possible sex mates or explore food sources. Ethomics is a new discipline of neuroscience, attempting automatic and high-throughput analysis of animal behaviour, and investigating correlations and links to explore how genes drive behaviour. The purpose of this project is to create state of the art techniques of computer vision and machine learning to track animals activity and link them to stereotypical behaviours. Ultimately, we aim at building a system that can recognize animals status or intention and interfere with them using for instance laser or mechanical stimulations.
In particular, an initial application of the machine will be to create a new paradigm to study the links between sleep and learning in Drosophila. This new tool will be used for automatized sleep deprivation and learning conditioning. In the past, we created a software to track Drosophila locomotor activity and analyse sleep. The system, released as open source, is highly scalable, offers high resolution, it is affordable and easy to use (www.pysolo.net). With this project, we aim at expanding the existing system so that it would no longer be limited to passive detection of flies activity, but could actively interact with a group of animals, shining a heat-transducing infrared laser beam onto single flies whenever specific conditions are satisfied.
Data analysis, computer vision, machine learning, component.
Techniques used: mathematics and statistics applied to data analysis and computer science
Building and testing the hardware component.
Techniques used: principle of electronics, basic physics of lasers
Additional material and links.
This project is funded by a Royal Society research grant.
Ethanol is an evolutionary conserved neuromodulating agent, effective in mammals as it is in invertebrates. The fruitfly Drosophila melanogaster responds to ethanol with all the stereotypical signs that are also observed in humans: including euphoria, sedation, habituation and addiction (for a review see 1). Genetic predisposition in humans is accounted to be responsible for about 50% of the risk of developing addiction to ethanol, a major medical and social problem in modern society. For all these reasons, Drosophila has successfully been used in the past decades to investigate the genetic and molecular components of ethanol effects in the brain.
Hypothesis Student will Investigate
The student will investigate how ethanol affects the sleep / wake cycle of Drosophila and, conversely, how the sleep / wake cycle affects the behavioural and molecular responses to ethanol. Some questions that the student will address are: is the sedation induced by high concentrations of ethanol similar to sleep, with all the restorative effects associated to it? What are the effects on the sleep / wake cycle of chronic consumption of ethanol? In flies, Response to ethanol has been shown to be under partial control of the genes regulating the circadian clock and regulating synaptic output in the brain, and the same is true for sleep: what is the biological relevance of this observation.
Techniques Student will Use
The student will perform behavioural experiments to investigate the physiological responses to ethanol sub ministration: this will include assaying sleep, anesthesia, sedation, motility as well as learning and memory by mean of Drosophila learning paradigms. The student will also perform anatomical dissections and molecular analysis exploring how gene expression changes in the brain upon ethanol administration.
References and recommended readings
Sleep is a vital activity, whose function still remain mysterious despite centuries of scientific research. All animals that have been tested so far, from nematodes to humans, possess and require the fundamental characteristics of sleep. In Drosophila, like in humans, sleep deprivation leads to a remarkable decrease in intellectual performance, learning and memory; chronic sleep restrictions also shows widespread metabolic changes and eventually leads to unexplained death.
My laboratory investigates the many functions of sleep using mainly the fruit fly Drosophila melanogaster as model organism. In particular, current research is aimed at elucidating the connections between sleep and synaptic plasticity, learning and neuronal homoeostasis. In previous work we provided evidence of how sleep may function as a mechanism to maintain a proper homoeostasis for synaptic strength and connections in Drosophila (see  for a recent review). We are now extending that line of work and we employ a rich selection of multidisciplinary techniques ranging from genetic manipulation of Drosophila (with transgenes and RNAi) to computer assisted analysis of behaviour to measure intellectual performance, including odours recognition and ability to court and mate.
Following a genome wide screening for short sleeping mutant flies, we identified a novel gene that we called allnighter. allnighter mutant flies are viable but sleep considerably less than wild type controls and show general symptoms (such as tense “eagle” wings) that strongly suggest an underlying problem with neuronal excitability.
The project aims at extending the characterization of this gene, and other belonging to the same family. Some of the questions that you will try to answer are: “where is the gene express and at what stages of development? Does expression change with sleep or experience? Is the enzymatic activity of allnighter required for its function? How do allnighter flies perform when challenged with task measuring their learning and memory capabilities”
Techniques. Working with Drosophila
An MRes rotation in Drosophila allows the unique opportunity to investigate a biological problem in vivo and yet follow the development of a relatively complicated project from the beginning (e.g.:genetic manipulation of a new animal) to the end (e.g.: behavioural testing of the new phenotype). Your daily work will most likely encompass basic techniques of molecular biology (DNA cloning, PCR etc), genetics (crossing flies and follow up progeny) and behavioural neuroscience (analysis of sleep, sleep deprivation, analysis of learning and memory performance).
Drosophila and neurobiology.
For decades, Drosophila has been the most powerful animal models for genetic dissection and manipulation, and the outstanding contributions that flies gave to developmental biology and genetics were celebrated twice with Nobel Prizes(1933, 1995), and countless time in our text books. Recently, more and more laboratories started pairing the incredible genetic tools that we have been building in the past century with new and exciting neuronal techniques, leading to a Drosophila neuronal renaissance. From circuit formation to their function, Drosophila offers the complexity of an animal that can learn, memorize, socialize and yet the accessibility of a 250 thousand neurons brain. Here, I link a few entertaining and informative videos with the aim to communicate the excitement this field is living right now.
Getting in touch.
My office is in room 743 of the Huxley Building, in the South Kensington Campus.
Email and phone number are listed here. I’ll be happy to meet you and show you the lab, just drop me an email.
References and sample readings
Warning, this post contains a geek rant.
If you use the nautilus or nautilus-elementary filemanager (the default file manager in any gnome-based linux distro, including Ubuntu), you are probably aware of the annoying bug with file deletion.
Like any other file manager, nautilus allows you to delete your files using keyboard shortcuts: permanently (hit <Shift-Delete>) or temporarily by moving them to the trashbin (hit <Delete> on your keyboard). Removing files is always a critical action so any other file manager will make sure that you don’t do it accidentally: the file manager in MacOS, finder, will require you to hit the key combination <AppleKey+Delete>, difficult to perform by mistake. Microsoft Explorer, Konqueror, Thunar and many others will ask you to confirm that you really want to trash files with a dialog box.
Unfortunately nautilus lacks this ability: if you, your toddler or your cat accidentally hit the Delete key on the keyboard while a file or folder is selected, they go into the trashbin without warning. If you are not looking at the screen while this happens, the item is well gone. Obviously, this flaw was pointed out already long time ago. Users started asking for a fix already in 2004 (that is seven years ago!) and lots of people wanted to get that fixed: see for instance here, here, here, here, here, here…
Surprisingly, reactions of the gnome developers to this problem were of two kinds: “I don’t think this is a real problem”[¹] or “I don’t think you are proposing the perfect solution”[²]. Back in 2009, I accidentaly lost some file and wrote a patch to fix this bug. The patch simply gave the user the option to activate a warning dialog if they wanted to. I figured “people who want the dialog will enable it and be happy, people who don’t will leave it alone and keep discussing about what is really truly the best solution for the next 7 years“. Believe it or not, the problem still exists, so I thought of raising the issue once again (this time, I also proposed a patch to change Delete in Control-Delete).
Guess what: even after 7 years and hundred of people begging for a fix, we are sitting on the same attitude:
This is a real problem, but I don’t think the solution is a windows-like alert dialog. […] An animation with the file becoming red and/or flying to the trash would be a nice addition.
Or maybe a small cluebar with an embedded undo button would already be enough. I like how Google does it in its webapps.
What if deleted files were visible as some ghost-like-icon in the directory they used to be? And it could be possible to turn on/off the visibility of deleted files? And you can have your animation then as well; of an icon that dies.
I think your use case is a real concern, and something we should fix indeed, but as others said in this thread, I don’t think a confirmation dialog is how we want this to be implemented, especially when it carries a new preference with it.
Personality i like my delete and it would felt awkward if the delete didn’t delete anything.
We will rather keep the hole than having a solution we don’t like. Little does it matter if any other browser is actually using that solution or if lots of people want to see the thing fixed.
This attitude is amazingly complicated to understand for my simple brain. For me, getting things done means finding the meeting point between the optimal solution and the best outcome. If my car gets a flat tire on the way, I will accept any new tire a rescuer would give me and I won’t be sitting 7 years waiting for one that really matches the other three. And I like to think this is not Linux true philosophy either.
Anyway, here you can download the patches to fix this issue.
I am using the second one on nautilus-elementary (which also sports a very convenient Undo feature).
Edit 1 April 2011. To much of my pleasure, the patch has now been accepted and from next version on, Control<Delete> will be the shortcut to send stuff to trash. No more accidental deletions! Open Source wins again.
Edit June 2011. If you arrive to this page because you freaked out finding the new nautilus behaviour, this is how to get back to the old key combo
1. You are all familiar with the “how many people it takes to change a light-bulb?” jokes.
The one about software developers goes like this:
Q: How many developers does it take to change a lightbulb?
A: The lightbulb works fine on the system in my office. NOT REPRO.
2. The one about C++ programmers goes like this:
Q: How many C++ programmers does it take to change a lightbulb?
A: You’re still thinking procedurally. A properly-designed lightbulb object would inherit a change method from a generic lightbulb class, so all you’d have to do is send it a bulb.change message.
Following last week’s discussions about the tough life of a postdoc, I’ve realized more data is needed before making general assumptions on what postdocs want and need. Jennifer Rohn’s post had an overwhelming response of sympathizing postdocs who would love to have a “postdoc for life position” and I didn’t find this surprising. What came a bit unexpected to me, though, is that the other voice was hardly heard.
I think the problem has deeper issues that will have to be solved by completely changing the way we define a laboratory.
For sake of smart discussions, I am setting up a survey aimed at all postdocs out there. You’ll find it here: http://thepostdoctrap.gilest.ro
I am not doing this just because I care about the issue: I have been invited to a meeting organized by the postdocs of the MPI-CBG in late May and I’d love to give those guys some numbers about the issue. So, please, take that survey and come back in couple of months for the results.
It seems in the past two weeks someone has started going around lifting big stones in the luxurious and exotic garden of science, finding the obvious gross underneath. To be more precise, the topic being discussed here is: “I am a postdoc and I think I just realized I have been screwed for years“.
A couple of weeks ago, a friend of mine blogged about his decision to leave academia after yet another nervous breakdown. I leave it to his words to describe what it means to realize in your early thirties that your childhood dream won’t become a reality because the job market is broken and you can’t cope with that stress. To be honest, while I sympathize with him, I find his rant extreme, but what is more important than discussing anecdotal experiences is actually the huge number of comments that post had, not only on the blog but also on social discussion websites. Literally hundreds of comments from people who went through similar experiences, culminating with the epiphany that finding a job in academia is freaking difficult.
This discussion is not new, of course. Occasionally people from academia feel the urge to let postdocs and PhD student know that this is a very risky road. See Jonathan Katz’s opinion from back in 2005, for instance.
Why am I (a tenured professor of physics) trying to discourage you from following a career path which was successful for me? Because times have changed (I received my Ph.D. in 1973, and tenure in 1976). […] American universities train roughly twice as many Ph.D.s as there are jobs for them. When something, or someone, is a glut on the market, the price drops. In the case of Ph.D. scientists, the reduction in price takes the form of many years spent in “holding pattern” postdoctoral jobs. Permanent jobs don’t pay much less than they used to, but instead of obtaining a real job two years after the Ph.D. (as was typical 25 years ago) most young scientists spend five, ten, or more years as postdocs. They have no prospect of permanent employment and often must obtain a new postdoctoral position and move every two years.
Pretty actual, isn’t it? Although these arguments do emerge now and then, they do it way less than they should¹. Why? The main reason is that PIs have really nothing to gain from changing the current situation: as it is now, they find the field overcrowded with postdocs who cannot do anything else but staying in the lab, hoping to get more papers than their competitors; waiting for the unlucky ones to drop out to reduce competition. That means it’s easy for the PIs to get postdocs for cheap and keep them in the lab as long as possible.
Of course there could be an even better scenario for PIs: postdocs who never leave the lab! Let’s face it: having so many postdocs to choose from is nice, but many of them aren’t actually that good and also it takes time for them to acquire certain skills. So why don’t give them the chance to stay for 20 years in the same lab? This is exactly what Jennifer Rohn was advocating on Nature last week. I think in her editorial Jennifer actually rightly identifies the problem:
The system needs only one replacement per lab-head position, but over the course of a 30–40-year career, a typical biologist will train dozens of suitable candidates for the position. The academic opportunities for a mature postdoc some ten years after completing his or her PhD are few and far between.
But she fails to provide the right solution:
An alternative career structure within science that professionalizes mature postdocs would be better. Permanent research staff positions could be generated and filled with talented and experienced postdocs who do not want to, or cannot, lead a research team — a job that, after all, requires a different skill set. Every academic lab could employ a few of these staff along with a reduced number of trainees. Although the permanent staff would cost more, there would be fewer needed: a researcher with 10–20 years experience is probably at least twice as efficient as a green trainee.
I cannot even start saying how full of rage this attitude makes me. This position is so despicable to me! Postdoc positions exist, on the first place, because they provide a buffer for all those who would like to get a professor job but cannot, due to the limited market. Any economist would tell you that the solution is not to transform this market into something even more static but to increase mobility, for Newton’s sake! Sure, some postdocs may realize too late they don’t really want to be independent and they would gladly keep doing what they are doing for some more time: this is what positions in industry are for², and this is what a lab tech position is for. No need to invent new names for those jobs.
So, here I propose an alternative solution: what about giving postdocs the chance of being independent, without necessarily being bound to running a 4 people lab to start with, or without the need to hold a tenure position? What about redistributing resources so that current PIs will have a smaller lab so that 1 or 2 more people somewhere else could have the chance to start their own career? Isn’t this more fair?
I wrote about this before, so I won’t repeat myself: in short, the big lab model is not sustainable anymore and it is not fair!
The problem, Jennifer, is not that postdoc want to stay longer in the lab: the problem is that they want out!
1: a recurrent question in the new Open Science society is “should scientists be blogging?“. My answer is yes, definitely (in fact, that’s what I am doing) but I don’t expect them to blog about their opinion on the last paper in their field. I don’t think that is so useful, actually. I’d rather have them talk about their daily life as scientists and speak freely and loudly about controversial issue.
2: My wife is one of them: she realized she didn’t want to have anything to do with academia anymore and she moved to industry where she actually got a salary that was more than twice the one she was getting in the University doing pretty much the same job, without worrying about fellowships and competition. She has never been so happy at work, too.
Prepare to jump. Jump.
As my trusty 25 readers would know, a few months ago I made the big career jump and moved from being on the bench side of science to the desk side, becoming what is called a Principal Investigator (PI). As a matter of fact nothing really seems to have changed so far: I hold a research fellow position at Imperial College, meaning that I am a one-man lab: I still have to plan and execute my experiments, still have to write my papers and deal with them, still have to organize my future employment – all exactly as I was doing before.
However, starting your own lab is still a formalization of walking with your own legs and, as such, one must be prepared to encounter new challenges. Unfortunately no one really ever prepared me to this: we spend a great deal of time as PhD and Postdocs learning skills that not necessarily will help for the next steps and when the moment comes to be really independent, a lot of people feel lost in translation. This may bring frustration in the PI (who find themselves completely unprepared for the new role) and in their students (who find themselves led by someone who is completely unprepared for their role). I saw this happening countless times.
Scared by the idea of ending up like this, I actually started thinking about how things would evolve quite some time ago. It’s easy: you just take inspiration from PIs around you. You start with all those who work in the same institute or department, for instance. And you try to figure out what they do right and what they do wrong, and learn by Bayesian inference: I like that, I don’t like this, I want to be like that, I don’t want to be like this. If you are more of a textbook person, you can also get yourself one of those “How to be a successful PI” guidebook; they are particular popular in the USA and some people find them helpful. Did that too, found it a bit dumb.
Finally, there is a third strategy you may want to follow and that is: find inspiration and stories of success in people who are doing things completely different from what you do. The rational of this strategy lays in the assumption that certain people will be good in what they do, no matter what that is. They have special skills that make them succesful, whether they are running a research lab or a law firm or a construction business. A good gymnasium (in the greek sense of the world) to get in touch with such people is the entrepreneur world. There are several analogies between being the founder of a, let’s say, computer startup and being a newly appointed PI. Here are some examples out of the tip of my head:
If you are not yet convinced about this, read this essay by angel investor Paul Graham titled “What we look for in founders“. If I were to substitute the world “founder” with “scientist”, you would not even notice.
These are the reasons why a couple of years ago I started following the main community of startup founders in the web, hackernews. It’s a social community composed of people with a knack for entrepreneurship – some of them extremely succesful (read $$$ in their world). Most of them are computer geeks, which is good for my purposes as it is yet another category of people who share a lot with scientists, namely: social inepts who’d love to improve their relationship skills but dedicate way too much time to work.
So the question now is: what did I learn from them? To begin, I reinforced my prejudice: that scientists and entrepreneurs have a lot in common and that certain people would be succesful in anything they would do. This is a crucial starting point because you’ll find that there is way more information on how to be a succesful entrepreneur than how to be a succesful academic – I still don’t have a good explanation on why it is so, actually. The moment you accept that, your sample case just grew esponentially and you have much more material for your inference based learning. I am no longer just limited at taking inspiration from other scientists, but also succesful companies. This is actually not so obvious to most people. For instance, every now and then a new research institute is born with the great ambition of being the next big thing. The decide to follow the path of those institutes who succeded in the past, assuming there is something magic in their recipy and because the sample set is limited they always end up naming the same names: LMB, CSHL, EMBL, Carnegie… Why nobody takes Google as an example? Or Apple? Or IBM? I am actually deeply convinced that if Google were to create a Google Research Institute, they would be amazingly succesful. They have already made exciting breakthrough in (published!) research with Google Flu Trends or Google Book Projects. If they were to philantropically extend their research interests to other fields, they’ll make a lot of people bite their dust (I’d kill to work at a Google Research Institute, by the way. wink wink.).
Five examples of relevant things I learned by looking at the entrepreneur world.
1. Talking about Google, I found extremely smart their philosophy to incentivate people to work 20% of their time on something completely unrelated to their project. Quoting wikipedia:
As a motivation technique, Google uses a policy often called Innovation Time Off, where Google engineers are encouraged to spend 20% of their work time on projects that interest them. Some of Google’s newer services, such as Gmail, Google News, Orkut, and AdSense originated from these independent endeavors. In a talk at Stanford University, Marissa Mayer, Google’s Vice President of Search Products and User Experience, showed that half of all new product launches at the time had originated from the Innovation Time Off.
The irony behind this, actually, is that I am willing to bet my pants that this idea was in fact borrowed from academia: or better, from how it should be in academia but it’s not anymore.
2. Freedom is the main reason why I chose the academic path and I find people who know how to appreciate freedom (and make it fruitful) very inspirational. See for instance this essay by music entrepreneur Derek Sivers on “Is there such a thing as too much freedom?” or his “Delegate or die“.
3. On a different note, I appreciate tips on how to deal with hiring people. See for instance “How to reject a job candidate without being an asshole“. I wish more people would follow this example. Virtually no one in academia will ever tell you why you didn’t get their job, even though it’s every scientist’s duty to give direct straight feedbacks about other people’s work (it is in fact the very essence of peer reviewing!). I was on the job market last year for a tenure track position and it was a very tough year, in terms of competition. The worst ever, apparently. Each open position had at least 100 or 200 applicants of which half a dozen on average were then called for interview. I had a very high success rate in terms of interviews selections, being called to something like 15 places out of 50 applications sent. Many of them happened to be the best places in the world. In many of them didn’t work out and NONE of them offered any kind of feedback on the interviewed applicants. NONE of them actually took the time to say “this is what didn’t convince us about your interview”. What a shame.
4. I am not that kind of scientist who aim to spend his entire career on one little aspect of something; I enjoy taking new roads (talking about freedom again, I guess). So companies like Amazon or Apple, constantly changing their focus, are of great inspirations.
5. Startup founders know two unwritten rules “Execution is more important than the idea” and “someone else is probably working on the same thing you are”. Read about facebook story to grasp what I am talking about. Here’s is also well summarized (forget point 3 though, that doesn’t apply to science I believe).
6. Finally, as someone who starts with a tiny budget and who has a passion for frugality, I found the concept of ramen profitability very interesting: think big, but start small. That’s exactly what I am doing right now.