Using light to describe the ancient world

 

R figures 2

Simulated Raman spectra representing two different datasets. Simulated spectra were generated using R.

 

Multivariate statistical methods are commonly used by researchers who study fossils with spectroscopy. Moreover, these methods are often performed with the free software language ‘R’. However, it can sometimes be a real challenge to assemble R code for a new stats method you are not overly familiar with. How do you know if your R code is working properly? Actually, the answer is pretty simple – just analyse a dataset that has a known outcome. For example, if the method is supposed to distinguish spectra into groups, then work with a dataset that contains different groups of spectra. Simple, right?

Well, it’s often the case that a good dataset is not easily available for simply testing code. My solution? Simulated data. The following lines of R code simulate two groups of Raman spectra that vary slightly within each group, and vary substantially between each group. This code will let you test a whole range of multivariate methods.

Code for generating two ‘random’ sets of Raman spectra (feel free to use, adapt and modify – attribution would be nice but is not necessary).

##Code Starts Here##

wavenumber=200:3500

nspectra=20

set.seed(2)
baseline_1=runif(length(wavenumber),min=0,max=0.1)
group_1_peaks=sample(wavenumber[10:(length(wavenumber)-10)],10)
dataset_1=matrix(0,ncol=nspectra,nrow=length(wavenumber))

for(i in 1:ncol(dataset_1)){
for(j in 1:length(group_1_peaks)){
width=round(runif(1,min=1,max=10),digits=0)
peak_position=dnorm((group_1_peaks[j]-width):(group_1_peaks[j]+width),mean=group_1_peaks[j],sd=width)
peak_intensity=peak_position*round(runif(1,min=1,max=100),digits=0)
baseline_1[(group_1_peaks[j]-width):(group_1_peaks[j]+width)]=peak_intensity
}
dataset_1[,i]=baseline_1
}

set.seed(20)
baseline_2=runif(length(wavenumber),min=0,max=0.1)
group_2_peaks=sample(wavenumber[10:(length(wavenumber)-10)],10)
peak_intensity_means_2=runif(length(group_2_peaks),min=10,max=100)
dataset_2=matrix(0,ncol=nspectra,nrow=length(wavenumber))

for(i in 1:ncol(dataset_2)){
for(j in 1:length(group_2_peaks)){
width=round(runif(1,min=1,max=10),digits=0)
peak_position=dnorm((group_2_peaks[j]-width):(group_2_peaks[j]+width),mean=group_2_peaks[j],sd=width)
peak_intensity=peak_position*(peak_intensity_means_2[j]*runif(1,min=0.5,max=2))
baseline_2[(group_2_peaks[j]-width):(group_2_peaks[j]+width)]=peak_intensity
}
dataset_2[,i]=baseline_2
}

##Code Ends Here##

All spectra within each dataset have been overlain.

Stacked spectra, with all simulated spectra within each dataset overlying one another.

The following principal component analyses is a good example of how these simulated spectra might be used. The following code calls on two libraries (signal, baseline), so be aware that you will need to install the signal and baseline packages to run it. This code first runs through a set of preprocessing steps before the principal component analysis. The citation for this code is: Thomas D B, Chinsamy A, 2011. Chemometric analysis of EDXRF measurements from fossil bone. X-ray Spectrometry 40: 441-445

##Code Starts Here##

 

library (signal)

library(baseline)

combined.data=cbind(dataset_1,dataset_2)

combined.baseline=matrix(0,ncol=length(combined.data[,1]),nrow=length(combined.data[1,]))
combined.bc=c()
combined.data=t(combined.data)
for (n in 1:(length(combined.data[,1]))) {
combined.bc=baseline(combined.data[n,, drop=FALSE],lambda=1,hwi=20, it=30, int=800, method=’fillPeaks’)
combined.baseline[n,]=combined.bc@corrected[1:length(combined.bc@corrected)]
}
combined.data=combined.baseline
combined.data=t(combined.data)

combined.min=matrix(rep(apply(combined.data,2,min),length(combined.data[,1])),ncol=length(combined.data[1,]),byrow=T)
combined.max=matrix(rep(apply(combined.data,2,max),length(combined.data[,1])),ncol=length(combined.data[1,]),byrow=T)
combined.minmax=(combined.data-combined.min)/(combined.max-combined.min)

combined.mc=matrix(rep(colMeans(t(combined.minmax)),length(combined.minmax[1,])),ncol=length(combined.minmax[1,]))
combined.minmax.mc=combined.minmax-combined.mc

