Learn R Programming

SIM (version 1.42.0)

getTarget: Get target information

Description

Asssuming that the targets are provided in a NIST mass spectral library, i.e. MSL, format, this function reads the list of targets and the related information.

Usage

getTarget(Method = "target", target.file.name = character(), 
            library.file.name = character(), path = getwd(), 
            library.path = getwd(), Library = list(), target.table = list(),
            deltaRI = numeric(), deltaRT = numeric(), Save = FALSE)

Arguments

Method
a srting with three possible values: "target", "library", and "combined". The "target" case means the user only provides a .MSL file as a list of targets. In the "library" mode, the user provides only a library in .MSL format, but it is required to provide a target.table to determine the name of the targets and the selected mass. The target.table can be obtained by using getTargetTable function. In the "combined" method, the user provides a list of targets as target.table and a library in .MSL format where the fragments are selected using optimization.
target.file.name
a string including the full name of a .MSL file including the target compounds information.
library.file.name
a string including the full name of a .MSL file including the library compounds information. The library can include background compounds, e.g. an in-house library. A library can also directly imported using the Library argument.
path
a string including the full path to the location of the file.name, optional
library.path
a string inlcuding the full path to the location of the library file, optional
Library
a list of library information, this is used when the library file is not provided.
target.table
a list including the name of the compounds, this is required when a library is provided to extract the targets information from the library. This value can be obtained using getTargetTable function.
deltaRI
a numeric value for the penalty on the retention index similarity score
deltaRT
a numeric value for the penalty on the retention time similarity score
Save
if FALSE, the function returns the targets as a list, otherwise, it saves the list as an rds object.

Value

  • A list containing:
  • compounda character vector containing the names of the targets
  • msa list of numeric vectors of fragment mass of the targets
  • spa list of numeric vectors of fragment intensities of the targets
  • rta numeric vector of retention times of the targets
  • ria numeric vector of the retention indexed of the targets
  • quantFraga numeric vector showing the index of quantifier fragment in ms and sp fields.
  • sortedFraga list of numeric vectors showing the order of fragments from the most favorable to the list favorable choice for a quantifier.

Details

By calling readMSL, this function reads the target list and retrieves the reltated informatin such as retention time, retention index, mass and intensity of the fragments, and compound names. The user can determine the quantifier mass by using a single value for all targets, or a vector of values pointing to the index of the fragment of ineterest for each target. Also, the targets can be chosen by omptimization based on overlapping compounds if a library is provided. The library should not include any targets, but it can be an in-house library built from background compounds detected in measurements of the same type of samples.

References

http://omics.georgetown.edu/SIMAT.html

See Also

getTargetTable, optFrag

Examples

Run this code
# load the target table information
    data(target.table)

    # load the background library to be used with fragment selection
    data(Library)
    
    # get targets info using target table and provided library
    Targets <- getTarget(Method = "library", Library = Library, 
                                                target.table = target.table)

Run the code above in your browser using DataLab