This is processing code for the clumped isotope (Δ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.
Using the R-package 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.
The workflow is deployed by 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.
We use the 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:
- 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 R/install_packages.R.
A user guide on how to run the workflow, can be previewed here.
A set of inspection plots (that do not get updated automatically!) can be viewedhere.
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/.
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.
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