Skip to contents

Introduction

This vignette deals with the visualization of spatial ion maps and high-precision isotope data generated with the Cameca nanoSIMS 50L, as discussed in the paper (Figs 6 and 7, and Supplementary Fig. 7).

library(point) # regression diagnostics
library(pointapply) # load package

Download data

Ion count data processed with the *point* R package (Schobben 2022) is required to produce the raster plots (Figs 7 and 8, and Supplementary Fig. 7). Information on how to generate processed data from raw data can be found in the vignette Reading matlab files (vignette("data")). Alternatively, processed data can be downloaded from Zenodo with the function download_point().

# use download_point() to obtain processed data.
# this only has to be done once after installation
download_point(type = "processed")

Load data

For this example aggregated and processed ion count data is loaded with grid-cell sizes of 64 pixels by 64 pixels, which as determined based on regression diagnostics yields the most accurate isotope ratio Validation of regression assumptions (vignette("regression")). In addition, ion ratio maps, which provide auxiliary information on the spatial distributions of e.g. organic inclusions, and two full (pixel-by-pixel) grid-cell datasets for the MEX analyte are loaded.

# load e.g. grid aggregated counts
load_point("map_sum_grid", "MEX", 64) 
load_point("map_sum_grid", "MON", 64) 

Raster images

Simple ion ratio map

The function gg_cnts() is designed for plotting of ion count ratios, i.e. the background ion map of Figures 7 and 8 and Supplementary Figure 7. This function simply produces a raster of ion count ratios according to spatial dimensions; height, width and depth, by using ggplot() + geom_raster()(Wickham et al. 2021; Wickham 2016), and mapping a colour to the numeric value of the ion ratio. The viridis colour scale is used as it provides a perceptually uniform scale in both colour and black-and-white (scale_fill_viridis_c()).

library(ggplot2)

# raster
gg_cnts("MEX", "12C14N", "12C", viri = "D")

# save
save_point("simple_raster_Mex_12C-14N-12C", last_plot(), width = 10, height = 8, 
           unit = "cm")
Simple ion ratio map (MEX).

Simple ion ratio map (MEX).

Combination plot

The regression diagnostics (Cook’s D) for 13C/12C are calculated over the data-grid with a 100\(\,\mu\)m^2 (64 pixels by 64 pixels) size, as this aggregation resulted in normally distributed ion counts; see Validation of regression assumptions (vignette("assumptions")), and, as described in the paper. The core point(Schobben 2022) functions diag_R() and eval_diag() are subsequently applied to the gridded data-sets to assess the intra- and inter-analysis 13C/12C variability comprised in, respectively, the individual grid-cells and the whole target area of the analyte.

# load point
library(point)

# diagnostics
diag_R(
  map_sum_grid_64_MON, 
  "13C", 
  "12C", 
  dim_name.nm, 
  sample.nm, 
  file.nm, 
  grid.nm, 
  .nest = grid.nm, 
  .output = "complete", 
  .meta = TRUE
)

The results can be visualized by application of the function gg_effect(), which combines the previous gg_cnts() function with tiles (geom_tiles()) and text (geom_text())(Wickham et al. 2021; Wickham 2016) mapping the outcomes of regression diagnostic on 13C/12C. This produces the Figures 7 and 8, and Supplementary Figure 7 of the paper.

Figure 7 (MON)

In the first example (Fig. 7), high-precision grid-cells for 13C/12C is combined with a high spatial resolution map for \({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\). Although no pattern can be discerned in the ion ratio map, the high-precision 13C/12C reveal a distinct gradient traversing the targeted analyte, which is reflected in both the intra- and inter-analysis isotope variability (as designated by significance stars and colour of the text, respectively).

# combination plot
gg_effect("MON", "12C-40Ca16O", viri = "B", save = TRUE)
Raster (${}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}$${}^{16}\mathrm{O}_{}$)--grid-cell combination plot (MON).

