Package 'IsoCor'

Title: Analyze Isotope Ratios in a 'Shiny'-App
Description: Analyzing Inductively Coupled Plasma - Mass Spectrometry (ICP-MS) measurement data to evaluate isotope ratios (IRs) is a complex process. The 'IsoCor' package facilitates this process and renders it reproducible by providing a function to run a 'Shiny'-App locally in any web browser. In this App the user can upload data files of various formats, select ion traces, apply peak detection and perform calculation of IRs and delta values. Results are provided as figures and tables and can be exported. The App, therefore, facilitates data processing of ICP-MS experiments to quickly obtain optimal processing parameters compared to traditional 'Excel' worksheet based approaches. A more detailed description can be found in the corresponding article <doi:10.1039/D2JA00208F>. The most recent version of 'IsoCor' can be tested online at <https://apps.bam.de/shn00/IsoCor/>.
Authors: Jan Lisec [aut, cre]
Maintainer: Jan Lisec <[email protected]>
License: GPL (>= 3)
Version: 0.2.9
Built: 2024-11-10 02:59:19 UTC
Source: https://github.com/janlisec/isocor

Help Index


find_peak_boundaries

Description

find_peak_boundaries will find the start and end point of a peak based on curve derivative.

Usage

find_peak_boundaries(
  int = NULL,
  p = which.max(int),
  k = 3,
  min_scans = 3,
  noise = 0
)

Arguments

int

Numeric vector (of intensity values).

p

Index of peak position (usually 'which.max(int)).

k

Number of scans at peak boarder to confirm peak valley.

min_scans

Minimum number of scans in front or tail.

noise

A threshold value. All Values below or equal to noise will be set to zero.

Details

This function provides a simple detection algorithm for peak boundaries. It will accept a numeric vector as input and determine relative to the global maximum (or a user provided local maximum) the left and right border where intensity decrease ends and intensity is increasing again.

Value

A numeric vector of length 2 giving the indexes of peak start and peak end.

Examples

## Not run: 
x <- sin(seq(-pi,2*pi,0.01))+1
plot(x)
abline(v=find_peak_boundaries(x))

## End(Not run)

ic_app.

Description

ic_app will start a shiny app that allows to upload raw data, process selectively and analyze different methods of ratio calculation between two intensity traces.

Usage

ic_app(...)

Arguments

...

Options passed to golem::with_golem_options.

Details

The app is described in detail in doi:10.1039/D2JA00208F.

Value

A shiny app object. This will effectively launch a browser and start the app on local port 7462.

See Also

iso_ratio


iso_ratio

Description

iso_ratio will calculate a robust estimate of an isotopic ratio between intensity values of 2 mass traces.

Usage

iso_ratio(data, method = c("PBP", "PAI", "LRS"), thr = 1)

Arguments

data

data.frame with two columns specifying data for isotope 1 and 2 respectively.

method

Method to calculate the isotope ratio.

thr

Threshold between 0..1 to limit the peaks scans used in the calculation (1=all scans, 0=apex only).

Details

Within ic_app we compute estimates for isotope ratios using raw data and several processing steps. iso_ratio is internally used to perform this calculation and could be used in an external data processing pipeline without the app context. However, users would need to extract intensity vectors of isotope peaks from raw data independently. Note! All non-finite values and x==0 will be removed before calculation.

Value

A single numeric value. The robust ratio estimate calculated from data.

Examples

peak1 <- 1 + cos(x = seq(-pi, pi, length.out = 100))
peak2 <- 0.05 * peak1 * runif(n = 100, min = 1, max = 1.01)
iso_ratio(data = cbind(peak1, peak2))

isotopes.

Description

isotopes.

Usage

data(isotopes)

Format

A data.frame of chemical isotopes providing mass and natural abundance.

Source

R-package enviPat


mass_bias.

Description

mass_bias will calculate a correction factor K to scale isotopic ratios and thereby account for machine variance.

Usage

mass_bias(
  mi_amu = 0,
  si_amu = 0,
  method = c("Linear", "Russel", "Exponential"),
  f_value = 0
)

Arguments

mi_amu

atomic mass of MI isotope.

si_amu

atomic mass of SI isotope

method

Method to calculate the mass bias.

f_value

f_value to be used within the method calculation.

Details

Currently, 3 methods are available to calculate the mass bias, Linear, Russel and Exponential. They all depend on the atomic mass of the two ion traces and a f-value which can be provided as parameters to the function.

Value

A single numeric value K to be used for scaling.

Examples

IsoCor::mass_bias(32, 34, "Linear", 0.1)

read_raw_data

Description

read_raw_data will import ICP MS data in various file formats.

Usage

read_raw_data(path, format = c("exp", "icp", "data", "generic"))

Arguments

path

Valid file path.

format

Character specifying the import file format.

Details

Try to specify 'format' parameter to find a method suitable for your files or select 'generic' which will import a tab delimited file with 3 columns defining RT, MI and SI respectively. You may check why data import of your files fails in the app on this function and potentially extend it to handle your files.

Value

A data.frame.

Examples

str(IsoCor::read_raw_data(path = ""))

testdata.

Description

testdata.

Usage

data(testdata)

Format

A list of 3 exp spectra files converted by read_raw_data.

Source

[email protected]


testdata_IDMS.

Description

testdata_IDMS.

Usage

data(testdata_IDMS)

Format

A list of 3 txt spectra files converted by read_raw_data.

Source

[email protected]