ImportFameSettings | R Documentation |
This function imports a list of retention standard markers for RI correction.
ImportFameSettings(file, mass=NULL, standard=NULL, colnames=FALSE, ...)
file |
A character string naming a tab-delimited text file with standard markers OR a matrix-like object. |
mass |
Optional. The m/z standard marker(s). Either a scalar, which applies to every marker, or a vector. |
standard |
Optional. The RI values of the standards. A numeric vector. |
colnames |
Logical flag. If |
... |
Options passed to |
The standard marker file is a tab-delimited text file with 2, 3 or 4
columns. Additional columns are ignored. If the parameter colnames
is FALSE
, then the column names are ignored and they must be in the
following specified below. If TRUE
, use the column names below (case
is ignored). Note that some columns are optional as they can be specified by
the options mass
and standard
.
LowerLimit
- The Retention time lower limit in seconds
(required).
UpperLimit
- The Retention time upper limit in seconds
(required).
RIstandard
- The RI value of that standard. This is optional
(option standard
).
mass
- The m/z standard marker. This is optional
(option mass
).
Instead of passing a file via the file
option, one can pass a
matrix
or a data.frame
, The same aforementioned conditions
apply in terms of column names and number.
In general, the mass
and the standard
should be to NULL
.
If not, then they take precedence over the values defined by the file
parameter.
If no arguments are given, a default object will be returned.
A tsRim
object.
If the parameter colnames
is set to TRUE
, then care needs to be
taken regarding the column names: they must be named exactly as described in
the details section, otherwise they can be silently ignored and a
default value might be used instead. This has been the default behavior.
Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig
RIcorrect
, tsRim
,
read.delim
require(TargetSearchData)
# get the RI marker definition file
rim.file <- tsd_file_path("rimLimits.txt")
# set the mass marker to 87
mass <- 87
# load the definition
rimLimits <- ImportFameSettings(rim.file, mass = mass)
# sometimes you need to change the limits of a particular standard
rimLimits(rimLimits)[2,] <- c(410, 450)
# to change the mass value
rimMass(rimLimits) <- 85
# alternatively, you can pass a two column matrix as limits and pass the
# rest as parameters separately (toy example).
limits <- cbind(c(10, 20, 30), c(15, 25, 35))
mass <- 100
standard <- c(100, 200, 300)
rimLimits <- ImportFameSettings(limits, mass, standard)
# or combine all into a matrix (note the column order!)
def <- cbind(limits, standard, mass)
rimLimits <- ImportFameSettings(def)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.