combined.minmax.mc=t(combined.minmax.mc)
combined.pc=prcomp(combined.minmax.mc)
combined.loadings=combined.pc$rotation
combined.scores=combined.pc$x

eigenval=combined.pc$sdev^2
explained=round(eigenval/sum(eigenval) * 100, digits = 1)

PCx=1
PCy=2

combined.scores.PCx=combined.scores[,PCx]
combined.scores.PCy=combined.scores[,PCy]
combined.loadings.PCx=combined.loadings[,PCx]
combined.loadings.PCy=combined.loadings[,PCy]

layout(matrix(c(1,1,2,1,1,3),nrow=3,ncol=2))

plot(combined.scores.PCx,combined.scores.PCy,font=5, ann=FALSE,col=c(rep(“red”,(nspectra)),rep(“blue”,(nspectra))))

title(xlab=paste(“Principal component “, PCx, ” (“,explained[PCx],”%)”,sep=””))
title(ylab=paste(“Principal component “, PCy, ” (“,explained[PCy],”%)”,sep=””))

plot(wavenumber,combined.loadings.PCx,type=”l”,xlab=”wavenumber (1/cm)”,ylab=paste(“Principal component”, PCx))
plot(wavenumber,combined.loadings.PCy,type=”l”,xlab=”wavenumber (1/cm)”,ylab=paste(“Principal component”, PCy))

##Code Ends Here##

 

The results of a PCA applied to a simulated dataset of Raman spectra.

The results of a PCA applied to a simulated dataset of Raman spectra.

 

Cool beans. We can clearly recover two groupings of PC scores along PC1. Here the two groups (red, blue) correspond to the two simulated Raman spectral datasets.

 

Researchers labelled DNA in moa eggshells with a fluorescent dye. Moa didn't have green fluorescent bones - this is just a fun picture.

Researchers labelled DNA in moa eggshells with a fluorescent dye. Moa didn’t have green fluorescent bones – this is just a fun picture.

Many researchers use genetic information to study relationships between species. This works because there are tiny differences between the genetic code of a parent and an offspring – over many generations, these small changes eventually produce new species. Closely related species that shared a recent common ancestor will have the most similar genetic code (i.e. most similar DNA sequences). So, by figuring out similarities and differences between the genetic codes, researchers can understand evolutionary relationships between species.

This works really well for modern animals because researchers can easily collect DNA from living tissues. This is a little more challenging if researchers want to use DNA to learn the relationships of extinct animals. DNA degrades over time, so even if you find a fossil that is only a few hundred years old, it may no longer contain DNA. This was the challenge that Charlotte Oskam and colleagues faced when they studied ancient moa eggshells (Oskam et al. 2010). How could they know if DNA was present in the ancient eggshells? One method they explored was confocal fluorescence microscopy.

I will let these two clips explain:

To find out if ancient moa and elephant bird eggshells contained DNA, Oskam and colleagues immersed the shell fragments in a solution of fluorescent dye. The dye is colourless and it binds to DNA. When the dye-labelled DNA is irradiated with a blue laser it appears green. Sure enough, the ancient moa eggshells lit up green in the laser microscope.

“…Confocal imaging of elephant bird (Aepyornis) eggshell in cross section clearly demonstrated that DNA is distributed through the eggshell matrix as evidenced by the presence of fluorescent ‘hot-spots’. Imaging of the inner surface of moa eggshell (Dinornis) also shows foci of DNA…”

This is great, and a real time saver if it stops the researchers from analysing ancient egg shells that don’t have DNA in them. Imagine, though, how amazing it would be if we could find the ancient DNA without the need for a fluorescent dye….

Oskam CL, Haile J, McLay E, Rigby P, Allentoft ME, Olsen ME, Bengtsson C, Miller GH, Schwenninger J-L, Jacomb C, Walter R, Baynes A, Dortch J, Parker-Pearson M, Gilbert MTP, Holdaway RN, Willerslev E and Bunce, M. 2010. Fossil avian eggshell preserves ancient DNA. Proceedings of the Royal Society B: DOI: 10.1098/rspb.2009.2019

Fossil bird expert Dr Dan Ksepka kindly let me write a guest article for his blog, March of the Fossil Penguins. You can check it out here: https://fossilpenguins.wordpress.com/2015/02/03/3d-scans-of-penguin-bones/

Spinosaurus, the estuary-dwelling super predator. Photo by Kabacchi (2009)

Spinosaurus, a semi-aquatic dinosaur. Photo by Kabacchi (2009)