Raster (\({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\))–grid-cell combination plot (MON).

Figure 8 (MEX)

The same procedure is repeated for the MEX analyte, starting by performing the intra- and inter- analysis isotope test of the point package. Thereafter, the ion ratio map (\({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\)) is combined with high 13C/12C tiles for the 100\(\,\mu\)m^2 grid-cells. For this analyte, however, there appear to be distinct cluster of elevated \({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\) (e.g. red rectangle), which could indicate the presence of organic inclusions in the sedimentary carbonate.

# combination plot
gg_effect("MEX", "12C-40Ca16O", viri = "B", save = TRUE)
Raster (${}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}$${}^{16}\mathrm{O}_{}$)--grid-cell combination plot (MEX).

Raster (\({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\))–grid-cell combination plot (MEX).

Supplementary Figure 7 (MEX)

The same procedure for MEX is repeated, but then with \({}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}\)\({}^{12}\mathrm{C}_{}\) as a background raster image. This revealed additional spatial patterns related to nitrogen enrichment. Notably, the grid-cell highlighted with the red rectangle.

gg_effect("MEX", "12C14N-12C", viri = "B", save = TRUE)
Raster (${}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}$${}^{12}\mathrm{C}_{}$)--grid-cell combination plot (MEX).

Raster (\({}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}\)\({}^{12}\mathrm{C}_{}\))–grid-cell combination plot (MEX).

In-depth analysis of MEX

The recognition of clusters of elevated \({}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}\)\({}^{12}\mathrm{C}_{}\) and \({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\) in the MEX analyte spurred additional in-depth analysis on the potential effect of these anomalies regions on the 13C/12C values. For this purpose, the auxiliary information of the ion raster images are used to filter those anomalous areas (organic and nitrogen enriched areas) from the background, and analyse those regions in term of 13C/12C composition. The gg_point() is designed to perform this function, where the arguments image and ion_1_thr and ion_1_thr refer to ion ratio map and the respective ions, and the argument thr is used to set a threshold value for filtering. The arguments ion_1_R and ion_1_R connect the former to high-precision isotope analysis (e.g. 13C/12C) which are included in the full (pixel by pixel dataset) provided with the argument IC.

Figure 8

This function has been applied to \({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\) of Figure 7 (highlighted by a red rectangle). This shows that the 13C and 12C count rates could be of potential high influence on the isotope ratio, given that the organic inclusion is sufficiently large relative to the matrix (or the analytical resolution of the method is sufficiently large).

gg_point(
  title = "MEX",
  grid_cell = 9,
  # ion ratio for filtering
  ion1_thr = "12C",  
  ion2_thr = "40Ca16O", 
  thr = 20, 
  # isotope ratio
  ion1_R = "13C", 
  ion2_R = "12C",
  save = TRUE
)
In-depth analysis of the potential influence of anomolous ${}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}$${}^{16}\mathrm{O}_{}$ values on the ${}^{13}\mathrm{C}_{}/{}^{12}\mathrm{C}_{}$ (MEX).

In-depth analysis of the potential influence of anomolous \({}^{12}\mathrm{C}_{}/{}^{40}\mathrm{Ca}_{}\)\({}^{16}\mathrm{O}_{}\) values on the \({}^{13}\mathrm{C}_{}/{}^{12}\mathrm{C}_{}\) (MEX).

Supplementary Figure 8

The in-depth analysis of the nitrogen enriched region on Supplementary Figure 8 (red rectangle) seems to show a similar pattern, where the enriched cluster falls in a distinct regions of the Cartesian coordinates. Although in this case the enriched \({}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}\)\({}^{12}\mathrm{C}_{}\) have distinctly lower count rates when compared to background values.

gg_point(
  title = "MEX",
  grid_cell = 2,
  # ion ratio for filtering
  ion1_thr = "12C14N",  
  ion2_thr = "12C", 
  thr = 0.75, 
  # isotope ratio
  ion1_R = "13C", 
  ion2_R = "12C",
  save = TRUE
)
In-depth analysis of the potential influence of anomolous ${}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}$${}^{12}\mathrm{C}_{}$ values on the ${}^{13}\mathrm{C}_{}/{}^{12}\mathrm{C}_{}$ (MEX).

In-depth analysis of the potential influence of anomolous \({}^{12}\mathrm{C}_{}/{}^{14}\mathrm{N}_{}\)\({}^{12}\mathrm{C}_{}\) values on the \({}^{13}\mathrm{C}_{}/{}^{12}\mathrm{C}_{}\) (MEX).

References

Schobben, Martin. 2022. Point: Reading, Processing, and Analysing Raw Ion Count Data. https://martinschobben.github.io/point/.

Wickham, Hadley. 2016. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org.

Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2021. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.