GitHunt
UT

UtrechtUniversity/clumped-processing

Clumped isotope measurement processing script for Thermo Fisher MAT 253 plus isotope ratio mass spectrometer with the Kiel IV

#+title: clumped-processing
[[https://zenodo.org/badge/latestdoi/400205023][https://zenodo.org/badge/400205023.svg]]

This is processing code for the clumped isotope (\Delta_{47}) measurements made with the Thermo Fisher MAT 253 plus isotope ratio mass spectrometer with the Kiel IV automatic line, located in the Vening-Meineszbuilding B, for the Stratigraphy and Paleontology group at Earth Sciences, UU.

  • targets explanation

Using the R-package [[https://wlandau.github.io/targets-manual/][targets]], we can run only those parts of the code that need to be updated. The basic structure is we first load the necessary libraries, then we define functions that do most of the work, and then a workflow of targets with function calls that targets analyses for inter-dependencies.

  • Deployment

The workflow is deployed by [[https://www.uu.nl/en/organisation/faculty-of-geosciences/about-the-faculty/organisation/faculty-office][GEO-ICT]] and runs on a Windows Virtual Machine that is located close to the rawdata drive of the Geolab.

This VM can read in the rawdata directly and synchronizes the metadata file and final output to the Clumped Isotope Teams OneDrive.

To run the code, log in to the VM, start RStudio and run targets::tar_make() from the command line.

  • Dependencies

We use the [[https://www.r-project.org/][R programming language]] >4.1.0 (because we use the native pipe |> operator every now and then).

The required R packages for this workflow are:

  • [[https://github.com/isoverse/clumpedr/][clumpedr]] :: install with devtools::install_github("isoverse/clumpedr") to do the generic clumped isotope calculations
  • tidyverse :: It's probably easiest to just install them all...
    • dplyr :: data wrangling
    • readr :: reading/writing csv files, changing column types
    • purrr :: functional programming, never loop again
    • tibble :: better data.frames
    • lubridate :: work with dates and times
    • tidyr :: i.e. extract character column, nesting, pivoting
  • readxl :: to read in our excel files with metadata changes
  • qs :: for optimized cache of lists
  • fst :: for optimized cache of data.frames and tibbles
  • isoreader :: to read in the raw files
  • slider :: for the rolling empirical transfer function (currently not preferred)
  • targets :: for the cached reproducible pipeline workflow
  • tidylog :: for neat log messages about dplyr verbs

See also the file [[file:R/install_packages.R]].

  • Notebooks

A user guide on how to run the workflow, can be previewed [[https://htmlpreview.github.io/?https://raw.githubusercontent.com/UtrechtUniversity/clumped-processing/main/running_clumped-processing.nb.html][here]].

A set of inspection plots (that do not get updated automatically!) can be viewed[[https://htmlpreview.github.io/?https://raw.githubusercontent.com/UtrechtUniversity/clumped-processing/main/inspecting_clumped-processing.nb.html][here]].

  • Copying

The code was created by Ilja J. Kocken https://orcid.org/0000-0003-2196-8718
Copyright 2022 © Ilja Kocken

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see https://www.gnu.org/licenses/.

  • Contributing

Contributions in the form of issues and pull requests are most welcome. However, the goal of this repository is to proccess clumped isotope data from the Utrecht University laboratory.

  • Citation

If you use this software in your work, please cite it using the following metadata.

Kocken, I. J. (2022). clumped-processing: R scripts to process clumped isotopes from raw data to final values at Utrecht Univerity (Version 1.0.0) [Computer software]. https://doi.org/10.5281/zenodo.6421836

Languages

HTML96.2%R3.8%

Contributors

Latest Release

v1.0.0April 7, 2022
GNU General Public License v3.0
Created August 26, 2021
Updated May 4, 2024