ncdf4_update_ri: Update retention time index on a NCDF4 file

ncdf4_update_riR Documentation

Update retention time index on a NCDF4 file

Description

Performs retention time index (RI) correction on a CDF file, using the retention markers found by RIcorrect(), or to force the markers time if, for example, the RI markers were not co-injected with the biological samples. It wraps around rt2ri()

Usage

ncdf4_update_ri(cdfFile, observed, standard)

Arguments

cdfFile

Path to the CDF file

observed

The observed RI markers retention times'.

standard

The RI of said markers.

Details

This function is similar to fixRI(), with the difference that is acts upon a single file, whereas fixRI() requires a tsSample object.

Value

Returns invisible

Note

This function is meant to be used internally. It is exposed for convenience.

Author(s)

Alvaro Cuadros-Inostroza

See Also

fixRI, RIcorrect, ImportFameSettings

Examples

# pull a CDF file from package TargetSearchData as example
require(TargetSearchData)
cdffile <- tsd_cdffiles()[9]

# we need to convert from NCDF3 to NCDF4 in this example
# (NCDF3 files do not work)
nc4file <- ncdf4_convert(cdffile, 'example.nc4')

# to update the RI we need to pass two equal-length vectors of
# observed RT and standard RI values.
obsRT <- c(252, 311, 369) # approx time of RI markers
stdRI <- c(262320, 323120, 381020) # the exact RI of the markers

# finally update the RI for these file
ncdf4_update_ri(nc4file, obsRT, stdRI)

acinostroza/TargetSearch documentation built on April 3, 2024, 8:09 p.m.