I am going to do something a little bit different with this post and predict a future scientific instrument. I got the idea for this post after reading an interesting list of inventions inspired by science fiction, compiled by Mark Strauss at the Smithsonian.

You see, I really enjoy science fiction. I like how, given enough time, technological or scientific predictions can become reality. Check out the early predictions of continental drift for a great example. I like that scientists are free to receive inspiration from anywhere, including fiction. So, on that note, allow me to make my own prediction. In the not-too-distant future, I think there will be a non-destructive device that measures the oxygen isotopic composition of phosphate in bone.

Allow me to explain.

Did you know that Spinosaurus, the record-breaking sometimes super-predator, spent much its life standing in water catching fish? We know this because Romain Amiot and colleagues did an amazing job of analysing the oxygen isotopic composition of phosphate in the ancient bones of Spinosaurus. Some background on oxygen isotopes:

  • two atoms of the same element (like oxygen) that differ in their numbers of neutrons are actually two isotopes of the same element
  • the atoms in any substance are actually a mixture of isotopes, and the ratio of isotopes can change from place to place (i.e. different isotopic compositions)
  • thanks to evaporation and precipitation, different bodies of water (rivers, estuaries, oceans) have different oxygen isotopic compositions
  • animals ingest water  – some of the oxygen from this ingested water is stored as phosphate and used by the animal for bone construction
  • ingested oxygen mostly retains it’s isotopic composition, so animals end up storing evidence about the bodies of water they associate with

I have always liked this Spinosaurus study for the simple fact that I now picture this gigantic dinosaur wading in a North African estuary. The obvious next question though, is “Why don’t we have these kinds of stories for every dinosaur?” Quite simply, this is expensive scienceThe process of extracting phosphate from fossil bone is destructive (…fossils are precious) and labor intensive, and analyses require dedicated and often pricey lab equipment. Wouldn’t it be great if there was another way of getting these data, so we could tell more Spinosaurus-like stories?

So here is my speculation. One day we will be able to analyse the isotopic composition of bone phosphate using a non-destructive device. This isn’t totally random – there is actually an existing instrument that does something similar (Note: feel free to skip the video – it’s an advertisement for a scientific instrument):

That video doesn’t do a great job of actually saying how the instrument works. In essence:

  • A spectrometer shines infrared light at a sample
  • Molecules or minerals in that sample contain atoms, and some of these atoms share covalent bonds
  • The atoms shared by the covalent bonds move relative to one another – you can think of the bond ‘stretching’, ‘bending’, ‘twisting’ etc.
  • Each ‘stretch’, ‘bend’ and ‘twist’ requires energy, which is gained by absorbing infrared light
  • Actually, only very specific wavelengths of infrared light are absorbed – the wavelengths absorbed match the energy needed to ‘stretch’, ‘bend’ or’twist’ the bond
  • The energy needed to ‘stretch’, ‘bend’ or ‘twist’ the bond is partly determined by the mass of the atoms sharing the covalent bond
  • Different isotopes have different masses –  the ‘vibrating’ bonds of different isotopes require different wavelengths of light
  • We can figure out which infrared wavelengths correspond to which isotope-bond systems
  • A detector in the spectrometer counts all of the wavelengths that are not absorbed by the sample, which in turn tells us which wavelengths are absorbed
  • By comparing the amounts of each isotope-informative wavelength that are absorbed, we can calculate the isotopic composition of the sample.

Simple enough, right? Well, right now this works well for CO2 because it is a carbon-and-oxygen isotope system. A CO2 molecule with two oxygen-16 isotopes has noticeably different vibrational frequencies compared with a CO2 molecule with two oxygen-18 isotopes, and so we can see distinct peaks for each isotopologue in an infrared spectrum (isotopologues are molecules that only differ in their isotopic compositions). Karl Dierenfeldt provided a great description of this phenomenon in this chemistry experiment (Dierenfeldt 1995). Yes, differences in peak positions from each CO2 isotopologue are subtle, but infrared spectrometers have long been sensitive enough to detect them.

So, what about the different isotopologues of phosphate in bone? First off, infrared spectrometers work really well on gases, liquids and translucent or highly polished solids. Of course, polishing a sample requires some destruction, which is what we would need to do to fossil bone. That’s fine, we can instead use Raman spectroscopy to get our spectrum without sample destruction. The real problem is resolution. At the moment we cannot resolve the peaks we get from a Raman spectrum of bone into phosphate isotopologues. Such fine levels of resolution might be possible one day, and on that day, we will have a device that can quickly give us ancient environmental data from dinosaur bones (even while they are on display in a Museum).

