Tuesday, May 16, 2017

Research spotlight: "The Column" chemistry blog

My recent publication in Scientific Reports prompted an interview from chemistry blog The Column. Surf on over to read the Q & A with co-author and chemist extraordinaire Phil Stevenson.

Sunday, April 23, 2017

ggtree function in R

As a student in the Organismic and Evolutionary Biology program, I finally have the occasion to compare trait data with phylogenetic data. Over the past couple of weeks, I have been searching for a way to put these things together graphically.

To make the tree of plant species, I have used the "phylomatic" function in R package "brranching" by Scott Chamberlain.

To associate data with the tree, I used Guangchuang Yu's ggtree package. This makes faceted plots where one facet is the tree and another facet (or more) show the data.

First I will offer my thanks to these gurus who make things possible for us R mortals.

Here was the script I came up with:


#Make the tree:
taxa.plus<- c("Aesculus carnea", "Antirrhinum majus",
              "Brassica napus", "Catalpa speciosa", "Citrus sinensis",
              "Cucurbita pepo", "Dicentra eximia", "Digitalis purpurea",
              "Echium vulgare","Eupatorium perfoliatum", "Fragaria ananassa",
              "Geranium maculatum", "Helianthus annuus",
              "Impatiens capensis", "Kalmia latifolia",
              "Linaria vulgaris", "Lobelia siphilitica",
              "Lythrum salicaria", "Malus domestica",
              "Penstemon digitalis", "Persea americana",
              "Prunus dulcis", "Rhododendron_prinophyllum",
              "Silene vulgaris",
              "Solanum carolinense", "Solidago canadensis",
              "Tilia_cordata", "Thymus vulgaris",
              "Trifolium pratense", "Vaccinium corymbosum",
              "Verbascum thapsis")
treeget<-phylomatic(taxa = taxa.plus, get="GET")

#Generate data for the graph:
                Height=runif(n=length(treeget$tip.label), min=10, max=100),
                Chem=rnorm(n=length(treeget$tip.label), mean=5, sd=3))

#Plot in ggtree
Tree<-ggtree(as.phylo(treeget)) + geom_tiplab()
#change axis limits to view tip labels
ggtree(as.phylo(treeget)) + geom_tiplab() +

#Adjust limits on tree
Tree.l<-Tree + geom_tiplab() + xlim(0,22)

#Creat facet plot:
fp<-facet_plot(Tree, panel = "Chem", data = df1,
           geom = geom_point, aes(x=Chem),
           stat= 'identity') + ggtree::xlim_expand(xlim=c(-2,2), panel="Chem")

#adjust axis limits:
fp.limited<-fp + xlim_tree(40) + xlim_expand(xlim=c(-5, 25), panel = "Chem") +

#Add geom_pointrange:
df1$error<-rnorm(n=length(treeget$tip.label), mean=2, sd=0.4)
fp.error<-facet_plot (fp.limited, geom=geom_pointrangeh, data=df1,
                      aes(x=Chem, xmax = Chem + error, xmin = Chem - error),
                      panel = "Chem")

#Try with geom_errobar instead
fp.error.bar<-facet_plot (fp.limited, geom=geom_errorbarh, data=df1,
                      aes(x=Chem, xmax = Chem + error, xmin = Chem - error),
                      panel = "Chem")
#Warning: Ignoring unknown aesthetics: x

#However, you get error without specification of "x"
fp.error.bar2<-facet_plot (fp.limited, geom=geom_errorbarh, data=df1,
                              xmax = Chem + error, xmin = Chem - error),
                          panel = "Chem")
#Error in FUN(X[[i]], ...) : object 'x' not found

Of course I haven't used any real data, but you could!
Good luck plotting!

Thursday, December 1, 2016

UMass Amherst Life Science Graduate Research Conference

Tomorrow (Friday 2 December) is the UMass Amherst Graduate Research Conference. Stop by the Life Science Laboratory building, Room S330, to hear the latest findings of UMass's graduate students. Or listen on the web live.
Thanks to the LSGRC for organizing this event!

Monday, November 14, 2016

Bumble bee disease on the radio

Fernald Club Blog-founder Evan Palmer-Young was interviewed by a local radio host, Chris Fournier, for a program called Unscripted, which will be played Monday at 8pm on WXOJ-LP 103.3 FM NORTHAMPTON, MA. Topics include the difference between bumble bees and honey bees, Evan's journeys in science, and current and future research themes.

If you want to listen via the live web stream, or your phone -- go Here. Thanks to Chris for doing the interview during daylight hours, and to UMass Journalism Professor Nicholas McBride for facilitating. 

edit: Link to recording is here

Friday, June 24, 2016

Evolution 2016 Austin TX

A big week for the Fernald Club graduate students at the Evolution Conference in Austin TX. Daniel Peterson, Laura Doubleday, and blogger Evan Palmer-Young presented pieces of their dissertation research to an international audience.

Get all the latest entomology talks on the Youtube channel:

Here are the highlights from my talk:


Relive the glory and follow your colleague through a journey punctuated by
1) Discovering the clicker does not work (0:00)
2) Discovering that there is a microphone, that does work, and makes one's voice audible (1:20)
3) Discovering that the audio system in the conference room is sufficient to alert the bomb squad (4:48)
4) Defining "juggernaut" (12:40)

Thanks to my colleagues for their help getting the talk into shape! Sorry for the choppy delivery. I recorded three talks myself directly before, and missed my zen visualization and warm-up, as well as familiarization with the key A/V equipment.

Wednesday, May 11, 2016

Scientists in the Classroom: Photos

Thanks to Alessandra D'Angelo for hosting me (Evan) in her class, Katie DeMars for signing up for the program, and the Scientists in the Classroom program for inspiring this visit.
Here are some photos:
 Trying out a new phenotype...

Scramble competition!
 Are slides worth beans?
 Competition for resources!
 Maximizing fitness...