Are you playing Secret Santa? a R function

We’re playing Secret Santa in my family: you are giving a present to only one other person, and their identity is only known to you. You need to give them a handmade present or a present bought in a second-hand store. Well that last part is our own variation of the concept.

You might be playing Secret Santa in your lab.

Here is a little R function to sort the draw without anyone seeing the outcome, and without the need to involve an external participant. The only inputs are:

-a vector of names of participants; for example c(“Patrick”,”Nicole”,”Maria”,”Pablo”)

-the folder where you want the output files; for example “C:/Users/Maria/SecretSanta”

After you’ve run the function, send to each person the output file named after them.

The function:

for (i in 1:length(names)){
 if (names[i]%in% chosen){
 write.table(paste(directory,"/",names[i],", you will give a present to ",choice,sep=""),
 return("Done! the files are in the provided directory. Merry Christmas.")


Load the function into R by entering the code above, and then run the function with your input:

secretsanta(names=c("Patrick","Nicole","Maria","Pablo"), directory="C:/Users/Maria/SecretSanta")


Merry Christmas!



We do other things too: extracting DNA from cambium

This post is about labwork. Anyone reading our blog might have the idea that being in the Aitken lab is much like being Indiana Jones (or possibly Tarzan) – and sure, we are a good-looking bunch of rugged adventurers. But the truth is that although most lab pictures show our feats of courage ascending massive Sitka spruce, or wandering the wilds of Alaska, we spend a lot of time in the lab.

Joane Elleouet and I tried to extract DNA from dried Sitka spruce cambium for six months or so last year, on and off. We went through a number of protocols, and although we eventually modified one of them enough that it mostly worked, we were amazed at the lack of guidance online for cambium extractions. Surely someone had done this before! Nope. We thought that the world wide web had our back, and then it didn’t.

This is the wetlab, the room that hears the most cursing and cheering. We (mostly Dragana) recently cleaned, which is why it looks so good.

What you’ll find below is an annotated version of a CTAB DNA extraction protocol we got from Kristin Nurkowski (who got it from Marco Todesco at the Rieseberg Lab),  which we have modified for cambial tissue. It’s not perfect, but if you’re having trouble getting DNA out of cambium it may be your best bet. Probably some more improvements can be made. Note also that the suggestions we offer are just what one or both of us thought worked best for our own samples as we extracted them: we haven’t tested them with other batches of samples, and often we haven’t tested each alteration to the original protocol in isolation. But despite our recalcitrant tissue, we managed to scrape a 60-90% success rate, depending on the exact methods and samples (which is actually pretty good). Hopefully you can do as well or better.

When not in the lab or the field, this is what we do: Joane, Ian, Jon, and Pia being productive.

Unfortunately, for those of you who are just reading this for fun, recess is over once you cross the dashed line below.

————————————— Beginning of the protocol —————————————

The protocol has been through a number of modifications, but originally it was from Zeng et al. 2002, Acta Botanica Sinica 44; 694-697. There are a few other papers published that have other methods for extracting DNA from cambium (preserved in different ways) that you could look for in case of difficulty.

PART I: Preparing the buffers

CTAB-free Buffer (100 mL total volume):

20 mL 1M Tris-HCl stock, pH 8.0
10 mL 0.5 EDTA stock, pH 8.0
5 mL 5M NaCl stock
65 mL PCR-clean H2O

3% CTAB Buffer (100 mL total volume):

10 mL Tris-HCl stock
5 mL EDTA stock
30 mL NaCl stock
3 g CTAB
1 g PVP
55 mL PCR-clean H2O
Do not autoclave, the PVP will be destroyed.

High Salt TE (100 mL total volume):

20 mL NaCl stock
80 mL TE buffer

TE Buffer (100 mL total volume):

1 mL Tris-HCl stock, pH 8.0
200 uL EDTA stock, pH 8.0
98.8 mL PCR-clean H2O

PART II: Tissue collection

We used discs of cambium and phloem (since it’s difficult to get just cambium – it’s all stuck together in the inner bark) obtained using a leather punch from the base of Sitka spruce trees and dried in silica gel. We shaved around 20-30 mg (usually 22ish) of tissue from the inside (wood side) of each disc. That’s the region that should contain the (supposedly) DNA-rich cambial tissue.

Our samples weren’t perfect to begin with. Mine were collected in late July on Vancouver Island, after the peak of cambial activity in the spring. Collecting earlier might have improved the yield. Joane’s samples had been dried in silica gel for a year, and it’s possible they became less tractable with time.

Put your tissue into a 2 mL tube with one steel ball bearing. It is really important to weigh tissue into a 2 mL tube because the ball bearing can get stuck in the end of the 1.5 mL tube.

PART III: Grinding

1. Place your samples in a mixer mill block, put it in a Styrofoam box, and pour liquid nitrogen over it (wear insulated gloves!).
2. Assemble the block and fit it into the mixer mill.
3. Grind samples at 30 Hz for 1 minute.
4. Quickly disassemble the block and freeze each part again.
5. Reassemble the block, flipping it 180◦ to ensure even grinding, and grind again at 30 Hz for 1 minute. Usually, redistributing the samples within the block each time helps them grind evenly.
6. Disassemble the block and check each sample. It should look like a fine beige powder. If the sample is not ground properly, freeze everything and grind it again. For our samples, it took as many as ten repetitions of the grinding process.
7. After grinding, quickly add the prepared buffer and start the protocol.

PART IV: Protocol

8. Put some 3%CTAB to warm at 65◦F with loose cap
9. Add 1 ml of CTAB-free buffer (cold) + 6 μl β-mercaptoethanol (mix done beforehand in the fumehood with a bit extra)
10. Mix by inversion (shake each sample quickly), keep 10 minutes in the freezer. While waiting, put some 3% CTAB in the waterbath and some 2-propanol in the freezer
11. Spin at 10.000 g for 10 minutes in the centrifuge (longer may be required, depending on your tissue)
12. Discard the supernatant under the fumehood in a trash beaker
13. (if you use particularly nasty tissue, you can repeat this step)
14. Add 500 μl of pre-warmed 3% CTAB + 5 μl of β-mercaptoethanol in the fumehood
15. Incubate at 65°C for 60 minutes
16. Let the tubes cool down a little bit
17. Add 500 μl of chloroform-isoamylalcohol 24:1 in the fumehood. SUPER CORROSIVE!
18. Vortex
19. Spin at full speed for 15 minutes. Meanwhile, label new 1.5mL tubes
20. Move the aqueous phase to the new tubes (1.5mL) under the fumehood. This must be done exactly right – it’s probably the most important step. The aqueous phase is the liquid above the solid phase in the centre of the tube. Don’t take all the liquid, and don’t disturb the part that’s within a couple mm of the solid-liquid interface. Take around 320 uL from the top surface of the aqueous phase slowly and carefully. Too much will give you an impure sample. Too little will decrease the yield of DNA.
21. Add 250 μl of NaCl 5M, mix fast
22. Add 500 μl of cold isopropanol (2-propanol), mix (have a tube ready in the freezer)
23. Leave at least 20 minutes or overnight at -20°C. You can take a break here if you want!
24. Spin at max speed for 15 minutes
25. Wash pellet in fumehood with 1 ml of cold 80% ethanol (prepare the mix from 100% and PCR-clean water)
26. Spin at max speed for 5 minutes
27. Repeat wash (no need to be under the fumehood anymore)
28. Dry pellet (by putting the tubes in the heatblock at 25 to 37 degrees)

Depending on your tissue, you may need to include the following seven optional steps (labelled 29-35). Otherwise proceed directly to step 36. We found that omitting the optional steps often led to severe RNA contamination. The Nanodrop would say we had lots of very pure DNA, but the Qubit (which is much more reliable) would say we had almost none.

29. Resuspend in 400 μl of high salt TE + 2 μl of RNAse A (sometimes more RNAse is needed)
30. Incubate at 37°C for one hour, mixing occasionally until the pellet dissolves. Sometimes this is a LOT of mixing.
31. Add 800 μl of cold 100% ethanol
32. Spin at max speed for 15 minutes
33. Wash pellet with 1 ml of cold 80% ethanol. If the pellet is invisible, it doesn’t mean the sample failed. Just continue, leaving a bit of liquid at the bottom of the tube with every wash, and be very careful not to touch the part of the tube where the pellet should be when you suck out the liquid to dry the pellet.
34. Spin at max speed for 5 minutes
35. Repeat wash

36. Dry pellet and resuspend in 50 uL elution buffer or TE. Use less if you need higher concentrations. The yield of this procedure was often in the range of 250 – 1250 ng when the optional steps (29-35) were included, and more if they weren’t.
37. Quantification and quality control: we used a Nanodrop and a Qubit. The Nanodrop gives (sometimes wildly) inaccurate DNA concentration readings but it can test for purity. The Qubit gives accurate concentrations, but doesn’t tell you what might be in the sample along with the DNA.


It is important to note the two most hazardous reagents used in the protocol. In addition to being stinky, the B-mercaptoethanol is also toxic. Any supernatant or plastic item contaminated by it must remain in the fume hood and becomes hazardous waste. Do not breathe it in or get it on your skin. The chloroform is also toxic and can burn your skin and lungs. Keep the lid on and it in the fumehood! Any plasticware contaminated with chloroform needs to remain in the fumehood until dry, and then it can be thrown out with regular trash. Liquid waste needs to be stored and disposed of according to your local regulations (but not down the drain!).


The biggest problems with this protocol were:

• A mystery contaminant. There seems to be something in Sitka cambium or phloem that gives low 260/230 ratios on the Nanodrop (i.e. a bad quality score), if it isn’t properly removed. Sometimes it removes well, other times not.
• RNA contamination. We sometimes had lots of RNA in the samples if we skipped steps 29-35. If this isn’t a problem for you, omit them. If it is, include them – but the whole protocol gets more finicky when you do. Getting rid of the RNA while keeping enough DNA to work with (in our case for GBS and sequence capture and then next-gen sequencing) wasn’t always easy.
• Low yields. Sometimes we just didn’t get much DNA. The good news is, this often seemed to be protocol-dependent rather than sample-dependent. When a sample didn’t work out, trying the same sample again often solved the problem.

Some suggestions for troubleshooting:

• Try changing the amount of supernatant you take in step 20. Take more if you have no DNA. Take less if you have a contamination problem.
• Try starting with different amounts of tissue. Use more if you have no DNA. Use less if you have a contamination problem.
• Be careful washing the pellet: don’t lose all or part of it! Maybe spinning at colder temperatures (4°C? 10°C?) would help.
• Consider using RNAse A if you still have a contamination problem after including the optional steps. Consider eliminating the RNAse A steps if you have no DNA.
• Try using your newest tissue, collected whenever cambium is active near you (probably spring).

Final note:

All the extra cautions and advice I added to the protocol might make it seem a bit daunting. But remember, it actually works! The protocol isn’t particularly difficult, and maybe it’s less finicky than my comments make it seem — and after a few repetitions you should be churning out extracted samples no problem. So good luck!


Happy designing…

Here is a little help for those of us trying to make a poster.

Usually we spend a lot of time on contents, and try to squish in too much information, but let’s give some thought to the following design elements (which I got from today’s workshop by Jamie Myers, who designs Branchlines): consistency; repetition; alignment; balance; symmetry and the rule of thirds; white space to rest the eye; reduced line length; image resolution; and lastly, colour palette.

Regarding Colour Palette, check out www.color.adobe.com, where you can choose a colour palette based on an image of your own . I include two samples below… This will certainly make choosing colours easier for me. Happy designing!

AdobeColorPalette Coastal AdobeColorPalette Flower


Simulating climates in growth chambers – Simulating winter

This post is part of the series Simulating Climates in Growth Chambers.

It remains difficult to simulate realistic winters. The more expensive growth chambers will allow programmed temperatures of -2 °C at night (with lights off). Fluorescent and incandescent lights themselves generate heat and the cooling requirement is energy-demanding. LED lights are costly. While a temperature of -2°C is technically possible, I have found out the hard way that this may not actually be what you want. When submitting plants to cold temperatures during the day (+2°C) and freezing temperatures at night (-2°C) it has happened that my soil volume froze, and did not thaw during the day. This resulted in wilting. In nature, plants would form roots deeper down, which have access to soil water. In the chamber, soil volume is very shallow, and assumes the temperature of the surrounding air, while buffering only the highest and lowest extremes.

Our interest has mostly been in growth, so a six-week “chilling period” is applied after one growth season to encourage more uniform flushing in the second growing season. During the chilling period, temperatures are held at a constant 4°C and day length is reduced to 8 hours or less, under reduced light intensity. This has been sufficient in our case, since the plants had received the correct signals to set bud and prepare for winter by the time our simulated end of the growing season (“October 15”) arrived.

In certain situations it is necessary to have real frost. We found this was true for testing cold hardiness of pine and spruce. We use the electrolytic leakage method described in Hannerz et al. (1999)1. Day length is the most important trigger in signalling the end of the growing season and initiating dormancy. However, in nature these shorter days are correlated with cooling temperatures. When the factors are uncoupled in the growth chamber, we find that the cooler temperatures are a required component of the acclimation procedure. We have successfully induced hardiness by subjecting plants which had already set bud to brief periods of night frost. To this aim, we gradually, over a period of 4 days, dropped night temperatures to a minimum of -2°C, until we kept it there for two hours.

Temperature regimes for a pre-treatment of light night frost to induce cold tolerance. Grey are baseline temperatures for resp. part A and B of the week, NF 1 to 4 are the four nights of frost. NF 0 (red, preceding NF1) was introduced for MAT6 and MAT11 because of their high nighttime minima.

Temperature regimes for a pre-treatment of light night frost to induce cold tolerance. Grey are baseline temperatures for resp. part A and B of the week, NF 1 to 4 are the four nights of frost. NF 0 (red, preceding NF1) was introduced for MAT6 and MAT11 because of their high nighttime minima.

A week after this acclimation took place, pretests revealed that the plants had responded sufficiently to reveal the population signal we were interested in, and yield suitable testing temperatures. Full tests were scheduled for the second week after the frost. Higher daytime temperatures (maxima between 23 and 30 °C) did not undo or mask the nighttime frost signal, and the soil never risked freezing with these brief exposures.

Effect of pre-treatment of light night frost to induce cold tolerance on lodgepole pine.

Effect of pre-treatment of light night frost to induce cold tolerance on lodgepole pine.

1 Hannerz, M., S.N. Aitken, J.N. King, and S. Budge. 1999. Effects of genetic selection for growth on frost hardiness in western hemlock. Can. J. For. Res. 29: 509–516


Simulating climates in growth chambers – Choosing day length regimes

This post is part of the series Simulating Climates in Growth Chambers.

Day length for a given latitude can be obtained from online programs, such as the online photoperiod calculator at http://www.sci.fi/~benefon/sol.html Day length was reprogrammed weekly for convenience. Latitude can be chosen corresponding to a target location (e.g., Williams Lake, 52°07’N) or latitude representative of an area, e.g. the province of B.C. (54.5°N).

Some practical limitations may rise here. Until LED lights become cheaper still, any light source also generates heat. It may not be possible to program a sunrise while temperatures are still below 4°C. This depends on the hardware of the climate chamber. In this case, consider turning on the lights gradually, reducing light intensity, and leaving off any incandescent lights until later, as they generate a relatively high percentage of heat.

Next up on the list is simulating winter conditions, heat waves, stimulating germination and bud set. You can also go back through some of our older posts on simulating climates in growth chambers.

 Day length during the growing season at 54.5 °N.

Day length during the growing season at 54.5 °N.