Thursday, 17 March 2016

Why biology is so hard! The 'peculiarly difficult position' of the Biologist: an analysis of Zinssers' view of the sciences.

This essay was submitted in partial fulfillment of my degree of Bachelor of Science (Honours), Department of Zoology, The University of Western Australia (June 2001). I recently was talking about this with a colleague and I thought I would share it. It's a long, but hopefully interesting read about why being a biologist can be more difficult than a chemist or a physicist. 

Hans Zinsser
Hans Zinsser
Hans Zinsser (1947) presents in his book; Rats, Lice and History, a bibliography on the virus causing typhus fever. The first three chapters, however, present more of a protest against the "American attitude" wherein the author insists that a specialist should have no interests beyond his chosen field. In presenting this view Zinsser compares biologists to chemists or physicists and makes an interesting quote (Zinsser 1947, p. 13)      "The biologist is in a peculiarly difficult position. He cannot isolate individual reactions and study them one by one, as a chemist can. He is deprived of the mathematical forecasts by which the physicist can so frequently guide his experimental efforts. Nature sets the conditions under which the biologist works, and he must accept her terms or give up the task altogether".

The ‘difficult position’ to which Zinsser (1947), and also the subject of this essay,  was that of accounting for the complexity in, and the inherent difficulty of studying biology when compared to the other sciences such as chemistry or physics. This is not to say that the fields of chemistry or physics are simple, as these fields are anything but. However Zinsser (1947) suggests certain problems exist when studying biology compared to the other sciences in the above quote, and are the focus of this essay.

The first problem identified by Zinsser (1947) is that a biologist cannot isolate individual reactions. Chemistry involves processes whereby species react to form products, and these can be easily explained by individual reactions or, in more complicated chemical systems, by a series of reactions. Biological systems, such as an animal, may display two major problems when trying to isolate chemical reactions as a chemist does, although it is not clear to which one Zinsser (1947) referred within the quote. The first is the inherent difficulty in isolating specific reactions. Each animal is a complex system of inter-relating macromolecular structures, substrates and enzymes; isolating a single reaction within this system is not easy. However it is not impossible and some biologists, for example Krebs, have formulated complex detailed chemical reactions to explain biological processes.
This process can be related to the second problem in isolating chemical reactions within animals. 

Duck of Vaucanson
This is the idea of reductionism versus holism and whether it is possible to reduce a complex organism down to chemical or even physical explanations. Although there are still reductionary biologists there is much debate about whether the results obtained by such a study can ever really describe a complex biological system. Reductionism is the practice of explaining the properties of whole organisms entirely by the properties of the parts that compose them (Mohr 1989). This usually involves two steps 'analysis' –the breaking down of complex systems into manageable components, and 'synthesis' –the relation of the parts, such as their spatial and temporal ordering and the way that they interact. For example a society or community of animals (such as ants) can be broken down into single organisms (such as a worker ant). The organism can then be further broken down into organs or appendages (eyes, brains, gut, reproductive system, Malphigian tubules etc) which are further broken down into cells, the cells into cell organelles, cell organelles into macromolecules, macromolecules into molecules, molecules into atoms, atoms into subatomic particles.

The reductionist approach implies that all complex systems consist of smaller and simpler parts. Moreover, it is assumed that complex systems originated from simpler systems in the course of universal evolution. Where evolution is considered a deterministic process, governed by causal laws (Mohr 1989). It emphasizes whether and to what extent a proposition, a theory , or a whole branch of science can be reduced to another proposition, theory, or branch of science. Reduction is tempting since it satisfies one of the great desires of the scientist -to have unifying theories with a wide scope. However there are problems associated with reducing these complex systems, and dividing them up into simpler ones. The concept of 'emergences' arises since the sum of the parts is not always equal to the sum of the whole. In fact, very few systems can be thought of, or represented as additive functions of the properties of it's constituent parts, it is the functional relationship between these parts that matters (Medwar and Medwar 1983). 'Complexity' in biology is due to the particular interactions of the parts (such as the molecules inside the cell, or the cells within the organs etc). At higher levels of complexity there are properties that cannot be described, or predicted in the lower levels. For example, at present analysing the organs of an ant could in no way predict the complex social system the ants portray, similarly doing so (analysing organs) in humans could not predict the possession of a conscious mind. These are called 'emergent' properties, and may well be considered a necessary property to the natural system in which it develops. However, for the biologist 'emergent properties' means limits to reductionism. To ignore emergent properties at the different levels of complexity to maintain maximum reducibility would mean to ignore the richness of the animal world. Thus a living cell cannot be explained in terms of its parts but only in terms of the organisation of those parts. Although the whole is nothing but the parts put together, it is the 'putting together' that makes the cell and this cannot be accounted for by the parts themselves (Mohr 1989).