What a day that will be.
Dierenfeldt KE. 1995. Isotope ratio, oscillator strength, and band positions from CO2 IR spectra: a physical chemistry experiment. Journal of Chemical Education 72: 281-283.

Amiot R, Buffetaut E, Lécuyer C, Wang X, Boudad L, Ding Z, Fourel F, Hutt S, Martineau F, Medeiros A, Mo J, Simon L, Suteethorn V, Sweetman S, Tong H, Zhang F, Zhou Z. 2010. Oxygen isotope evidence for semi-aquatic habits among spinosaurid theropods. Geology 38: 139–142.

X-ray fluorescence chemical map of an ancient teleost fish. From Gueriau et al. PLoS One 2014: doi:10.1371/journal.pone.0086946.g001

X-ray fluorescence chemical map of an ancient teleost fish. From Gueriau et al. PLoS One 2014: doi:10.1371/journal.pone.0086946.g001

We often think of fossils as being solid and three-dimensional body parts, like dinosaur bones or ancient sea shells, and we can imagine these fossils being part of an organism that lived in ancient times. Eventually that organism would have died and become buried under sediment. Sometimes sediment does an excellent job of preserving fossils through deep time. But not always – sometimes the weight of the sediment crushes the fossil almost completely, flattening out the three-dimensional features. Working with flat fossils can be tricky if you are interested in the fine details of these ancient body parts. Pierre Gueriau and colleagues recognised this problem, and described a chemical imaging technique that can better help with visualising these flattened remains.

Gueriau and colleagues used x-ray fluorescence to study crushed fossils. X-ray fluorescence is useful for describing the elemental composition of a fossil. When this elemental information is collected from many thousands of points, there is enough information to build an elemental map. Researchers can visualise the distribution of elements in a fossil by assigning different colours to different elements. So how does this help to visualise the structure of a crushed fossil?

…Here, we discriminate tissues in exceptionally well-preserved fossils on the basis of their content in chemical elements from majors to traces, in particular trace rare earths and transition metals, and alkaline earths. We exploit the distinct affinities of mineralized tissues and authigenic phases for fixing elements as a source of contrast between hard and soft fossil parts. Our results are based on the identification of spatial distributions of more than twenty elements in entire fossils through synchrotron X-ray spectral raster-scanning…”  – Gueriau et al. PLoS One 2014

So, different parts of the fossils actually contain slightly different elemental compositions. Using false colour maps, where different colours correspond to different elements, the authors were able to produce images like this:

 

Figure 1. Synchrotron X-ray fluorescence mapping of major-to-trace elements in fossils from the OT1 Lagerstätte. (A–C) Optical photographs of the specimen of the shrimp Cretapenaeus berberus MHNM-KK-OT 01a (A), the usual teleost fish MHNM-KK-OT 02 (B) and the newly identified teleost fish MHNM-KK-OT 03a (C). (D–F) False color overlays of elemental distributions reconstructed from a full spectral decomposition of the synchrotron raster-scanning data. (D) False color overlay of neodymium (red), yttrium (green) and iron (blue) distributions from the shrimp (scan step: 100×100 µm2, 26,751 pixels). (E) False color overlay of neodymium (red), strontium (green) and iron (blue) distributions from the characteristic teleost fish (scan step: 125×123 µm2, 21,120 pixels). (F) False color overlay of neodymium (red), yttrium (green) and iron (blue) distributions from the newly identified teleost fish (scan step: 100×100 µm2, 50,851 pixels). Images demonstrate the strong elemental contrast between fossil skeletal and soft tissues. The yellow and red squares in C indicate the two areas that were mapped at higher spatial resolution in Fig. 2. The scale bar is 5 mm and applies to all panels. doi:10.1371/journal.pone.0086946.g001

Figure 1. Synchrotron X-ray fluorescence mapping of major-to-trace elements in fossils from the OT1 Lagerstätte. (A–C) Optical photographs of the specimen of the shrimp Cretapenaeus berberus MHNM-KK-OT 01a (A), the usual teleost fish MHNM-KK-OT 02 (B) and the newly identified teleost fish MHNM-KKOT 03a (C). (D–F) False color overlays of elemental distributions reconstructed from a full spectral decomposition of the synchrotron raster-scanning data. (D) False color overlay of neodymium (red), yttrium (green) and iron (blue) distributions from the shrimp (scan step: 100×100 µm2, 26,751 pixels). (E) False color overlay of neodymium (red), strontium (green) and iron (blue) distributions from the characteristic teleost fish (scan step: 125×123 µm2, 21,120 pixels). (F) False color overlay of neodymium (red), yttrium (green) and iron (blue) distributions from the newly identified teleost fish (scan step: 100×100 µm2, 50,851 pixels). Images demonstrate the strong elemental contrast between fossil skeletal and soft tissues. The yellow and red squares in C indicate the two areas that were mapped at higher spatial resolution in Fig. 2. The scale bar is 5 mm and applies to all panels. doi:10.1371/journal.pone.0086946.g001

