EFSA data — coding for analysis using R

Whenever I have a few hours, I work on the data analysis code for the European Food Safety Authority data on mycotoxins that I have received a few months ago.

plyr and dplyr packages (dplyr is part of tidyverse) have been instrumental to get an overview of the data, answering questions like “How many samples from country X? or How many toxins analysed in sample Y…?” Basic boxplotting of subsets (e.g., from a time range, a specific country or for a specific toxin) provide a crucial overview before conducting a detailed analysis.

Food safety data from the European Union

I have successfully requested mycotoxin occurrence data from the European Food Safety Authority (EFSA). It’s been a lengthy, but successful process getting the data (but surprisingly transparent and being kept up to date by the legal department of EFSA), but once all member states had approved the release of their data a CD arrived in the mail a few weeks later with more than 500,000 data sets of regulated mycotoxin concentrations in a variety of raw and processes food matrices.

Together with collaboration partners from Europe, I am now in the process of analysing occurrence data for regulated toxin species. I am setting up a series of analysis scripts in R (using the tidyverse, such as dyplyr and ggplot2) to shed light on the contamination of food products with toxins such as Aflatoxins, Deoxynivalenol and Ochratoxin A.

Summer students hard at work

Over the summer, two summer students have been hard at work designing and building an air sampler for volatile organic compounds. The sampler is SPME-based and analysis is performed using GC-MS. Initial testing showed promising results for ambient outdoor air.

An advanced undergraduate students will be testing and characterising the sampler as part of his final year research project!

Mycotoxin analysis with laser spectroscopy and machine learning

I have co-authored a paper on portable infrared laser spectroscopy for on-site mycotoxin analysis, which nicely demonstrates future applications of spectroscopy — a combination of new powerful laser light sources (quantum cascade lasers) paired with machine learning allows for extraction of information from spectra of complex samples such as food and environmental matrices.

In this case toxin concentrations of a potent natural carcinogen (Aflatoxin B1) were used to discriminate samples at (the very low, 8 ppb) established legal limits.

Portable sensors are most useful for preliminary large scale screening on site.

http://dx.doi.org/10.1038/srep44028

The full text of the Canadian mercury science assessment…

… is now available online! Check out this link to the catalogue entry or access the full text as PDF directly in English and French.

My contribution on Canadian and Global emissions is part of this report: G. Kos, Y.-F. Li, D. Niemi, M. King, S.A. Smyth, C. Zdanowicz, J. Zheng, Releases of Mercury into Air and Water from Anthropogenic Activities in North America.

New research is out

New research that I was involved in has been published recently — here are the articles that are now available

Y. Nazarenko, R.B. Rangel-Alvarado, G. Kos, U. Kurien, P.A. Ariya, Novel Aerosol Analysis Approach for Characterization of Nanoparticulate Matter in Snow, Environmental Science and Pollution Research (2016), doi: 10.1007/s11356-016-8199-3

This work is a reanalysis of snow samples that I have collected during my Arctic field trips with a focus on nanoparticles.

P. Kovalsky, G. Kos, K. Nährer, C. Schwab, T. Jenkins, G. Schatzmayr, M. Sulyok, R. Krska, Co-occurrence of Regulated, Masked and Emerging Mycotoxins and Secondary Metabolites in Finished Feed and Maize – an Extensive Survey, Toxins 8 (2016), 363, doi: 10.3390/toxins8120363

The manuscript provides an extensive and detailed statistical analysis of 1900+ finished feed, maize and maize silage samples from 40+ countries. 50+ fungal toxins and secondary metabolites were determined and evaluated with a focus on co-occurrence and correlation of concentrations. The analysis was performed using Matlab and R.

G. Kos, M. Sieger, D. McMullin, C. Zahradnik, T. Öner, B. Mizaikoff, R. Krska, A Novel Chemometric Classification for FTIR Spectra of Mycotoxin-contaminated Maize and Peanuts at Regulatory Limits, Food Additives and Contaminants, Part A 33 (2016), 1596-1607, doi: 10.1080/19440049.2016.1217567

As a collaborator on the EU funded Mycospec project, I have modelled mycotoxin contamination levels from mid-infrared data. Focus was the implementation of non-parametric machine learning algorithms such as bagged decision trees and a comparison with standard (and generally accepted) principal component analysis results. The analysis was performed using Matlab.

Converting a scientific manuscript from LaTeX to MS Word

I like to write my manuscripts in LaTex — focus on the text and no worries about figure and table numbers, their formatting… have me sold. But sadly, not all journals accept LaTeX source files, some even require the us of MS Word. So, here is, what I have done to get a manuscript ready for submission on a Mac .

My manuscript contained

  • Tables (including “sidewaystable”)
  • Figures
  • Bibliography generated with natbib

I needed

  • MacTeX 2016
  • Preview
  • MS Word
  • SimpleTeX4ht

What I did

  • Copy/paste the manuscript in PDF format from Apple Preview into MS Word (looks surprisingly good). This makes sure to bring the references properly along
  • Clean up the text, replacing e.g., words breaking in the middle of the line (from the PDF line wraps); can be mostly done using find/replace
  • Reapply bold and italics text not carried over from copy/paste
  • Use SimpleTeX4ht to export an HTML file and copy/pasting the tables to the MS Word file, where it is reformatted properly. Not as tedious as it sounds.
  • Figures are copied/pasted from the PDF, but they need to be resized.

Open issues

  • Super- and sub-scripts are not properly copied over; they look fine in MS Word, but do not correspond to a true MS Work sub/superscript. Cannot be fixed using MS Word’s find/replace function either since it is a formatting issue. Needs to be changed manually (… or ask the copy editor nicely, if s/he could do it).

Here is to Reviewer 2!

In a recent manuscript, now under revision, Reviewer 2 suggested to provide more detail on the already published and cited reference method used — well here we go (again): Too detailed? I will be asked to shorten and be more concise; too concise? I will be asked to expand.

 Middle ground seems to be hard to find — or rather seems to be a function of how willing Reviewers are to look up cited literature. 
I’d rather go with short, sweet and properly cited — at least next time, when I will be Reviewer 2 😉

The Canadian Mercury Science Assessment is now published

The assessment provides current information about Hg emissions, transformation and environmental impact from a Canadian perspective.

I was the lead author of the “Emissions” chapter of the report and together with D. Niemi and Y. Fan-Li, I have summarized past, current and projected future emissions using Canadian and global data.

Find a summary here: http://www.ec.gc.ca/mercure-mercury/default.asp?lang=En&n=32909A5D-1

Talk at the MUSCLE Cluster Conference at Bishop’s University

I have attended and presented at the “Connecting Through Climate Change” meeting at Bishop’s University (where I also teach). I was asked to present results from my Arctic Research and very interesting discussions followed with researchers from the Université de Sherbrooke and Bishop’s University.