Emergent properties of termites
For chemical and physical systems reductionism is also an important part of research. A typical example is the creation of theories of great generality such as quantum mechanics or the theory of relativity. Most (but not all) atoms seem to be ruled by known principles or equations such as Maxwell's equation or the Schrödinger equation. Equally large chemical complexes can be reduced down to smaller complexes, smaller complexes to atoms. Whether emergence exists in chemistry is not clear, if one was to consider a large molecule, could it's properties be predicted by studying the individual atoms? Take for example a typical hydrocarbon, consisting of carbon and hydrogen molecules. Adding a carboxyl group (by attaching an =OH molecule to the carbon) will almost always make the molecule behave like an acid (except in large hydrocarbons where it's properties will be governed by Van Der Wels forces). There are whole fields of chemical engineering that are based on the fact that the actions of molecules are the sum of its parts. But there are still examples that are much too complicated for computations from principles. Physics can still not explain the behaviour of uranium or even oxygen. Is this an example of emergence within chemistry? It is not known whether this is an example of emergence, or an example of our lack of understanding of the atoms. For example, if more was known about the movement of electrons around the atom and the interaction they have with other atoms within the complex, then one may be able to predict the properties of the complex more precisely (although a similar argument could be used in biology).

However, a major difference between the sciences is the degree to which a system is reduced (ie from the highest (most complex) level to the lowest. (least complex) level). Biological systems can be reduced many more times than can a chemical or a physical system. The difference in the amount each system is reduced for analysis may influence the number and effect of emergences. The number and the extent of the examples in biology of emergence coupled with the multitude of levels throughout which the complexity of biology is reduced when compared to the other sciences may suggest that emergence will have a greater effect in biological systems. This may lead to doubt, and a decrease in the predicability in biological systems.

Hence many philosophers of biology e.g. Wuketits (1989) have concluded that biology requires an 'organism-centred' view of life. Thus, unlike chemical or physical systems, to examine biological systems a 'holistic' approach must be taken by biologists. As the zoologist Ritter quotes "the organism in its totality is as essential to an explanation of its elements as its elements are to an explanation of the organism" {Beckner 1967). Holism was greatly developed by Bertalanffy in his General Systems Theory (Bertalanffy 1968). Holism suggests that neither whole determines the parts nor the parts determine the whole but that a complex interaction between the parts and the whole is to be supposed. Bertalanffy's theory has influenced biology as well as other sciences, and it shows some of
the differences between the sciences.
It can be summarized as follows;

(1) The whole (of an organism) is more than the sum of its parts.
(2) Living beings are open systems, ie non-equilibrium systems. Physics traditionally
deals with closed systems, ie equilibrium systems.
(3) Living systems are not static systems; they are regarded as continuous processes.
(4) Organisms are homeostatic systems; any living system represents a dynamic
interplay at all levels of its organization.
(5) Organisms are hierarchically organized systems. Any organism is structured in a
way so that its individual members (organs, cells) are 'super-systems' of other
elements or levels of organization.

So the biologist is in a difficult position where he must consider all level of complexity of
an organism. To study biology successfully he must examine the parts of an organism, the
whole of the organism and the interaction of these two, to completely understand any biological system. This task is not easy and carries with it other difficulties such as methodology and whether this is actually possible in some species. One tends to agree if one imagines a huge complex network, we can understand that isolating a pattern in this complex network by drawing a boundary around it and calling it an object will be somewhat arbitrary.

A second problem broached by Zinsser (1947 p. 13) is that "Nature sets the conditions under which the biologist works". This is similar to the above problem of reductionism, that each organism is a complex interaction of the whole and the parts of an organism, and whether an organism can be studied outside this network. Traditionally biology was more evidence based where observations were made in the field and inferences were made from these observations. However an aspect which renders biologists different from chemists or physicists is that we ask the question "what for"?
"What for" is not asked by chemists or physicists because there is no answer that makes sense, an electron spins around a ball of protons and neutrons, what for? But asking that question in biology is not so irrelevant. This question, however, inevitably leads to intervention in biological systems to answer it.

Intervention by biologists is typically performed in two scenarios: in the field and in the laboratory. Both carry their advantages, but unfortunately both also carry disadvantages. For the Chemist or the Physicist the decision is easy, the laboratory provides the adequate arena for scientific discovery. The lab provides an environment where physical conditions such as temperature and pressure can be controlled; and thus for the chemist experimentation couldn't be easier (although having had experience as a chemist this is somewhat of an understatement). The biologist faces other considerations, in that some laboratory experiments may produce results not representative of the organism in its natural environment. For example, when testing physiological performances of lizards sprint speeds and endurance are usually tested in the laboratory. Lizards are run along a motorised treadmill till exhaustion to measure endurance or along a race track, to measure maximal running speed. These data then used to compare lizards and the differences attributed to Darwinian selection on the animal, assuming that the animal runs that fast or can run for so long because it has been selected to. However, selection acts most directly on what an animal does in nature, its behaviour. Performance, on the other hand, as defined by laboratory measurements, generally exhibits an animals ability to do something when pushed to its morphological, physiological or biochemical limits. Whether animals routinely behave at or near physiological limits under natural conditions is an important empirical issue. Some data (see Garland and Losos (1994 p. 24) for a comprehensive list) suggests that animals do not behave at their limits in nature, and "close encounters of the worst kind" between predators and prey where an animal may be forced to behave at or near its physiological limits are few and far between (Christian and Tracey 1981, Jayne and Bennett, 1990). This reflects the reductionism problem, where an animal is reduced from its social and environmental surroundings and thus some aspects of its behaviour cannot be predicted accurately. Hence the need for a holistic view on the organism which can be best achieved by performing experiments in the natural environment.

Red necked Pademelon
Environmental experiments are all but unknown to physicist and to a lesser degree to chemists. These are usually performed by intervening with animals in the natural environment, however the problem that this creates is the lack of controls. For example consider the hypothetical example of the red-necked pademelon (Thylogale thetis). Wahungu et al. (1999) examined the effects of browsing by the pademelons on shoots of rainforest plants. They tested this idea by planting four shoots from each of nine local rainforest plant species and four clover seedlings, in twelve quadrats along two transects. All the shoots in one of the transects were excluded from pademelon browsing by erecting 1.0 x 1.0 x 0.5m high cages of 20mm mesh over each of the quadrats in that transect. Shoots from the other quadrat were left exposed. Will this experiment test pademelon browsing? This method does not account for other species that may feed upon the shoots, within the open transect –but like the pademelon are also excluded from the caged quadrats. The feeding behaviour of the pademelons may also be altered by the presence of multiple shoots within a small area, the pademelon may feed on many more different species of shoots then it would normally since they are now closely available in larger quantities than may normally be available in nature.
Similarly we may have approached this problem in many other ways. We might begin by looking at the plants that this pademelon primarily eat. But this may not account for indirect effects, ie the pademelon eats plant A, however plant B is aided/disadvantaged by the absence of plant A (Plant A may compete with plant B for sunlight and the absence of plant A increases the abundance of plant B or it may be symbiotic with it were the presence of plant A aids the growth of plant B conversely a reduction in the abundance of plant A may cause a similar reduction in the abundance of plant B) and thus the while observations may suggest the pademelon affects only plant A the full effect is not known. Another method might be to look at vegetation in areas inhabited by the pademelon and compare these to areas not inhabited by the pademelon, examining the differences. The problem this causes is that it does not account for changes for differences in climate or other species at the different locations - even if these are known they could not be controlled for.

The third problem addressed by Zinsser (1947 :p. 13) is presented by the quote "He is deprived of the mathematical forecasts by which the physicist can so frequently guide his experimental efforts". Newton showed that mathematical descriptions give us insight into the nature of things. However, our mathematics has been mostly limited to simple systems with linear interactions. This corresponds to systems with few pieces that do not interact strongly with each other. But the biological world as we have seen above consists of anything but, it is filled with systems that have many pieces that strongly interact with each other. These systems are usually described as fractals or chaotic systems. 

Fractals are usually defined as objects or processes whose small pieces resemble the whole, while chaotic systems are those with output so complex it mimics random behaviour (Liebovitch,1998). Fractals have several properties that distinguish them; self-similarity, scaling, and certain statistical properties. Self -similarity (or more accurately statistical self -similarity) can occur in biological systems where little pieces of an object are similar to larger pieces. Many of these show self-similarity within space. For example, there are self-similar patterns in the branching of the arms (dendrites) of nerve cells. Larger arms break up to from smaller arms, which break up to form smaller arms and so on. At each stage the pattern resembles the one before it. 

Other examples of self -similar patterns in space include the arteries and the veins of the retina, the tubes that bring air into the lungs, and the tubes (ducts) in the liver that bring bile to the gall bladder. Many body surfaces in the body have self-similar undulations with ever finer pockets or fingers. These ever finer structures increase the area available for the exchange of nutrients, gasses, and ions. These surfaces include the lining of the intestine, the boundary of the placenta and the membranes of cells: (Liebovitch 1998). Some biological systems can also be self-similar in time. Ion channels, are proteins in the cell membrane with a central hole that allows ions passage in or out of the cells. These proteins can change in structure, closing the hole and blocking the flow of ions. The small electrical current due to these ions can be measured in an individual ions channel molecule, and is high when open and low when closed. When a recording of current is played back at low time resolution, the times during which the channel was open and closed can be seen (see Figure 1). When one of these open or closed times is played back at higher time resolution, it can be seen to consist of many briefer open and closing times. The current through the channel is self -similar because the pattern of open and closed times found at low time resolution is repeated in the open and closed times found at higher time resolution (Liebovitch, 1998). Other examples of temporal fractals may include the electrical signal generated by the contraction of the heart or even a cell multiplying over time. 

Current through ion channels (From Liebovitch 1998)
The trouble this creates for the biologist is that there is no unique 'correct' value for a measurement. The value used to measure a property, such as length, area or volume, depends on the resolution used to make the measurement. Measurements made at different resolutions will yield different values. This means that the differences between the values measured by different people could be due to the fact that each person measured the property at a different resolution. Hence, the measurement of a value of a property at only one resolution is not useful to characterise fractal objects or processes. Instead we need to determine the scaling relationship. The scaling relationship shows how the values measured for a property depend on the resolution used to make the measurement. For example the surface area of a cell will increase as the magnification used to examine the cell increases. This now requires the biologist to measure many values at different resolutions.

Fractals also present statistical problems for the biologist. The statistical knowledge of most scientists is limited to the statistical properties of Gaussian distributions. Fractals do not have the properties of Gaussian distributions. In order to understand the many fractal objects and processes in the natural world, the biologist is required to learn about the properties of stable distributions. The variance of fractals is also usually large, and increases as more data are analysed. 

For example Luria and Delbruck (1943) wanted to determine whether mutations were: (1) occurring all the time but are only selected when there is a change in the environment or (2) occurring only in response to a change in the environment. To test this they let a cell multiply many times and then challenged its descendants with a killer virus. If the mutations occur all the time, then by chance, some cells will become resistant to the killer virus before it is given to them. This resistant cell will divide and give rise to resistant daughter cells in subsequent generations. If the resistant cell is produced early on, it will form many resistant daughter cells. If it is produced latter on it will not have time to produce many resistant daughter cells. Each time the experiment is run the mutations will occur at different times. The variation in the timing is amplified by the resistance found in the daughter cells. This results in a large variation in the final number of resistant daughter cells when the experiment is run many times. If the mutations occur only in response to the virus, then by chance, some cells will become resistant to the killer virus when it is given. However in this case they will not have time to produce many resistant daughter cells: Thus there will only be a small variation in the final number of resistant cells when the experiment is completed. Luria and Deldruck (1943) found that there was a large variation in the number of resistant cells, thus they concluded that mutations occur all the time. 

This example shows how variance in a fractal system (the dividing of the cells) will be a large number. Knowing this, it is of interest to determine if the variance does or does not have a finite, limiting value. This can be done by measuring how the variance depends on the amount of data included. If the variance increases with the amount of data included, as it does in the Luria and Deldrucks (1943) experiment, then the data have fractal properties and the variance does not exist. The trouble is that we do not know how to perform statistical tests to determine if the parameters of the mechanism that generated the data have changed from one time to another or between experiments run under different conditions. The statistical tests available are based on the assumption that the variance is finite. These tests are not valid to analyse fractal data where the variance is infinite (Liebovitch, 1998). 

Like fractals, chaotic systems are numerous in biological systems. Chaos is defined as complex output that mimics random behaviour generated by simple, deterministic system (Liebovitch 1998). The opening and closing of ion channels, electrocardiogram (ECG) of heart beat pulses, ectroencephalogram (BEG) electrical recording of the nerve activity of the brain and even epidemics of measles are all examples of chaotic systems. We are used to thinking that the variability found in biological systems is due to mechanisms based on chance that reflect random processes. Thus attempting to classify systems as chaotic or random can be very difficult. Although techniques, developed by the mathematician Poincare around the 1900s,  where data measured in time can be transformed into objects in space, called 'phase space', by a processes called 'embedding', make such classification easier. The major problem is that data generated chaotic system, even if they can be identified as such, are so complex, analysis of data using current mathematical methods is extremely difficult {Liebovitch 1998). 

Besides the complexity of the output from these systems other problems also exist when dealing with them. If we re-run a non-chaotic system with almost the same starting values, we get almost the same values of the variable at the end. However, if we re-run a chaotic system with almost the same starting values, we get very different values of the variables at the end of the experiment. This is called sensitivity to initial conditions. Chaotic systems simply amplify small differences in initial conditions into large differences. This makes it extremely difficult for the biologist to control for an experiment. Even a small change in experimental method such as the time of day, slight variation in temperature or concentration of a substance could lead to different results. This may explain the large variation found in the results of biological experiments especially as the complexity of the system increases. 

Some chaotic systems also exhibit a property dubbed bifurcation. Bifurcation occurs when the value of a parameter (a certain property of the system) changes by a small amount, but there is a large change in the behaviour of the system (Liebovitch 1998). This can reduce the predictability of systems. For example Glycolysis, the process that transfers energy from sugar to ATP, exhibits bifurcation. There are numerous reactions in glycolysis. The  overall speed of the reaction is set up by two steps that involve enzymes. Each enzyme speeds up one important reaction. The products produced by each of these reactions also affect the enzyme activity. Thus there is positive and negative feedback control in this reaction system. Markus and Hess (1985) studied what would happen if the input of sugar into these biochemical reactions happened in a periodic way. They found that for some  frequencies the ATP concentration fluctuated in periodic way.  For other frequencies, the  ATP concentration fluctuated in a chaotic way. Only a small change in input was required to produce a sudden change in behaviour from periodic to chaotic fluctuations. This sudden change of behaviour as a parameter is varied is termed a bifurcation. We are used to thinking that small changes in parameters must produce similarly small changes in the behaviour of the system. This intuition is based on our experience with linear systems (common in physics and chemistry) and is not necessarily true for non-linear systems (common in biology). The behaviour of a non- linear system can change dramatically when there is only a small change in the value of a parameter. Biological experiments with similar experimental parameters can sometimes produce markedly different results. Biological effects do not always depend smoothly on the values of the experimental parameters. For example, the biological effects of electromagnetic radiation occur within a set of distinct 'windows' in the amplitude and the frequency parameters of the radiation supplied. 

It may be easy to think that much of what we study can be interpreted in different ways or can never be proven; but in this fact we are not alone. Even Einstein was quoted saying his theory of relativity could never be proven. This essay does not aim at decreasing or putting down the relative worth of biology as a science. Instead it aims at expressing the intelligence and achievements of biologists who have managed to achieve so much with so many odds against them. Zinsser also strongly expresses the need for scientists in general to have abroad range of interests rather than being specialised in anyone particular field. 

Perhaps it was Darwin’s interest in Geology, particularly in the works of Charles Lyell, who suggested the earth may have evolved to its present state, that smoothed the path for Darwin to accept evolution in animals (although Lyell did not at first accept Darwin’s views after publication of the Origin of the Species). T.H. Huxley, a friend of Darwin, latter wrote "I cannot believe that Lyell was for others, as for me, the chief agent in smoothing the road for Darwin". 
It may be this ability of biologists to draw from different fields of art, science or even philosophy that makes biology such an exciting subject. Since many biologists believe and Zinsser states "whenever he (the biologist) attacks a problem -that before he can advance toward his objective, he must first recede into analysis of the individual elements that compose the complex systems with which he is occupied". This is perhaps one of the fundamental differences between biology and the "exact" sciences. 


Beckner, M.O. (1967) Organismic biology, in P. Edwards (ed.), The Encyclopedia of Philosophy, Vol 5, MacMillan, New York.
Bertalanffy, L.von (1968) General System Theory: Foundations Development, Applications, Braziller, New York.
Christian, K.A. and Tracey C.R. (1981) The effect of the thermal environment on the ability of hatchlings Galapagos land iguanas to avoid predation during dispersal. Oecologia 49: 218-223.
Garland, T and Losos,  J.B. (1994) Ecological morphology of locomotor performance in sqarmate reptiles. Pp 240-302. In: Functional Morphology: Intergrative Organismal Biology (eds P.C. Wainwright and S.M. Reilly). University of Chicago Press, Chicago.
Jayne, B.C. and Bennett, A.F. (1990) Selection of locomotor capacity in a natural population of garder snakes. Evolution 44: 1204-1229.
Liebovitch, L.S. (1998) Fractals and Chaos: Simplified for the life sciences. Oxford University Press, New York.
Luria, S.E. and Delbruck, M (1943) Mutations of bacteria from virus sensitivity of virus resistance. Genetics 28: 491-511.
Markus, M., Kuschmitz, D., and Hess, B. (1985) Properties of strange attractors in yeast glycolsis. Biophys. Chem. 22: 95-105.
Medwar, P.B. and Medwar, J.S. (1983) Reductionism, In A Philosophical Dictionary of Biology, Harvard University Press, Cambridge, Mass.
Mohr, H. (1989) Is the program of molecular biology reductionist? In Hoyningen-Huene P. and Wuketits, F.M. (eds) Reductionism and Systems Theory in the life Sciences. Kluwer Academic Publishers, London.
Wahungu, G.M., Catterall, C.P., and Olsen, M.F. (1999) Selective herbivory by red-necked pademelons Thyloggale thetis at the rainforest margins: factors affecting predation rates. Australian Journal of Ecology, 24: 577-586.
Wuketits, F.M. (1989) Organisms, vital forces, and machines: classical controversies and the contemporary discussion ‘Reductionism vs. Holism’. In Holyningen-Huene, P. and Wuketits, F.M. (eds) Reductionism and Systems Theory in the life sciences. Kluwer Academic Publishers, London.
Zinsser, H. (1947) Rats, Lice and History. Little, Brown and Company, Boston

Tuesday, 29 December 2015

making gifs from video files in Matlab

This is an update to a previous post. The previous post is below, edited to suit the new code which runs in matlab. there is a link here to the new code which was co-written with David Solletti.

How to convert and resize an AVI to gif in matlab

If you are giving a presentation, and you don't have awesome videos in it, you are either a 60 year old well renown expert in your field, or you are just plain mean. Videos are the highlight of any talk, the trouble is, they are often large, slow and have unpredictable issues when it come to finding the correct path file, since they always seem to be looking for some inaccessible folder, on a different computer, often hundreds of miles away. Then there you are, onstage, the video doesn't work, suddenly you have an angry crowd of caffeine fueled scientists wanting your open your skull to feast on the gooey stuff inside....

"Oh no, Dr Christofer" you say, "how do i overcome these problems?"

The answer is you use gifs! Gifs are without a doubt my new favourite format for showing moving images. So much better than videos, and only second to interpretive dance, which infact i did see one jerboa expert perform infront of a crowd of scientists. But if, like me, your interpretive dance skills are somewhat lacking you need the power of gif
How can you harness this power? Well, they can be made quite simply using the free ware program GIMP, but i had a few issues with this, particularly when it came to resizing my images. Plus it also meant getting a second program to extract individual frames from the movie. A better way would be to do both steps in matlab. 
I looked on file exchange, and found some code called avi2gif.m but this seemed to use the 'aviread' function which didnt work in my version of matlab 2012a. Plus it also didnt let you resized your image or make it faster (you can only increase the delay between frames). Both are important if you want to get the file size down really low (for example only takes gifs < 2mb)

the new code can be found here

one important feature of the code, is the ability to reduce the frame number. Below is an example of this process. 

anyway, that is my cheap and nasty code which worked for me. An important point to remember is the line "k = 1:2:nFrames etc" cuts out every other frame. I found if i did not do this, then the gif would run really slow. This might be an effect of using high speed film to make the videos. For example, this gif below was made using frameskip = 1

if it was any slower, we would have to use some sort of geological clock to time it by. Seriously it seems like that slow kid at school, who sat around eating glue all day.

so i used frameskip = 2

bit quicker but still its gonna run for a painfully long time when you are standing infront of a crowd trying to imagine yourself in everyones underwear

frameskip = 4

works much better - seems smoother

Well let me know if you have any improvements comments or suggestions, and i look forward to seeing many gifs in the upcoming conference in portand!

Sunday, 29 November 2015

Echidna Biomechanics

Ever wonder what an echidna does with all its time? 

The echidna (Tachyglossus aculeatus) is a spiny ball of monotreme that looks something like this. Those spines are sharp mind you, and often leave a weird irritating/itchy marks on your skin after they stab into you. Given that its close relative the Platypus (Ornithorhynchus anatinus) has poisonous spurs on its hind limbs makes me wonder whether those spines aren't filled with something nasty. My point is that pretty much nothing is going to try to eat an echidna. Some germans once wrote a paper on what happens when you do. They came across the body of one of Australia's top predators, and one of my favourite animals, the Perentie (Varanus giganteus) which had the brave, yet somehow transparently stupid idea, to attempt eat an echidna whole and had in doing so met its own demise.

The photo is from Kirschner et al. (1996),
 Darren Naish's blog . 
The perentie had come across the echidna (dead or alive?) and had tried to eat it but the spikes had pierced its throat, and it wasn't able to neither swallow, nor eject the echidna from its mouth. Its not clear what actually killed the lizard in the end (starvation maybe?) but its likely it had some time to reflect on this, and no doubt many other decisions it had made throughout its long life of being lizardy and awesome. I actually think this specimen is on display in the Queensland Museum.

So the echidna is pretty much invenerable to predation, and presumably also asteroid strikes, lasers, paper cuts and anything less than a direct thermonuclear attack. So the question then arises, if you have nothing to fear what do you spend you afternoons doing? Hanging out by the local tree hollow? finding only the finest and tastiest termites available? The question, I am sure, has sometimes kept you up at night. Infact the question is all the more important when you consider that these little critters, with an Australia wide distribution, spend much of their time digging up the ground after termites, and in doing so move quite a bit of dirt. How much? No idea, but enough that these guys can start to change the profile of the landscape, putting them in that neat category of animals called ecosystem engineers. So if they are moving a bunch of dirt around, we ought to know about it.

To answer this question I teamed up with two echidna researchers, Christine Cooper (Curtin), and my old PhD supervisor Phil Withers (UWA). They were looking at the thermoregulation in echidnas (which is interesting in itself, since they are half mammal half lizard, white hot balls of spikey terror) - which was a great opportunity to test out some sensors I had been working on. When I say I was working on them, I mean another academic Phil Terrill from the school of engineering at UQ was working on them. I had originally anticipated using these sensors on some large varanid lizards, but it turns out that lizards are a giant pain in the ass to work with since they seem to travel forever, in no apparent direction, and bury themselves under piles of trees, rocks and dirt which make retrieving the sensors a little harder. Echidnas would surely be easier.

So I set off back to WA, to a small patch of bush called Dryandra Woodland, which was known for two things. Spikey trees called Dryandra, and spikey monotremes called Echidnas. They certainly are easier to catch than lizards, and to my best knowledge nobody in the history of the universe has been bitten by one. That seemed all well and good, so we strapped the accelerometer sensors, some temperature sensors, a GPS and a radio tracker onto the back of these echidnas, and let them go again, safe in the knowledge that we could retrieve them at our hearts desire, gather the data, replace any batteries, and set them off again.

It would be a week long peek into the private life of an echidna. 

Turns out life is of course not that simple, our echidnas, likely pissed at our decorating them with sensors, antennas, and what not, retreated to the deepest and darkest caves humanly possible, only to emerge in the hours of the darkest nights, where they would attempt to evade capture by three sleepy
and exhausted scientists.

They were very nearly successful and many nights we were forced to climb into their lairs to change the batteries on their back, or change sensors over. But in the end we did get some data, and since this is a biomechanics blog we are going to focus on the biomechanics data. The first and most important thing i did before releasing the echidnas was to perform the sacred ritual among biomechanists, the 'Calibration dance'. This dance has many forms, each unique to the scientist that devises them. They have, in my observations as a biomechanist, two equally important and fundamental functions. Firstly, they must relate the position and movement reference frame to a recording cameras, this would also be important for synchronising accelerometer signals to the cameras later. And secondly, some might argue more importantly, they must make the person performing the calibration dance look as ridiculous as possible. And so it was with great fortune that I was able to convince my co-researcher Christine Cooper to perform this sacred dance with the echidnas.

Click to make Christine bigger

From this I could synchronise the camera to other activities, which we observed as the echidna performed, during its daring, yet slow and indecisive attempts, to escape from us once re-released. We got walking


And in rare cases climbing

We then divided the echidnas day in 30 second chunks, and used these signature accelerometer traces to assign to each short interval of time to a particular activity and in doing so work out exactly what the echidna was doing with its day.

And what does an echidna do with its day?? 

It turns out not much. Many of our echidnas spend as much as 80% of their day hiding in rock caves, thinking about whatever it is that echidnas think about, ants probably.

But from these short periods of activity we were able to get some interesting biomechanical data. Analysing the chunks of time when it was moving, and running a simple fourier analysis allowed us to determine the stride frequency of the echidna at different periods of the day. With some knowledge of the stride length of the echidna, we should be able to work out things like speed during different activities, and more. This will all help us figure out the private life of echidnas.



Friday, 5 September 2014

Dissection of the hindlimb of monitor lizards: V. varius and V. komodoensis, Part 1 of 4, Superficial Dorsal aspect.

One of the major questions I am trying to determine in my research is how muscle and bone strains change with body size and habitat among Australia’s giant lizards the Varanids (aka monitor lizards aka goannas aka large uncooperative lizards).

When I first attempted to dissect the hindlimb muscle of monitor lizards I was amazed about how little information there was on the topic. In the end the two most helpful bits of literature was the Snyder paper from 1954, and the book chapter, The Appendicular locomotor apparatus of Lepidosaurs, by Russell and Bauer, (2008), in Biology of the Reptilia, Vol 21. 
Luckily I had a visit from muscle expert Taylor Dick, from Simon Fraser University Canada, and we were able to dissect some big lizards. 
As a guide to help anyone else who might also be silly enough to want to follow along this line of inquiry we have made a guide below to help you identify some of the major muscles in the lizard hindlimb. 

There will be 4 posts in total, this post will focus on the dorsal superficial aspect of the upper and lower hindlimb. 

Varanus varius: This specimen was freshly sacrificed, and the muscles are very clear and easily defined. Click on the video below for a walk through.  


Varanus komodoensis:  Dissection of the Komodo dragon. This specimen had been frozen for 7 years, so the separation of the muscles is a little bit more difficult. Click on the video below for a walk through.

Monday, 4 August 2014

Evolution of bipedal running

Awesome lizard shot by
Simon Pynt which
sadly the journal did not
want on its cover 
This week my paper on the evolution of bipedalism came out in the journal Evolution. This work is part of a long ongoing project understanding why these lizards sometimes run on two legs and sometimes run on four, and why Australian agamid lizards in particular seem to be so very good at the former. But to understand this we need a little bit of background into Bipedalism and why lizards are so weird.
Awesome picture of a dinosaur
I stole from the web. To make this blog
post look cooler.  

 Bipedalism (running on two legs) evolved independently many times, for example in hopping marsupials (like kangaroos), hopping placentals (like kangaroo rats), primates (like us), birds, dinosaurs, lizards, insects, and this awesome octopus! In birds, primates and dinosaurs the forelimbs appear to be used for something else so bipedalism makes sense, and hopping on two legs can save energy, but neither of these reasons seem to apply to lizards. Further I showed in an earlier paper that bipedal lizards are not faster, nor can they run for longer. So why are they doing it?

Well a dutch researcher called Peter Aerts actually suggested a different reason. Perhaps, he suggested, lizards were not trying to run bipedally on purpose, but rather they were trying to do something else, maybe they were trying to become more manoeuvrable. One way to become more manoeuvrable, is to shift all your mass backwards (which makes it easier to turn corners), and then accelerate quickly. Unfortunately for the lizards these things have a side effect, just like when a motorcycle accelerates too quickly, when a lizard shifts its mass backwards and accelerates too quickly, it can cause the front of the body to pop up, like its popping a wheelie. Seen in this light, bipedalism in some lizards might have been an accident, just a consequence of accelerating too hard, and this seems to match some of the data I have collected before on lizards. There is certainly an acceleration threshold where a lizard will pop on its two back legs, and a model produced by Peter Aerts even predicts when this should happen. And this model matches the data, for most lizards.

Another awesome dinosaur photo i stole from the web. Geez
these dinosaurs would have been so bad ass! 
The trouble is that some lizards seem to beat the model. Some lizards seem to be able to run for much longer and at lower accelerations than is predicted from this accidental model. Are these lizards exploiting bipedalism? taking advantage of the accident? This is actually not so unheard of in nature, infact it’s common enough that scientists gave it a name, they called it an Exaptation (to differentiate it from the perhaps more familiar adaptation). Exaptations are exciting since they show us another way traits can evolve. Infact one of the most common examples of exaptation is the evolution of feathers in birds. Feathers, which we now commonly associate with flight in birds, did not originally evolve for this purpose. Lots of recent reports have shown us that the origin of feathers predates that of birds and are present in dinosaurs, meaning feathers probably evolved for another reason, like keeping dinosaurs warm. It was only later that birds exploited these feathers to make their remarkable flying wings. So could bipedalism, like the feathers of birds, be an exaptation? This is what I set out to find.
Figure showing the evolution of the mass distribution
among lizards. Red means a backwards shift, blue forwards.
The bipedal lizards are marked with a red box.  

First I had to know, do lizards (and their ancestors) which run bipedally have their body mass pushed backwards, perhaps to try and become more manoeuvrable? I looked at this across 124 species of lizards, basically any lizard I could get my hands on from the Queensland museum, with the help of my student at the time Nicolas Wu, and I found yes indeed, the lineages leading to bipedalism had shifted their body centre of mass backwards.

Next I tested the model, I calculated (based on Aerts’ model) when lizards should go bipedal, and then ran these lizards a bunch of times to calculate the exact acceleration where they switched from four legs to two legs. As predicted some lizards matched the model quite well, but others were able to beat it, running bipedally sooner than expected.

This is one of the rare videos i got of a lizard transitioning from 4 legs to 2! 

Finally we looked at where these differences are greatest in the family tree of Australian agamids. We found the ones that matched the model best occurred very early on in the evolutionary tree, but as the tree branched out the differences became greater. New species were beating the model more and more. All this adds up to one thing, an exaptation. Bipedalism first appeared on the scene a long time ago, and those that ran bipedally did so only by accident. But at some point some lizards started exploiting this, running bipedally further and more often than expected, taking advantage of the consequence. This is exciting since not only are we seeing an exaptation happen, but it means that running on two lizards actually conveys an advantage to these lizards. Just what this advantage is thought, I have no idea…yet. 

Tuesday, 10 June 2014

Notes on running large lizards over forceplates

Taylor Dick, SFU (probably didn't expect
to be holding a lizard that big anytime
 during her stay).
Anyone who has had the misfortune of stumbling upon this blog, and particularly those who have suffered through many of its posts might have noticed that one of the main themes is determining how muscle and bone strains change with body size and habitat among Australia’s giant lizards the Varanids (aka monitor lizards aka goannas aka large uncooperative lizards). Recently I had convinced Muscle expert Taylor Dick from SFU to come to Australia to study these questions with the eventual goal of building a musculoskeletal model of these lizards in the open-source biomechanics software OpenSim. She had already endured one trip out to the Australian desert in order to catch these beasts, but more was yet to come.
Example output of the force plate
from a dragon lizard, A. gilberti
Force plate design, shown here without
a plate on the top. Photo probably taken
during one of its many repair attempts
The second part of this project was to simultaneously measure forces and kinematics of these lizards which would act as valuable input parameter for this model. To do this I had constructed a 15 meter long racetrack at the university, along with a custom made force plate which would be buried in the ground, for the lizards to run over. I will add more details on the forceplate later, but basically it consists of 4 octagon rings arranged at each corner of a metal plate. Each is capable of measuring forces in two directions vertical and horizontal, and by positioning octagons in adjacent corners at 90 deg angles to one another I was capable of measuring fore-aft, lateral and vertical forces. An added bonus of having 4 vertical force sensors in each corner is that I could accurately estimate the centre of pressure of the foot during the stride.
Taylor with probably not enough laptops

One of our uncooperative
My thoughts were that building the force plate would be the most difficult part of this project, and having already done so, I was under the ill-begotten conclusion that the hardest part was over. But yet, as always I had forgotten the type of lizards I was dealing with, and the kind of misfortune which befalls a scientist. We lost several days battling noisy electrical systems in the animal yards, and were forced to take several trips to and from the lab to repair the force plate which I had so loving crafted for lab work, but for which the real world with its various sharp protruding objects, it was no match. When we finally had a working system, two high speed cameras on a custom built scaffold, combined with the force plate, it seemed again the worst was over. 

trying to lead via example. 
We began running the lizards – and it was time for the lizards to shine. Yet by the end of several hours of work we had only a handful of useful trial. It seems the lizards, for reasons I can only assume are nefariously motivated, refused to step wholly on the platform. Instead preferring the mind-blowingly frustrating alternative of stepping neatly to one side of the force plate, or on the edge of the platform, such that while data temptingly appeared upon the screen it was utterly useless, since the proportion of the force directed onto the force plate could not be known.  

We attempted everything under the sun to encourage lizards stepping onto the forceplate, including doubling the size of the plate, halving the width of the racetrack, and painting it wholly black, such that it matched the surrounding carpet, and could not be mistaken for the presumably treacherous hazard it appeared, to be avoided at all costs. Yet none of these appeared to increase our success rate, which was as low as 1 in 30 runs. As can be seen in the video below

However, perseverance paid off, and by the end of the week we had collected over 60 successful trials, from these giant, largely uncooperative beasts. Below is a video of the rare and elusive, "successful trial"