The authors were able to produce incredibly detailed maps of fossils because they were using a synchrotron as the source of their x-rays. The high-energy, tightly focused x-ray beam from the synchrotron meant that a great deal of data could be quickly gathered from one tiny spot on each fossil. Repeat several thousand times to produce a map!

#PLOSONE: Trace Elemental Imaging of Rare Earth Elements Discriminates Tissues at Microscale in Flat Fossils http://dx.plos.org/10.1371/journal.pone.0086946

Gueriau P, Mocuta C, Dutheil DB, Cohen SX, Thiaudière D, et al. (2014) Trace Elemental Imaging of Rare Earth Elements Discriminates Tissues at Microscale in Flat Fossils. PLoS ONE 9(1): e86946. doi:10.1371/journal.pone.0086946

#Introducing R

R is an incredibly useful programming language that I often use in my research. For example, I use have used R to analyse XRF spectra, to study feather colours, and to look at the possibility of red-feathered dinosaurs.

If you are interested in learning to use R then check out my Introduction to R slides, which can be accessed from Slideshare. These slides provide a basic intro, including a few statistical tests for you to work with. In a future set of slides I will include the code for my spectral analyses.

Raman spectroscopy gives us some amazing insight into ancient life. To pick just example, Raman researchers have analysed ancient microbes on Earth to teach us how to recognise life on other planets (Marshall et al 2006). Rather than highlight the advantages of Raman spectroscopy though, I thought I might focus on one of the biggest drawbacks of this technique: Autofluorescence, which is more commonly just called fluorescence.

“The natural enemy of Raman spectroscopy is fluorescence” – Olaf Hollricher, Raman Instrumentation for Confocal Raman Microscopy.

[Check out this post for a basic refresher on Raman spectroscopy]. Fluorescence is what happens when a substance absorbs and then immediately emits light. In essence, the substance glows when a light is shone on it. This is kind-of but-not-quite like a glow-in-the-dark toy: you shine light on the toy, and when you remove the light you can still see the toy. The difference here is that the toy has stored the light and is slowly releasing it, instead of receiving and releasing the light at nearly the same time. Glow-in-the-dark is an example of phosphorescence. We are talking about fluorescence.

Have you ever been to a museum with rocks and minerals that are being lit with a ‘black light’? Did the minerals look all bright red and green and purple like in the picture from Wikipedia below? The bright colours of these minerals are examples of fluorescence.

Fluorescent minerals. Click to link back to the  Wikipedia source.

Fluorescent minerals. Click to link back to the Wikipedia source.

For a plain-language video explanation of fluorescence (…that uses lasers), check out this Youtube clip:

So the important point here is that a higher energy (shorter wavelength) light source can make substances emit lower energy (longer wavelength) light. A Raman spectrometer that uses a green wavelength (shorter wavelength) might cause a bone to emit near infrared light (longer wavelength). How does this make fluorescence the “…natural enemy…” of Raman spectroscopy? Quite simply, it’s because the business end of a Raman spectrometer is a CCD or CMOS detector, like the one in your camera. The Raman instrument is designed around producing and gathering light, and because of the way Raman scattering  works, the detectors need to be very sensitive. Also, detectors don’t discriminate between Raman scattered light and the light produced by fluorescence. Light emitted during fluorescence is much more intense than Raman scattered light: emitted light drowns out the scattered light.

So, why is fluorescence the “…natural enemy…” of Raman spectroscopy? A sample that fluoresces during a Raman analysis is unlikely to give you a meaningful Raman spectrum. So the trick is to stop a sample from fluorescing…

 

Marshall CP, Carter EA, Leuko S, Javaux EJ. 2006. Vibrational spectroscopy of extant and fossil microbes: Relevance for the astrobiological exploration of Mars. Vibrational Spectroscopy 41: 182-189

Tag Cloud

Follow

Get every new post delivered to your Inbox.